mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-08-08 14:42:19 -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
f87a70b87a
commit
dd641118b8
8 changed files with 7 additions and 527 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue