diff options
author | Meng Yu <yumeng18@huawei.com> | 2021-03-04 07:35:47 +0100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2021-03-12 14:04:03 +0100 |
commit | 14bb76768275a056a91d249525a717019fd46663 (patch) | |
tree | a79d326c5fbe0c75a0c147bacb6a7805f25b3f4d /crypto/ecc.c | |
parent | crypto: ecdh - move curve_id of ECDH from the key to algorithm name (diff) | |
download | linux-14bb76768275a056a91d249525a717019fd46663.tar.xz linux-14bb76768275a056a91d249525a717019fd46663.zip |
crypto: ecc - expose ecc curves
Move 'ecc_get_curve' to 'include/crypto/ecc_curve.h', so everyone
in kernel tree can easily get ecc curve params;
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 | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crypto/ecc.c b/crypto/ecc.c index c80aa25994a0..4b55ad062600 100644 --- a/crypto/ecc.c +++ b/crypto/ecc.c @@ -24,6 +24,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include <crypto/ecc_curve.h> #include <linux/module.h> #include <linux/random.h> #include <linux/slab.h> @@ -42,7 +43,8 @@ typedef struct { u64 m_high; } uint128_t; -static inline const struct ecc_curve *ecc_get_curve(unsigned int curve_id) + +const struct ecc_curve *ecc_get_curve(unsigned int curve_id) { switch (curve_id) { /* In FIPS mode only allow P256 and higher */ @@ -54,6 +56,7 @@ static inline const struct ecc_curve *ecc_get_curve(unsigned int curve_id) return NULL; } } +EXPORT_SYMBOL(ecc_get_curve); static u64 *ecc_alloc_digits_space(unsigned int ndigits) { |