Skip to content

Memory security

GGP1 edited this page Jul 28, 2024 · 4 revisions

kure encrypts and keeps the master key in-memory in a protected buffer. When the key is required for an operation, it's decrypted and sent into the key derivation function. Right after this, the protected buffer is destroyed.

The library used to perform this operations is called memguard. Here are two interesting articles from its author talking about memory security and encrypting secrets in memory.

This makes it secure even when the user is into a session and the password resides in the memory.

Finally, it's important to mention that password comparisons are done in constant time to avoid side-channel attacks and that additional sensitive information is wiped after being used as well.

Clone this wiki locally