Erlang has a crypto function that generates public private keys (documentation copied below). However, the documentation seems vague, and I cannot find any sample code that describes how to generate a common prime number or generator. Can someone post an example that generates a pair of public / private keys? Thanks in advance for your help!
dh_generate_key(DHParams) -> {PublicKey,PrivateKey} dh_generate_key(PrivateKey, DHParams) -> {PublicKey,PrivateKey}
Types: DHParameters = [P, G] P, G = Mpint Where P is the total total, and G is the common generator. PublicKey, PrivateKey = Mpint () Creates a Diffie-Hellman PublicKey and PrivateKey (if not specified).
erlang cryptography rsa public-key private-key
Nuvious
source share