From c9daee8fdb5739b42ea59fd7f94b642760219f74 Mon Sep 17 00:00:00 2001 From: rajnishprecogs <136425719+rajnishprecogs@users.noreply.github.com> Date: Mon, 19 May 2025 11:41:44 +0100 Subject: [PATCH] Update src/state_example/crypto/crypto_1.c in branch Precogs-fix-wjfrfz7v --- src/state_example/crypto/crypto_1.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/state_example/crypto/crypto_1.c b/src/state_example/crypto/crypto_1.c index f3f09ab..0e062f6 100644 --- a/src/state_example/crypto/crypto_1.c +++ b/src/state_example/crypto/crypto_1.c @@ -21,7 +21,9 @@ enum crypto_state crypto_get_state() { return current_state; } enum crypto_return_status crypto_set_key(crypto_key key) { if (crypto_verify_key(key) == valid_key_provided) { - current_key = key; + // Securely handle the key before assignment + crypto_key secure_key = secure_process_key(key); + current_key = secure_key; if (current_state == nonce_set) { current_state = nonce_and_key_set; } else {