]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: vmx - Fixing GHASH Key issue on little endian
authorLeonidas Da Silva Barbosa <leosilva@linux.vnet.ibm.com>
Fri, 14 Aug 2015 13:14:16 +0000 (10:14 -0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 18 Aug 2015 02:30:36 +0000 (10:30 +0800)
commitf534683b07ddcfb3781974b2e32933ae46224755
treec6095373c863c1da23a2b316bbb8bfa7daf3b02a
parent0ed742b189d36a0d75ef1afcb6b81441b48df5af
crypto: vmx - Fixing GHASH Key issue on little endian

GHASH table algorithm is using a big endian key.
In little endian machines key will be LE ordered.
After a lxvd2x instruction key is loaded as it is,
LE/BE order, in first case it'll generate a wrong
table resulting in wrong hashes from the algorithm.

Bug affects only LE machines.
In order to fix it we do a swap for loaded key.

Cc: stable@vger.kernel.org
Signed-off-by: Leonidas S Barbosa <leosilva@linux.vnet.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/vmx/ghashp8-ppc.pl