crypto: hisilicon/hpre - ensure private key less than n
authorWeili Qian <qianweili@huawei.com>
Fri, 7 Jul 2023 13:18:19 +0000 (21:18 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 20 Jul 2023 10:16:26 +0000 (22:16 +1200)
commitb0ab0797f7ab74bd6e78ddce7d2ea580e588c60d
tree4b544d65766792a5e087e09de93463b2be12b539
parentb3882fa2a10e28b7642d0c11fcc26caab90e0fa4
crypto: hisilicon/hpre - ensure private key less than n

The private key of the curve key size generated by stdrng, which maybe
not less than n. Therefore, the private key with the curve key size
minus 1 is generated to ensure that the private key is less than n.

Signed-off-by: Weili Qian <qianweili@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/hisilicon/hpre/hpre_crypto.c