Commit beea2fa3 authored by Meng Yu's avatar Meng Yu Committed by Zheng Zengkai
Browse files

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

mainline inclusion
from mainline-v5.13-rc1
commit 0ae86992
category: feature
bugzilla: 173981
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0ae869926fab00b95709518d72cca2d50a29eccd



----------------------------------------------------------------------

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: default avatarMeng Yu <yumeng18@huawei.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarMingqiang Ling <lingmingqiang@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent a004c08c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment