From ff8fc212301b3322f6ce1c45aed9f2de19e570ca Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 6 Jul 2017 15:04:13 +0200 Subject: public_key: doc for new sign/4 and verify/5 --- lib/public_key/doc/src/public_key.xml | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'lib/public_key/doc/src') diff --git a/lib/public_key/doc/src/public_key.xml b/lib/public_key/doc/src/public_key.xml index 04966ffb9c..35f9e86cad 100644 --- a/lib/public_key/doc/src/public_key.xml +++ b/lib/public_key/doc/src/public_key.xml @@ -129,18 +129,31 @@

| 'rsa_no_padding'

+ public_sign_options() = +

[{rsa_pad, rsa_sign_padding()} | {rsa_pss_saltlen, integer()}]

+ + rsa_sign_padding() = + +

'rsa_pkcs1_padding'

+

| 'rsa_pkcs1_pss_padding'

+
+ digest_type() =

Union of rsa_digest_type(), dss_digest_type(), and ecdsa_digest_type().

rsa_digest_type() = -

'md5' | 'sha' | 'sha224' | 'sha256' | 'sha384' | 'sha512'

+

'md5' | 'ripemd160' | 'sha' | 'sha224' | 'sha256' | 'sha384' | 'sha512'

dss_digest_type() = -

'sha'

+

'sha' | 'sha224' | 'sha256' | 'sha384' | 'sha512'

+

Note that the actual supported dss_digest_type depends on the underlying crypto library. + In OpenSSL version >= 1.0.1 the listed digest are supported, while in 1.0.0 only + sha, sha224 and sha256 are supported. In version 0.9.8 only sha is supported.

+
ecdsa_digest_type() = -

'sha'| 'sha224' | 'sha256' | 'sha384' | 'sha512'

+

'sha' | 'sha224' | 'sha256' | 'sha384' | 'sha512'

crl_reason() = @@ -795,6 +808,7 @@ fun(#'DistributionPoint'{}, #'CertificateList'{}, sign(Msg, DigestType, Key) -> binary() + sign(Msg, DigestType, Key, Options) -> binary() Creates a digital signature. Msg = binary() | {digest,binary()} @@ -803,6 +817,7 @@ fun(#'DistributionPoint'{}, #'CertificateList'{}, digest. DigestType = rsa_digest_type() | dss_digest_type() | ecdsa_digest_type() Key = rsa_private_key() | dsa_private_key() | ec_private_key() + Options = public_sign_options()

Creates a digital signature.

@@ -895,6 +910,7 @@ fun(#'DistributionPoint'{}, #'CertificateList'{}, verify(Msg, DigestType, Signature, Key) -> boolean() + verify(Msg, DigestType, Signature, Key, Options) -> boolean() Verifies a digital signature. Msg = binary() | {digest,binary()} @@ -903,6 +919,7 @@ fun(#'DistributionPoint'{}, #'CertificateList'{}, DigestType = rsa_digest_type() | dss_digest_type() | ecdsa_digest_type() Signature = binary() Key = rsa_public_key() | dsa_public_key() | ec_public_key() + Options = public_sign_options()

Verifies a digital signature.

-- cgit v1.2.3