diff options
Diffstat (limited to 'core/lib')
-rw-r--r-- | core/lib/libtomcrypt/ecc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/lib/libtomcrypt/ecc.c b/core/lib/libtomcrypt/ecc.c index 8322ba2e..051da77e 100644 --- a/core/lib/libtomcrypt/ecc.c +++ b/core/lib/libtomcrypt/ecc.c @@ -124,6 +124,13 @@ static TEE_Result ecc_get_curve_info(uint32_t curve, uint32_t algo, (algo != TEE_ALG_ECDH_P521)) return TEE_ERROR_BAD_PARAMETERS; break; + case TEE_ECC_CURVE_SM2: + size_bits = 256; + size_bytes = 32; + name = "SM2"; + if ((algo != 0) && (algo != TEE_ALG_SM2_PKE)) + return TEE_ERROR_BAD_PARAMETERS; + break; default: return TEE_ERROR_NOT_SUPPORTED; } |