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 {