From 11d802143532ecea54f54955264a9ea82f188307 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Tue, 18 Jun 2019 23:58:59 -0700 Subject: [PATCH] sept: minor fix --- sept/sept-secondary/src/key_derivation.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sept/sept-secondary/src/key_derivation.c b/sept/sept-secondary/src/key_derivation.c index e81e52f38..3b87c5a98 100644 --- a/sept/sept-secondary/src/key_derivation.c +++ b/sept/sept-secondary/src/key_derivation.c @@ -52,9 +52,9 @@ void derive_keys(uint32_t version) { } void load_keys(const uint8_t *se_state) { - /* Clear keyslot 0xA. */ + /* Clear keyslots up to 0xA. */ for (size_t i = 0; i < 0xA; i++) { - clear_aes_keyslot(0xA); + clear_aes_keyslot(i); } /* Copy device keygen key out of state keyslot 0xA into keyslot 0xA. */ @@ -75,7 +75,7 @@ void load_keys(const uint8_t *se_state) { /* Copy device key out of state keyslot 0xF into keyslot 0xF. */ set_aes_keyslot(0xF, se_state + 0x30 + (0xF * 0x20), 0x10); - /* Set keyslot flags properly in preparation of derivation. */ + /* Set keyslot flags properly in preparation for secmon. */ set_aes_keyslot_flags(0xE, 0x15); set_aes_keyslot_flags(0xD, 0x15); }