From f9578f8971fe7b59744216661dbb9797dc8455f7 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Fri, 27 Oct 2017 16:06:13 +0200 Subject: crypto: Documentation for pkey engine loading --- lib/crypto/doc/src/crypto.xml | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index c0f85945a7..36295c84cd 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -134,6 +134,23 @@

Note that the sect curves are GF2m (characteristic two) curves and are only supported if the underlying OpenSSL has support for them. See also crypto:supports/0 +

+ + engine_key_ref() = #{engine := engine_ref(), + key_id := key_id(), + password => password()} + + engine_key_ref() = term() +

The result of a call to engine_load/3. +

+ + key_id() = string() | binary() +

Identifies the key to be used. The format depends on the loaded engine. It is passed to + the ENGINE_load_(private|public)_key functions in libcrypto. +

+ + password() = string() | binary() +

The key's password

stream_cipher() = rc4 | aes_ctr @@ -584,7 +601,7 @@ Type = rsa CipherText = binary() - PrivateKey = rsa_private() + PrivateKey = rsa_private() | engine_key_ref() Padding = rsa_pkcs1_padding | rsa_pkcs1_oaep_padding | rsa_no_padding PlainText = binary() @@ -609,7 +626,7 @@ than byte_size(N)-11 if rsa_pkcs1_padding is used, and byte_size(N) if rsa_no_padding is used, where N is public modulus of the RSA key. - PrivateKey = rsa_private() + PrivateKey = rsa_private() | engine_key_ref() Padding = rsa_pkcs1_padding | rsa_no_padding CipherText = binary() @@ -628,7 +645,7 @@ Type = rsa CipherText = binary() - PublicKey = rsa_public() + PublicKey = rsa_public() | engine_key_ref() Padding = rsa_pkcs1_padding | rsa_no_padding PlainText = binary() @@ -653,7 +670,7 @@ than byte_size(N)-11 if rsa_pkcs1_padding is used, and byte_size(N) if rsa_no_padding is used, where N is public modulus of the RSA key. - PublicKey = rsa_public() + PublicKey = rsa_public() | engine_key_ref() Padding = rsa_pkcs1_padding | rsa_pkcs1_oaep_padding | rsa_no_padding CipherText = binary() @@ -706,7 +723,7 @@ signed or it is the hashed value of "cleartext" i.e. the digest (plaintext). DigestType = rsa_digest_type() | dss_digest_type() | ecdsa_digest_type() - Key = rsa_private() | dss_private() | [ecdh_private(),ecdh_params()] + Key = rsa_private() | dss_private() | [ecdh_private(),ecdh_params()] | engine_key_ref() Options = sign_options() @@ -897,7 +914,7 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ or it is the hashed value of "cleartext" i.e. the digest (plaintext). DigestType = rsa_digest_type() | dss_digest_type() | ecdsa_digest_type() Signature = binary() - Key = rsa_public() | dss_public() | [ecdh_public(),ecdh_params()] + Key = rsa_public() | dss_public() | [ecdh_public(),ecdh_params()] | engine_key_ref() Options = sign_options() -- cgit v1.2.3