From 24af5238589a2b0c4a153ead9e2f37506870f94c Mon Sep 17 00:00:00 2001 From: Wim Lewis Date: Sun, 8 Jan 2017 18:40:32 -0800 Subject: Add RSA key generation Support RSA key generation using generate_key(rsa, {bits, e}). This depends on the currently-experimental "dirty scheduler" support because key generation is a potentially lengthy process. --- lib/crypto/doc/src/crypto.xml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'lib/crypto/doc/src') diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index cbf141b3b0..102db8984a 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -298,22 +298,25 @@ generate_key(Type, Params) -> {PublicKey, PrivKeyOut} generate_key(Type, Params, PrivKeyIn) -> {PublicKey, PrivKeyOut} - Generates a public keys of type Type + Generates a public key of type Type - Type = dh | ecdh | srp - Params = dh_params() | ecdh_params() | SrpUserParams | SrpHostParams + Type = dh | ecdh | rsa | srp + Params = dh_params() | ecdh_params() | RsaParams | SrpUserParams | SrpHostParams + RsaParams = {ModulusSizeInBits::integer(), PublicExponent::key_value()} SrpUserParams = {user, [Generator::binary(), Prime::binary(), Version::atom()]} SrpHostParams = {host, [Verifier::binary(), Generator::binary(), Prime::binary(), Version::atom()]} - PublicKey = dh_public() | ecdh_public() | srp_public() + PublicKey = dh_public() | ecdh_public() | rsa_public() | srp_public() PrivKeyIn = undefined | dh_private() | ecdh_private() | srp_private() - PrivKeyOut = dh_private() | ecdh_private() | srp_private() + PrivKeyOut = dh_private() | ecdh_private() | rsa_private() | srp_private() -

Generates public keys of type Type. +

Generates a public key of type Type. See also public_key:generate_key/1 May throw exception low_entropy in case the random generator failed due to lack of secure "randomness".

+

RSA key generation is only available if the runtime was built with the + experimental dirty scheduler feature.

-- cgit v1.2.3