You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 27, 2023. It is now read-only.
2. Personal HSMs (Yubikey, Ledger, smart card. Typically locally connected, single instance, simple integrated key management,
41
41
OS keyrings like Mac OS X Keychain, Gnome-Keyring, KWallet, Windows Credential Manager)
42
-
3. Enterprise HSMs (Thales, Iron Core Labs, nCipher, Utimaco, Securosys. May be network connected, multi-user and redundent configurations, complex key management with roles and access policies. Logging and auditing requirements)
May be network connected, multi-user and redundent configurations, complex key management with roles and access policies. Logging and auditing requirements)
Use of each different type of implementation comes with its own unique set of security questions. Superficially a user
47
48
may simply want to know **"is my crypto code running in a secure environment or hardware?"**, but for true security
@@ -56,7 +57,7 @@ it is necessary to verify many more of the details:
56
57
57
58
It is very important not to expose the details of the implementation through the API itself: it gets very messy, very quickly
58
59
to try to accommodate all the small details of each potential implementation in a generic API. Instead, it is preferable
59
-
to protide attestation commands that return provider-specific information which can be verified out-of-band.
60
+
to provide attestation commands that return provider-specific information which can be verified out-of-band.
60
61
61
62
## Why can't we just invisibly use the encalve we find on our system?
62
63
@@ -110,13 +111,14 @@ come in one of the following forms:
110
111
1. Networked (HTTP, ethernet, bluetooth)
111
112
112
113
Therefore initial piece of the interface is the connection. Given each provider has different connection methods,
113
-
the connection create process takes a configuration unique to that enclave.
114
+
the connection create process takes a configuration unique to that enclave. The goal of this API design is to minimize
115
+
changes to it to maintain compatibility.
114
116
115
117
We show all code samples written as Rust but can be adapted to other languages as desired.
116
118
117
119
Most hardware implementations will not allow key material to be passed through the API, even in encrypted form, so a system of external references is required that allows keys to be referenced in a way that supports:
118
120
1.**Consistency** - The same ID refers to the same key every time (according to the key management paradigm of the underlying hardware)
119
-
1.**Naming schemes** - Organizations often name their keys according to some formal naming scheme - such as **legal.europe.documetencryption.May2019-1**.
121
+
1.**Naming schemes** - Organizations often name their keys according to some formal naming scheme - such as **legal.europe.documentencryption.May2019-1**.
120
122
1.**Key blocks** - Some HSMs not only allow but actively require keys to be passed as formatted and encrypted keyblocks. In this case we not only need to support the simple data type of a binary key block but also (potentially) identify which KEK it's encrypted under.
121
123
122
124
In keeping with the drive for Ursa to be simple and hard to mess up, the proposal is to make KeyIDs in the Ursa interface be simple UTF-8 string names, and leave the underlying provider implementation to deal with the complexities of translation, key rollover, duplication and so on. Keyblocks will not be supported until really demanded.
@@ -130,7 +132,7 @@ pub trait EnclaveLike {
130
132
/// Terminate the current session/context
131
133
fnclose(self);
132
134
/// Get a list of capabilities supported by this enclave
Some capabilities offer multiple options like `DeriveDiffieHellman` which can be either PKCS#3 DHParameter structure
341
+
or Elliptic-Curve based.
342
+
343
+
This model allows the flexibility to add new operations and types without changing the APIs.
344
+
345
+
Each operation will return an Enclave Message that contains the results or an error upon failure. For example,
346
+
Encryption will return the ciphertext and possibly an authentication tag. Signing returns the signature.
226
347
227
348
# Drawbacks
228
349
[drawbacks]: #drawbacks
229
350
For developers intimately familiar with enclave programming, this API may be a more expensive/complicated scheme than
230
351
using the methods they are already used to using. Care must be taken so this scheme does not change frequency with each
231
352
enclave provider that is to be supported.
232
353
354
+
Another possibility is that this approach is too flexible and requires intimate knowledge about crypto algorithms.
355
+
To mitigate this, predefined ciphers can be created for end consumers like RSA-3072-PSS-SHA256 or
356
+
AES-256-GCM or AES-128-CBC-HMAC-SHA256 or XCHACHA20-POLY1305. This reduces algorithmic agility that is an inherent problem
357
+
with many cryptographic libraries.
358
+
233
359
# Rationale and alternatives
234
360
[alternatives]: #alternatives
235
361
236
-
237
-
238
362
# Prior art
239
363
[prior-art]: #prior-art
240
364
This provider model is extremely common in the crypto world with implementations like [PKCS11](http://docs.oasis-open.org/pkcs11/pkcs11-base/v2.40/os/pkcs11-base-v2.40-os.html)
0 commit comments