diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2019-10-23 11:50:44 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2019-11-01 13:38:31 +0800 |
commit | 262777c0da63572461859a155024cf5c52023afb (patch) | |
tree | cc2d2373fc6fd4726902d7e6f2fb961184a222f4 /crypto/pcrypt.c | |
parent | 45f492d77eefc969dc6092efc2b9eb041e680b0b (diff) | |
download | linux-crypto-262777c0da63572461859a155024cf5c52023afb.tar.gz linux-crypto-262777c0da63572461859a155024cf5c52023afb.zip |
crypto: ecdh - fix big endian bug in ECC library
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>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions