mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-05-07 16:34:59 -04:00
fw/tools: Change partition checksum to vanilla BLAKE2s
Instead of using 16 byte BLAKE2s with a dummy key, use plain vanilla unkeyed 32 byte BLAKE2s for partition checksum. Co-authored-by: Mikael Ågren <mikael@tillitis.se>
This commit is contained in:
parent
66ea8df1d9
commit
3e8ff9671c
3 changed files with 5 additions and 24 deletions
|
@ -27,14 +27,10 @@ static void part_checksum(struct partition_table *part_table,
|
|||
{
|
||||
int blake2err = 0;
|
||||
|
||||
uint8_t key[16] = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
};
|
||||
|
||||
assert(part_table != NULL);
|
||||
assert(out_digest != NULL);
|
||||
|
||||
blake2err = blake2s(out_digest, out_len, key, sizeof(key), part_table,
|
||||
blake2err = blake2s(out_digest, out_len, NULL, 0, part_table,
|
||||
sizeof(struct partition_table));
|
||||
|
||||
assert(blake2err == 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue