summaryrefslogtreecommitdiff
path: root/crypto/ecc.c
diff options
context:
space:
mode:
authorMeng Yu <yumeng18@huawei.com>2021-03-04 09:35:47 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2021-03-12 16:04:03 +0300
commit14bb76768275a056a91d249525a717019fd46663 (patch)
treea79d326c5fbe0c75a0c147bacb6a7805f25b3f4d /crypto/ecc.c
parent6763f5ea2d9ac9b5a34a374ee637b5e4f1f525dd (diff)
downloadlinux-14bb76768275a056a91d249525a717019fd46663.tar.xz
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.c5
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)
{