diff options
author | Meng Yu <yumeng18@huawei.com> | 2021-03-04 14:35:49 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2021-03-13 00:04:04 +1100 |
commit | 769c4dbcbe4ddce11ee356829ffa47652e8de1d2 (patch) | |
tree | eb166f2d5ff18bcf61470ff4d47bd1f5788da707 /crypto/ecc.c | |
parent | df19a2e0028e6d29fab77782b472de9cb98324bd (diff) | |
download | linux-crypto-769c4dbcbe4ddce11ee356829ffa47652e8de1d2.tar.gz linux-crypto-769c4dbcbe4ddce11ee356829ffa47652e8de1d2.zip |
crypto: ecc - add curve25519 params and expose them
1. Add curve 25519 parameters in 'crypto/ecc_curve_defs.h';
2. Add curve25519 interface 'ecc_get_curve25519_param' in
'include/crypto/ecc_curve.h', to make its parameters be
exposed to everyone in kernel tree.
Signed-off-by: Meng Yu <yumeng18@huawei.com>
Reviewed-by: Zaibo Xu <xuzaibo@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/ecc.c')
-rw-r--r-- | crypto/ecc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/ecc.c b/crypto/ecc.c index 4b55ad06..0798a183 100644 --- a/crypto/ecc.c +++ b/crypto/ecc.c @@ -43,6 +43,12 @@ typedef struct { u64 m_high; } uint128_t; +/* Returns curv25519 curve param */ +const struct ecc_curve *ecc_get_curve25519(void) +{ + return &ecc_25519; +} +EXPORT_SYMBOL(ecc_get_curve25519); const struct ecc_curve *ecc_get_curve(unsigned int curve_id) { |