diff options
author | Nicola Tuveri <nic.tuv@gmail.com> | 2020-11-10 00:11:48 +0100 |
---|---|---|
committer | Nicola Tuveri <nic.tuv@gmail.com> | 2021-01-08 22:59:02 +0100 |
commit | 9e49aff2aaac4c42ea6c4078266947c75761276b (patch) | |
tree | 10b470a0ce3fcbc13bb26290003f10f0d5c60116 /crypto/sm2/build.info | |
parent | [test][pkey_check] Add invalid SM2 key test (diff) | |
download | openssl-9e49aff2aaac4c42ea6c4078266947c75761276b.tar.xz openssl-9e49aff2aaac4c42ea6c4078266947c75761276b.zip |
Add SM2 private key range validation
According to the relevant standards, the valid range for SM2 private
keys is [1, n-1), where n is the order of the curve generator.
For this reason we cannot reuse the EC validation function as it is, and
we introduce a new internal function `sm2_key_private_check()`.
Partially fixes https://github.com/openssl/openssl/issues/8435
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/13359)
Diffstat (limited to 'crypto/sm2/build.info')
-rw-r--r-- | crypto/sm2/build.info | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/sm2/build.info b/crypto/sm2/build.info index 402a76cc5d..a50d08d0bc 100644 --- a/crypto/sm2/build.info +++ b/crypto/sm2/build.info @@ -1,5 +1,5 @@ LIBS=../../libcrypto SOURCE[../../libcrypto]=\ - sm2_sign.c sm2_crypt.c sm2_err.c + sm2_sign.c sm2_crypt.c sm2_err.c sm2_key.c |