Stronghold Enhancement Proposal: Hardware Secure Module Integration #414
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
-
Stronghold Enhancement Proposal: Hardware Secure Module Integration
Outline
Stronghold shall be extended to support secure hardware tokens as an alternative to purely software based memory protection. The integration shall be hardware agnostic, so virtually any hardware token can be used or the support for it can be easily shipped.
Motivation
Software based security only adds an additional layer of difficulty to attacks. If a system is compromised and a malicious actor gains privileged access, software based safeguards are not enough to protect valuable assets. Stronghold brings in a great deal of protecting memory, but relies on the stability of kernel based features.
Present day CPUs are partially equipped with hardware enclaves (like Intel TXT or ARM TrustZone) as well as hardware tokens as USB sticks are available from selected vendors. This gives Stronghold the opportunity to integrate support hardware secure modules (HSM).
The goal of this proposal shall describe how HSM can be integrated to store sensitive information, but still offering the flexibility to use software based memory enclaves.
Reference-Level Explanation
Architectural Overview
The proposed architecture distinguishes between hardware secure token support abstracted by the secure memory back-end, while providing the same functionality with software based solutions like the boxed types ( protected by libsodium ) as well as the non-contiguous types.
The HSM interface introduces one more level of abstraction by exposing common APIs to interact with HSM like PKCS#11 and API Libraries like PARSEC.
Accessing hardware secure modules is not directly exposed to the user, but can be configured in the upper layers of the Stronghold API.
Interface Definition
The interface is being split into low-level support for HSMs in general, and a more high level abstraction in how to integrate HSMs.
The most basic functionality of a HSM can be reflected by the following trait.
A listing of standard objects to interface with a HSM
HSM shall be accessible via the
HardwareSecureModule
trait and ressembles similar functionality from the pkcs11-crate for rust.Integration Layer
The integration layer represents the interface between the code, that will actually make use of an HSM or software based protection.
Here the
KeyProvider
is represented as atrait
, which should be implemented on specific hardware focusedKeyProvider
types. We also supply aDefaultKeyProvider
as a fallback to software based protection.Threat Modeling
For a-priori analysis of possible threat vectors we use the STRIDE methodology.
Drawbacks
HSM integration into Stronghold is to be seen as an additional layer of security and wide-spread token support through a standardized interface. As long as future HSM will support standard APIs like PKCS#11
Rationale and Alternatives
Extending Stronghold with HSM integration, while keeping the user interface modular will improve the usage and integration of Stronghold on a more secure level regarding tightened local security. It is virtually impossible to read out secret data from a HSM without physical accesss.
Prior art
The integration of HSM into Stronghold is currently a unique approach, combining software and hardware based protection for sensitive data. Similar works exists as Memguard, or PARSEC. Stronghold tries to combine both approaches.
Unresolved Questions
Future Possibilities
Support for Platform based security extensions like ARM TrustZone, Intel SGX, Apple Secure Enclave etc.
Resources
https://www.slideshare.net/BrandonArvanaghi/practical-trusted-platform-module-tpm2-programming
Standards And Integrations
TODO
Beta Was this translation helpful? Give feedback.
All reactions