mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2024-12-25 07:29:25 -05:00
fw: Update comments
This commit is contained in:
parent
00d806df10
commit
226bcbaed1
@ -125,7 +125,8 @@ static void compute_cdi(const uint8_t digest[32], const uint8_t use_uss,
|
|||||||
// Write hashed result to Compound Device Identity (CDI)
|
// Write hashed result to Compound Device Identity (CDI)
|
||||||
blake2s_final(&secure_ctx, local_cdi);
|
blake2s_final(&secure_ctx, local_cdi);
|
||||||
|
|
||||||
// Clear secure_ctx of any residue
|
// Clear secure_ctx of any residue of UDS. Don't want to keep
|
||||||
|
// that for long even though fw_ram is cleared later.
|
||||||
memset(&secure_ctx, 0, sizeof(secure_ctx));
|
memset(&secure_ctx, 0, sizeof(secure_ctx));
|
||||||
|
|
||||||
// CDI only word writable
|
// CDI only word writable
|
||||||
@ -379,7 +380,7 @@ static void scramble_ram()
|
|||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
struct context ctx = {0};
|
struct context ctx = {0};
|
||||||
struct frame_header hdr; // Used in both directions
|
struct frame_header hdr;
|
||||||
uint8_t cmd[CMDLEN_MAXBYTES];
|
uint8_t cmd[CMDLEN_MAXBYTES];
|
||||||
enum state state = FW_STATE_INITIAL;
|
enum state state = FW_STATE_INITIAL;
|
||||||
|
|
||||||
@ -414,7 +415,6 @@ int main()
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case FW_STATE_RUN:
|
case FW_STATE_RUN:
|
||||||
htif_puts("state_run\n");
|
|
||||||
run(&ctx);
|
run(&ctx);
|
||||||
break; // This is never reached!
|
break; // This is never reached!
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user