mirror of
https://github.com/openssl/openssl.git
synced 2024-12-21 06:09:35 +08:00
90409da6a5
Fixes #12405 Fixes #12377 Calling Init()/Update() and then Init()/Update() again gave a different result when using the same key and iv. Cipher modes that were using ctx->num were not resetting this value, this includes OFB, CFB & CTR. The fix is to reset this value during the ciphers einit() and dinit() methods. Most ciphers go thru a generic method so one line fixes most cases. Add test for calling EVP_EncryptInit()/EVP_EncryptUpdate() multiple times for all ciphers. Ciphers should return the same value for both updates. DES3-WRAP does not since it uses a random in the update. CCM modes currently also fail on the second update (This also happens in 1_1_1). Fix memory leak in AES_OCB cipher if EVP_EncryptInit is called multiple times. Fix AES_SIV cipher dup_ctx and init. Calling EVP_CIPHER_init multiple times resulted in a memory leak in the siv. Fixing this leak also showed that the dup ctx was not working for siv mode. Note: aes_siv_cleanup() can not be used by aes_siv_dupctx() as it clears data that is required for the decrypt (e.g the tag). Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/12413) |
||
---|---|---|
.. | ||
build.info | ||
cipher_aes_cbc_hmac_sha1_hw.c | ||
cipher_aes_cbc_hmac_sha256_hw.c | ||
cipher_aes_cbc_hmac_sha.c | ||
cipher_aes_cbc_hmac_sha.h | ||
cipher_aes_ccm_hw_aesni.inc | ||
cipher_aes_ccm_hw_s390x.inc | ||
cipher_aes_ccm_hw_t4.inc | ||
cipher_aes_ccm_hw.c | ||
cipher_aes_ccm.c | ||
cipher_aes_ccm.h | ||
cipher_aes_cts_fips.c | ||
cipher_aes_cts.h | ||
cipher_aes_cts.inc | ||
cipher_aes_gcm_hw_aesni.inc | ||
cipher_aes_gcm_hw_armv8.inc | ||
cipher_aes_gcm_hw_s390x.inc | ||
cipher_aes_gcm_hw_t4.inc | ||
cipher_aes_gcm_hw.c | ||
cipher_aes_gcm.c | ||
cipher_aes_gcm.h | ||
cipher_aes_hw_aesni.inc | ||
cipher_aes_hw_s390x.inc | ||
cipher_aes_hw_t4.inc | ||
cipher_aes_hw.c | ||
cipher_aes_ocb_hw.c | ||
cipher_aes_ocb.c | ||
cipher_aes_ocb.h | ||
cipher_aes_siv_hw.c | ||
cipher_aes_siv.c | ||
cipher_aes_siv.h | ||
cipher_aes_wrp.c | ||
cipher_aes_xts_fips.c | ||
cipher_aes_xts_hw.c | ||
cipher_aes_xts.c | ||
cipher_aes_xts.h | ||
cipher_aes.c | ||
cipher_aes.h | ||
cipher_aria_ccm_hw.c | ||
cipher_aria_ccm.c | ||
cipher_aria_ccm.h | ||
cipher_aria_gcm_hw.c | ||
cipher_aria_gcm.c | ||
cipher_aria_gcm.h | ||
cipher_aria_hw.c | ||
cipher_aria.c | ||
cipher_aria.h | ||
cipher_blowfish_hw.c | ||
cipher_blowfish.c | ||
cipher_blowfish.h | ||
cipher_camellia_hw_t4.inc | ||
cipher_camellia_hw.c | ||
cipher_camellia.c | ||
cipher_camellia.h | ||
cipher_cast5_hw.c | ||
cipher_cast5.c | ||
cipher_cast.h | ||
cipher_chacha20_hw.c | ||
cipher_chacha20_poly1305_hw.c | ||
cipher_chacha20_poly1305.c | ||
cipher_chacha20_poly1305.h | ||
cipher_chacha20.c | ||
cipher_chacha20.h | ||
cipher_des_hw.c | ||
cipher_des.c | ||
cipher_des.h | ||
cipher_desx_hw.c | ||
cipher_desx.c | ||
cipher_idea_hw.c | ||
cipher_idea.c | ||
cipher_idea.h | ||
cipher_null.c | ||
cipher_rc2_hw.c | ||
cipher_rc2.c | ||
cipher_rc2.h | ||
cipher_rc4_hmac_md5_hw.c | ||
cipher_rc4_hmac_md5.c | ||
cipher_rc4_hmac_md5.h | ||
cipher_rc4_hw.c | ||
cipher_rc4.c | ||
cipher_rc4.h | ||
cipher_rc5_hw.c | ||
cipher_rc5.c | ||
cipher_rc5.h | ||
cipher_seed_hw.c | ||
cipher_seed.c | ||
cipher_seed.h | ||
cipher_sm4_hw.c | ||
cipher_sm4.c | ||
cipher_sm4.h | ||
cipher_tdes_common.c | ||
cipher_tdes_default_hw.c | ||
cipher_tdes_default.c | ||
cipher_tdes_default.h | ||
cipher_tdes_hw.c | ||
cipher_tdes_wrap_hw.c | ||
cipher_tdes_wrap.c | ||
cipher_tdes.c | ||
cipher_tdes.h | ||
ciphercommon_block.c | ||
ciphercommon_ccm_hw.c | ||
ciphercommon_ccm.c | ||
ciphercommon_gcm_hw.c | ||
ciphercommon_gcm.c | ||
ciphercommon_hw.c | ||
ciphercommon_local.h | ||
ciphercommon.c |