Skip to content

Commit 10c0af4

Browse files
committed
Adding vector_zero
1 parent 8f8387e commit 10c0af4

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

upstream_patches/0019-zeroization-of-ml_dsa_key.patch

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,15 @@ index 87613c937d..0c6a4e3a6c 100644
1111
+ OPENSSL_cleanse(key->priv_encoding, sizeof(key->priv_encoding));
1212
+ OPENSSL_cleanse(key->seed, seed_len);
1313
key->priv_encoding = key->seed = NULL;
14-
@@ -160,3 +160,3 @@ void ossl_ml_dsa_key_reset(ML_DSA_KEY *key)
14+
@@ -160,5 +160,6 @@ void ossl_ml_dsa_key_reset(ML_DSA_KEY *key)
15+
/* The |t1| vector is public and allocated separately */
16+
+ vector_zero(&key->t1);
17+
vector_free(&key->t1);
1518
OPENSSL_cleanse(key->K, sizeof(key->K));
1619
- OPENSSL_free(key->pub_encoding);
1720
+ OPENSSL_clear_free(key->pub_encoding, sizeof(key->pub_encoding));
1821
key->pub_encoding = NULL;
19-
@@ -167,2 +167,6 @@ void ossl_ml_dsa_key_reset(ML_DSA_KEY *key)
22+
@@ -168,2 +168,6 @@ void ossl_ml_dsa_key_reset(ML_DSA_KEY *key)
2023
OPENSSL_clear_free(key->seed, ML_DSA_SEED_BYTES);
2124
+ if (key->rho != NULL)
2225
+ OPENSSL_cleanse(key->rho, sizeof(key->rho));

0 commit comments

Comments
 (0)