shielded

Crates.ioshielded
lib.rsshielded
version0.1.2
sourcesrc
created_at2019-06-25 19:56:22.968677
updated_at2023-10-17 09:57:06.960365
descriptionShielded Memory. Memory protection from speculation and side-channel attacks like Spectre, Meltdown, Rowhammer and Rambleed.
homepagehttps://github.com/oherrala/shielded#readme
repositoryhttps://github.com/oherrala/shielded
max_upload_size
id143562
size17,112
Ossi Herrala (oherrala)

documentation

README

Shielded Memory

A crate drawing inspiration and parts of the documentation from OpenBSD's / OpenSSH's commit.

This crate implements a Shielded Memory providing protection at rest for secrets kept in memory against speculation and memory sidechannel attacks like Spectre, Meltdown, Rowhammer and Rambleed. The contents of the memory are encrypted when Shielded is constructed, then decrypted on demand and encrypted again after memory is no longer needed.

The memory protection is achieved by generating a 16kB secure random prekey which is then hashed with SHA512 to construct an encryption key for ChaCha20-Poly1305 cipher. This cipher is then used to encrypt the contents of memory in-place.

Attackers must recover the entire prekey with high accuracy before they can attempt to decrypt the shielded memory, but the current generation of attacks have bit error rates that, when applied cumulatively to the entire prekey, make this unlikely.

Commit count: 11

cargo fmt