Skip to content

Commit e90890a

Browse files
authored
Merge pull request #325 from padelsbach/she-crypto-loadable-zero
Zero buffers at the end of wh_She_GenerateLoadableKey
2 parents 844bb81 + db01084 commit e90890a

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/wh_she_crypto.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,12 @@ int wh_She_GenerateLoadableKey(uint8_t keyId,
248248
messageFour, WH_SHE_M4_SZ, tmpKey, WH_SHE_KEY_SZ, NULL,
249249
INVALID_DEVID);
250250
}
251+
252+
/* Clear buffers which may contain sensitive data */
253+
memset(kdfInput, 0, sizeof(kdfInput));
254+
memset(cmacOutput, 0, sizeof(cmacOutput));
255+
memset(tmpKey, 0, sizeof(tmpKey));
256+
251257
return ret;
252258
}
253259

0 commit comments

Comments
 (0)