]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: echainiv - Replace chaining with multiplication
authorHerbert Xu <herbert@gondor.apana.org.au>
Wed, 7 Sep 2016 10:42:08 +0000 (18:42 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 13 Sep 2016 10:44:57 +0000 (18:44 +0800)
commit547b5f89981ab02aec460d113e43485b14e192a5
tree95635f9a1b03ca963f3758a4ffbcf5f4f94cc515
parent08d1a1608cc63602bc3ab46245ec4e39797a8f76
crypto: echainiv - Replace chaining with multiplication

The current implementation uses a global per-cpu array to store
data which are used to derive the next IV.  This is insecure as
the attacker may change the stored data.

This patch removes all traces of chaining and replaces it with
multiplication of the salt and the sequence number.

Fixes: 49e92d2f2d2a ("crypto: echainiv - Add encrypted chain IV...")
Cc: stable@vger.kernel.org
Reported-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/echainiv.c