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

Allow supplying external crypto.Signer for TLS signature #524

Open
salrashid123 opened this issue Feb 1, 2023 · 2 comments
Open

Allow supplying external crypto.Signer for TLS signature #524

salrashid123 opened this issue Feb 1, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@salrashid123
Copy link

salrashid123 commented Feb 1, 2023

Summary

Allow users to supply a crypto.Signer implementation instead of an actual private key to dtls.v2.Config.

This would allow an abstration allowing customers to use keys embedded into hardware (TPM) or KMS systems that implement that interface.

Motivation

Right now users have to supply the raw private key to Config but with TPM, KMS or PKCS-11 systems, the key is not extractactable but is 'available' for use sometimes through a a crypto.signer interface:

eg for TPM

with this feature, a client on a device can use its embedded key for dtls connections

Additional context

some additional refernces (untested at scale)

@daenney
Copy link
Member

daenney commented Feb 2, 2023

Hiya! Thanks for raising this. I think this makes a lot of sense. I'd like to retain the "pass key directly" functionality though since that's what everyone is already using and is a very common way to use the tls library from stdlib too.

But I'm happy for something like this to be added and be tried before falling back to whatever may have been passed in the config for the raw key.

@daenney daenney added the enhancement New feature or request label Feb 2, 2023
@salrashid123
Copy link
Author

salrashid123 commented Feb 2, 2023

got it, yeah adding the Signer capability is what i meant (vs breaking change)

fwiw, if i'm not mistaken, even the privatekeys implements Singer too so there maybe a path to converge/collapse internally


and fyi, atleast in go, the tls negotations uses SignatureAlgorithm: x509.SHA256WithRSAPSS for TLS but that'll be the responsiblity of the Signer thats passed (eg, for tpm singer i have (atleast for tls1.3 which i do't know even applies here)

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

No branches or pull requests

2 participants