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

@ -17,7 +17,6 @@ enum part_status part_get_status(void) {
}
void part_digest(struct partition_table *part_table, uint8_t *out_digest, size_t out_len) {
blake2s_ctx b2s_ctx = {0};
int blake2err = 0;
uint8_t key[16] = {
@ -25,7 +24,7 @@ void part_digest(struct partition_table *part_table, uint8_t *out_digest, size_t
0, 0, 0, 0, 0, 0, 0, 0,
};
blake2err = blake2s(out_digest, out_len,
key, sizeof(key), part_table, sizeof(struct partition_table), &b2s_ctx);
key, sizeof(key), part_table, sizeof(struct partition_table));
assert(blake2err == 0);
}