ProtonMail / gopenpgp

A high-level OpenPGP library
https://gopenpgp.org
MIT License
1.04k stars 117 forks source link

Integration of HSM-Based Randomness with ProtonMail/gopenpgp: Feasibility and Implementation Guidance #291

Open sabouaram opened 1 month ago

sabouaram commented 1 month ago

Hello folks,

First of all, Thank you for creating and maintaining ProtonMail/gopenpgp it's a great package! I have a question regarding the configuration and customization of the package.

I'm interested in using a hardware security module (HSM) as the source of randomness for key generation. I'm wondering if it's possible to configure your package to use a custom io.Reader that pulls random data directly from an HSM. If this is feasible, could you please provide guidance on how we might integrate this with? Are there existing drivers or interfaces that would allow us to accomplish this, or would additional development be required?

Thank you again for your work on this project. I look forward to your insights.

Best regards,

lubux commented 1 month ago

Hi 👋,

You can achieve this with the lower-level library GopenPGP builds on. You can set the randomness source via the config here.

sabouaram commented 1 month ago

Ok thanks !