Expand description
Types types for dealing with (secret-) values
These types use type level coloring to make accidential leackage of secrets extra hard. Both Secret and Public own their data, but the memory backing Secret is special:
- as it is heap allocated, we can actively zeroize the memory before freeing it.
- guard pages before and after each allocation trap accidential sequential reads that creep towards our secrets
- the memory is mlocked, e.g. it is never swapped
Structs§
- Contains information in the form of a byte array that may be known to the public
- Store for a secret
- Pool that stores secret memory allocations
Functions§
- Writes the contents of an
&[u8]
as hexadecimal symbols to a std::fmt::Formatter