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:
Michael Cardell Widerkrantz 2025-04-08 12:07:16 +02:00 committed by Mikael Ågren
parent f87a70b87a
commit dd641118b8
No known key found for this signature in database
GPG key ID: E02DA3D397792C46
8 changed files with 7 additions and 527 deletions

View file

@ -11,8 +11,8 @@
#include <tkey/lib.h>
#include <tkey/tk1_mem.h>
#include <tkey/led.h>
#include <blake2s/blake2s.h>
#include "blake2s/blake2s.h"
#include "partition_table.h"
#include "preload_app.h"
#include "proto.h"
@ -435,10 +435,8 @@ static void scramble_ram(void)
/* Computes the blake2s digest of the app loaded into RAM */
static int compute_app_digest(uint8_t *digest)
{
blake2s_ctx b2s_ctx = {0};
return blake2s(digest, 32, NULL, 0, (const void *)TK1_RAM_BASE,
*app_size, &b2s_ctx);
*app_size);
}
static enum state start_where(struct context *ctx)