hlandau / acmetool

:lock: acmetool, an automatic certificate acquisition tool for ACME (Let's Encrypt)
https://hlandau.github.io/acmetool/
2.05k stars 128 forks source link

PKCS #11 support request #341

Open vanrein opened 3 years ago

vanrein commented 3 years ago

Would you consider adding PKCS #11 support to acmetool? Though it would be possible to import the generated keys afterwards, it beats the purpose of using this private-key-protective API.

Apache supports use of PKCS #11 private keys and even certificates via PKCS #11, which generally is helpful to avoid that private keys are ever revealed. It remains an operational choice what implementation of the PKCS #11 API to use; it could be a software implementation, a simple USB token or a more advanced rack-mounted redundant key management solution for tens of thousands of dollars. With PKCS #11, key management quality is a choice.

This range of operational choices is why we use it in our TLS Pool project, which additionally separates TLS handling from the application process via file descriptor passing and reduces TLS implementation to one API call, fd = starttls_client (fd, ...). We intend to use that in security/privacy projects like Keyful Identity Protocol and Realm Crossover for Kerberos.

Just ask if you want to learn more about PKCS #11. These are a few speciication links that you might find interesting:

vanrein commented 3 years ago

I can see two ways of adding PKCS #11 support that might work without building it into acmetool.

If my suspicion is correct, then PKCS #11 could be "hacked in" with the target file's request.key but it feels that would be blasphemic, and possibly unstable. Tool integration, even as lightweight as above, is preferred. Or is it merely a matter of documenting this use case? I am unsure.