openssl/crypto/sm2
Liu-Ermeng 170620675d fix sm2 encryption implementation bug.
According to the "GB/T 32918.4-2016"
section 6.1 encryption, step A5:
If result of the "KDF" is all zeros, we should go back to
the begin(step A1).

section 7.1 decryption, step B4:
If result of the "KDF" is all zeros, we should raise error and exit.

Signed-off-by: Liu-Ermeng <liuermeng2@huawei.com>

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23210)
2024-05-15 11:17:14 +02:00
..
build.info Add SM2 private key range validation 2021-01-08 23:59:02 +02:00
sm2_crypt.c fix sm2 encryption implementation bug. 2024-05-15 11:17:14 +02:00
sm2_err.c err: rename err_load_xxx_strings_int functions 2021-05-26 13:01:47 +10:00
sm2_key.c fix some code with obvious wrong coding style 2021-10-28 13:10:46 +10:00
sm2_sign.c Add check for public key presence on sm2 signing 2024-04-09 20:38:58 +02:00