summaryrefslogtreecommitdiff
path: root/crypto/lz4hc.c
diff options
context:
space:
mode:
authorVitaly Chikunov <vt@altlinux.org>2018-11-11 20:40:02 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2018-11-16 14:11:04 +0800
commitea67137900ab7938b1ede24ad61241db5621719d (patch)
tree3f748b111213844242c9e5948d0998615176e783 /crypto/lz4hc.c
parente17e9c2c8b407d44f8a555f99507ec7cbf636d51 (diff)
downloadlinux-crypto-ea67137900ab7938b1ede24ad61241db5621719d.tar.gz
linux-crypto-ea67137900ab7938b1ede24ad61241db5621719d.zip
crypto: ecc - regularize scalar for scalar multiplication
ecc_point_mult is supposed to be used with a regularized scalar, otherwise, it's possible to deduce the position of the top bit of the scalar with timing attack. This is important when the scalar is a private key. ecc_point_mult is already using a regular algorithm (i.e. having an operation flow independent of the input scalar) but regularization step is not implemented. Arrange scalar to always have fixed top bit by adding a multiple of the curve order (n). References: The constant time regularization step is based on micro-ecc by Kenneth MacKay and also referenced in the literature (Bernstein, D. J., & Lange, T. (2017). Montgomery curves and the Montgomery ladder. (Cryptology ePrint Archive; Vol. 2017/293). s.l.: IACR. Chapter 4.6.2.) Signed-off-by: Vitaly Chikunov <vt@altlinux.org> Cc: kernel-hardening@lists.openwall.com Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/lz4hc.c')
0 files changed, 0 insertions, 0 deletions