zeroize rsa->p,rsa->q on error
authorAlexandr Nedvedicky <sashan@openssl.org>
Fri, 10 May 2024 07:07:35 +0000 (09:07 +0200)
committerTomas Mraz <tomas@openssl.org>
Tue, 14 May 2024 13:55:41 +0000 (15:55 +0200)
commitfb323b27754089a34dc2a6a96a9b48cd4d0ee936
tree893d819db1fe72b925439e1282137f5841bcfc34
parentb6a5e801679663c13875cf6e18f475f8700d72a9
zeroize rsa->p,rsa->q on error

this is rquired by fipd-186-5 section A.1.6, step 7:
Zeroize the internally generated values that are not returned

In OpenSSL code we need to zero p, q members of rsa structure. The rsa
structure is provided by ossl_rsa_fips186_4_gen_prob_primes() caller.

The remaining values (variables) mentioned by standard are zeroed
already in functions we call from ossl_rsa_fips186_4_gen_prob_primes().

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24358)
crypto/rsa/rsa_sp800_56b_gen.c