crypto: ecc - check for invalid values in the key verification test
authorVitaly Chikunov <vt@altlinux.org>
Mon, 5 Nov 2018 08:36:18 +0000 (11:36 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 16 Nov 2018 06:09:39 +0000 (14:09 +0800)
commit2eb4942b6609d35a4e835644a33203b0aef7443d
treef591a91748069d4db65aadc43858ba3651478647
parent196ad6043e9fe93c4ae3dac02b5c8fd337f58c2d
crypto: ecc - check for invalid values in the key verification test

Currently used scalar multiplication algorithm (Matthieu Rivain, 2011)
have invalid values for scalar == 1, n-1, and for regularized version
n-2, which was previously not checked. Verify that they are not used as
private keys.

Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/ecc.c