]> git.karo-electronics.de Git - linux-beck.git/commit
crypto: nx - fix XCBC for zero length messages
authorMarcelo Cerri <mhcerri@linux.vnet.ibm.com>
Thu, 29 Aug 2013 14:36:38 +0000 (11:36 -0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 2 Sep 2013 10:32:55 +0000 (20:32 +1000)
commit41e3173daf4e2d2f2dcc48ae7ffc8d0c4f3ecec9
tree7ed61814485e0d054cc982bf1b9fbf84365582a2
parent2b188b3b86005ca63eb851a1992f06b9a301f800
crypto: nx - fix XCBC for zero length messages

The NX XCBC implementation doesn't support zero length messages and
because of that NX is currently returning a hard-coded hash for zero
length messages. However this approach is incorrect since the hash value
also depends on which key is used.

This patch removes the hard-coded hash and replace it with an
implementation based on the RFC 3566 using ECB.

Reviewed-by: Joy Latten <jmlatten@linux.vnet.ibm.com>
Signed-off-by: Marcelo Cerri <mhcerri@linux.vnet.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/nx/nx-aes-xcbc.c