Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Design prevents inextricable long-term keys #27

Open
nbraud opened this issue Jan 28, 2021 · 1 comment
Open

Design prevents inextricable long-term keys #27

nbraud opened this issue Jan 28, 2021 · 1 comment

Comments

@nbraud
Copy link

nbraud commented Jan 28, 2021

The design of the kms::KmsProvider trait means that users cannot keep the long-term secret out of system memory (the Ed25519 identity key, or whatever “seed” it is derived from) and can only bind the initial decryption of that secret to a local HSM or a remote KMS.

In other words, the current implementations assumes the key must be decrypted into system memory, and the delegation signed in software. This is not necessary: some commercially-available Hardware Security Modules can perform Ed25519 key generation and signing internally; the recent [Yubikey 5] is probably the most well-known and commonplace but other HSMs have supported Ed25519 for a while.

Would there be interest in implementing an API similar to RustCrypto's signature::Signer or signatory's, or using either of those abstractions outright, to support such usecases?

The main benefit is that a securely-implemented HSM can prevent the server's long-term identity key from being leaked, even if the host's operating system was compromised.

@int08h
Copy link
Owner

int08h commented Mar 28, 2021

the current implementations assumes the key must be decrypted into system memory, and the delegation signed in software

Very good point. The current design is entirely software oriented for the signing mechanics. Probably due to a lack of good options (like the Yubikey 5 or some of the other HSM-ish implementations you linked to) at the time.

I welcome an implementation that evolves the design to use hardware and/or other methods for delegating signing to secure elements. Securing the long-term secret was the original motivation for the kms functionality to begin with. 😉

P.S. Apologies for the lateness of my reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants