mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-08-08 06:32:25 -04:00
fw: Use BLAKE2s functions from tkey-libs
Instead of using the firmware's own copy of BLAKE2s functions, use the functions from tkey-libs.
This commit is contained in:
parent
81f3195592
commit
1ff6e0262f
6 changed files with 6 additions and 525 deletions
|
@ -279,7 +279,6 @@ static enum state loading_commands(const struct frame_header *hdr,
|
|||
ctx->left -= nbytes;
|
||||
|
||||
if (ctx->left == 0) {
|
||||
blake2s_ctx b2s_ctx = {0};
|
||||
int blake2err = 0;
|
||||
|
||||
debug_puts("Fully loaded ");
|
||||
|
@ -288,9 +287,9 @@ static enum state loading_commands(const struct frame_header *hdr,
|
|||
|
||||
// Compute Blake2S digest of the app,
|
||||
// storing it for FW_STATE_RUN
|
||||
blake2err = blake2s(&ctx->digest, 32, NULL, 0,
|
||||
(const void *)TK1_RAM_BASE,
|
||||
*app_size, &b2s_ctx);
|
||||
blake2err =
|
||||
blake2s(&ctx->digest, 32, NULL, 0,
|
||||
(const void *)TK1_RAM_BASE, *app_size);
|
||||
assert(blake2err == 0);
|
||||
print_digest(ctx->digest);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue