Skip to main content

Module generate

Module generate 

Source
Expand description

Generate prime components for the RSA Private Key

Structsยง

RsaPrivateKeyComponents
Raw generated components, which must be subsequently validated by the private key constructor.

Functionsยง

generate_multi_prime_key_with_exp ๐Ÿ”’
Generates a multi-prime RSA keypair of the given bit size, public exponent, and the given random source, as suggested in 1. Although the public keys are compatible (actually, indistinguishable) from the 2-prime case, the private keys are not. Thus it may not be possible to export multi-prime private keys in certain formats or to subsequently import them into other code.
generate_prime_with_rng ๐Ÿ”’
Generate an odd prime with its top two bits set.