diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2019-10-23 11:50:44 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-12-13 08:43:09 +0100 |
commit | 7214ec30b767cb3d0411523e030cd3041707435e (patch) | |
tree | 574bfdaca837945b35d8f9c2c9199dcb64bfd8fa /crypto/sha1_generic.c | |
parent | b25e7377064fc0284971c4cd8684e047b57351e0 (diff) | |
download | linux-crypto-7214ec30b767cb3d0411523e030cd3041707435e.tar.gz linux-crypto-7214ec30b767cb3d0411523e030cd3041707435e.zip |
crypto: ecdh - fix big endian bug in ECC library
commit 262777c0da63572461859a155024cf5c52023afb upstream.
The elliptic curve arithmetic library used by the EC-DH KPP implementation
assumes big endian byte order, and unconditionally reverses the byte
and word order of multi-limb quantities. On big endian systems, the byte
reordering is not necessary, while the word ordering needs to be retained.
So replace the __swab64() invocation with a call to be64_to_cpu() which
should do the right thing for both little and big endian builds.
Fixes: e8c7f3061131 ("crypto: ecdh - Add ECDH software support")
Cc: <stable@vger.kernel.org> # v4.9+
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'crypto/sha1_generic.c')
0 files changed, 0 insertions, 0 deletions