summaryrefslogtreecommitdiffstats
path: root/crypto/ec/ec_curve.c
diff options
context:
space:
mode:
authorXu Yizhou <xuyizhou1@huawei.com>2023-08-23 17:30:09 +0800
committerTomas Mraz <tomas@openssl.org>2023-08-24 14:57:35 +0200
commit6399d7856c75abde9ed23782d10960013de03810 (patch)
treed45527466a10cd60f73d5da80752ba9086665bf4 /crypto/ec/ec_curve.c
parentce7a9e23fb1ea249e08c3dfa9c9f701a701f2719 (diff)
Optimize SM2 on aarch64
Signed-off-by: Xu Yizhou <xuyizhou1@huawei.com> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/20754)
Diffstat (limited to 'crypto/ec/ec_curve.c')
-rw-r--r--crypto/ec/ec_curve.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/crypto/ec/ec_curve.c b/crypto/ec/ec_curve.c
index 724525a479..d703d16b3c 100644
--- a/crypto/ec/ec_curve.c
+++ b/crypto/ec/ec_curve.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2021 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2002-2023 The OpenSSL Project Authors. All Rights Reserved.
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
@@ -3111,8 +3111,13 @@ static const ec_list_element curve_list[] = {
"RFC 5639 curve over a 512 bit prime field"},
{NID_brainpoolP512t1, &_EC_brainpoolP512t1.h, 0,
"RFC 5639 curve over a 512 bit prime field"},
-# ifndef OPENSSL_NO_SM2
- {NID_sm2, &_EC_sm2p256v1.h, 0,
+#ifndef OPENSSL_NO_SM2
+ {NID_sm2, &_EC_sm2p256v1.h,
+# ifdef ECP_SM2P256_ASM
+ EC_GFp_sm2p256_method,
+# else
+ 0,
+# endif
"SM2 curve over a 256 bit prime field"},
# endif
};