]> git.ipfire.org Git - thirdparty/openssl.git/commit - CHANGES.md
Add SM2 private key range validation
authorNicola Tuveri <nic.tuv@gmail.com>
Mon, 9 Nov 2020 23:11:48 +0000 (01:11 +0200)
committerNicola Tuveri <nic.tuv@gmail.com>
Fri, 8 Jan 2021 21:59:02 +0000 (23:59 +0200)
commit9e49aff2aaac4c42ea6c4078266947c75761276b
tree10b470a0ce3fcbc13bb26290003f10f0d5c60116
parent4554988e582e676a51c451de031939b45e60d00c
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)
CHANGES.md
crypto/err/openssl.txt
crypto/sm2/build.info
crypto/sm2/sm2_err.c
crypto/sm2/sm2_key.c [new file with mode: 0644]
include/crypto/sm2.h
include/crypto/sm2err.h
providers/implementations/keymgmt/build.info
providers/implementations/keymgmt/ec_kmgmt.c