Skip to content

crypto: upcoming Go 1.26 changes to random number sources are problematic for hardware-generated randomness #76856

@sgmiller

Description

@sgmiller

In Hashicorp Vault, we have customers that demand key generation proceed from hardware generated random number generators in PKCS#11 HSM devices. We had satisfied this by allowing them to choose this mode, and we'd supply the resultant entropy to the rand io.Reader on the various GenerateKey etc functions.

The upcoming Go 1.26 changes remove that possibility without the env var override that promises to be temporary. Our only alternative would be to fork the key generation routines to restore configurable entropy sources.

The upcoming release provides a way to supply randomness during testing, but that is frankly not the only use case for those parameters. For example, we also use a seeded DRBG during RSA prime generation for efficiency when using HSM sources as they have a limited entropy generation rate which can cause prime generation to take minutes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ExpertNeededNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions