Re: [PATCH] crypto: hisilicon/hpre - Add processing of src_data in 'CURVE25519'

2021-04-02 Thread Herbert Xu
On Sat, Mar 27, 2021 at 05:56:16PM +0800, Meng Yu wrote: > HPRE can only deal with src_data smaller than 'p' in 'CURVE25519' > algorithm, but 'rfc7748' says: > 'Implementations MUST accept non-canonical values and process them as > if they had been reduced modulo the field prime' > So we get its mo

[PATCH] crypto: hisilicon/hpre - Add processing of src_data in 'CURVE25519'

2021-03-27 Thread Meng Yu
HPRE can only deal with src_data smaller than 'p' in 'CURVE25519' algorithm, but 'rfc7748' says: 'Implementations MUST accept non-canonical values and process them as if they had been reduced modulo the field prime' So we get its modulus to p, and then deal it with HPRE. Signed-off-by: Meng Yu --