libtom / libtomcrypt

LibTomCrypt is a fairly comprehensive, modular and portable cryptographic toolkit that provides developers with a vast array of well known published block ciphers, one-way hash functions, chaining modes, pseudo-random number generators, public key cryptography and a plethora of other routines.
https://www.libtom.net
Other
1.51k stars 449 forks source link

Added gcm_reset() to gcm_memory() to avoid key leakage #607

Closed Jinbosh8 closed 1 year ago

Jinbosh8 commented 1 year ago

In current design of GCM encryption scheme, the memory space for gcm_state only gets freed at the end of gcm_memory(), which might have a potential risk of key leakage during a crash. A call of gcm_reset() was added to prevent this leakage.

Checklist