mirror of
https://github.com/polhenarejos/pico-hsm.git
synced 2026-02-07 11:08:24 +00:00
Upgrade to Pico Keys SDK 8.5
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
parent
868caff665
commit
0b18ab5e3d
2 changed files with 1 additions and 14 deletions
|
|
@ -1 +1 @@
|
|||
Subproject commit 42267cb237cb0a610ad7d3aa3feab9baa31a0fa1
|
||||
Subproject commit 61d4515eccf7add9d39689734eccd2cdf0aab83b
|
||||
|
|
@ -37,19 +37,6 @@ uint8_t mkek_mask[MKEK_KEY_SIZE];
|
|||
bool has_mkek_mask = false;
|
||||
uint8_t pending_save_dkek = 0xff;
|
||||
|
||||
#define POLY 0xedb88320
|
||||
|
||||
uint32_t crc32c(const uint8_t *buf, size_t len) {
|
||||
uint32_t crc = 0xffffffff;
|
||||
while (len--) {
|
||||
crc ^= *buf++;
|
||||
for (int k = 0; k < 8; k++) {
|
||||
crc = (crc >> 1) ^ (POLY & (0 - (crc & 1)));
|
||||
}
|
||||
}
|
||||
return ~crc;
|
||||
}
|
||||
|
||||
void mkek_masked(uint8_t *mkek, const uint8_t *mask) {
|
||||
if (mask) {
|
||||
for (int i = 0; i < MKEK_KEY_SIZE; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue