Composite Key Integration #305
Unanswered
felsweg-iota
asked this question in
RFC
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
composite-key-integration
Summary
Stronghold
contains two major components that secure secret data: TheSnapshot
file and the entries inside the Vault. Both components and objects are encrypted and decrypted on demand. The composite key shall add an additional layer of security. It shall be used to encrypt and decrypt the keys for the Vault inside theKeyStore
itself, as well as have keys related toSnapshots
safely stored in a hybrid system consisting of one part in memory and another part on disk.Motivation
The
KeyStore
contains all keys for each secret inside the Vault. While the entries inside the Vault are secured by encryption and memory protection, the keys inside theKeyStore
are not. This RFC proposes the integration of a secure distribution of a composite key according to the Boojum procedure, providing an interface to transparently de-/encrypt theKeyStore
on demand, so that the keys themselves are exposed in plain memory only at a minimum.Guide-level explanation
We introduce a new type called
SecureKey
that takes a key for initialization. At a later point in time, the key can be reconstructed from two guarded memory parts fragmented across memory ( another proposal suggest to even distribute parts across memory and persistent storage; making use of non-contiguous memory types).The example above stores the
KeyStore
and a view of all vaults insideDbView
. Accessing and working with secrets is now transparently decrypted and encrypted, whenever a new entry is written into the vault, as well as executing procedures.Reference-level explanation
The
KeyStore
allocates at least 2 pages of memory in separate regions of memory, or even distributes the key partitions between memory and disk space. Ideally, the allocated regions themselves are non-contiguous, decreasing the attack surface and increases the amount of effort, that needs to be undertaken in order to reconstruct the key. TheKeyStore
suggest two method for constantly changing the contents of the key partitions, we call "shuffling": A time bases approach, and an event based approach. Both shall be discussed here:Time Based Shuffling
The key's partitions are being shuffled on constant time intervals in a separate thread.
pros:
con:
Event Based Shuffling
The key's partitions are being shuffled on non-deterministic events, like accessing a vault, or executing a procedure.
pros:
cons:
Drawbacks
Even though the key's partitions makes it harder to locate the key parts, the parts themselves remain in memory. Further memory protection is needed to avoid the possible to retrieve the key by memory dumps.
Rationale and alternatives
Unresolved questions
Guarded
-types for safe usage.Snapshot
file format?Future possibilities
Computing hardware may offer possibilities for open source hardware memory protections, where the key's partitions can be stored.
Beta Was this translation helpful? Give feedback.
All reactions