Erlang has a crypto function which generates public private keys (documentation copied below). However the documentation seems vague and I can't find any example code that describes how to generate the shared prime number or the generator. Can someone post an example that generates a public/private key pair? Thanks in advance for any 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 shared prime number and G is the shared generator. PublicKey, PrivateKey = Mpint() Generates a Diffie-Hellman PublicKey and PrivateKey (if not given).