summaryrefslogtreecommitdiff
path: root/lib/libcrypto/man
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2016-12-11 12:52:29 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2016-12-11 12:52:29 +0000
commit6db214bd216691aa5ef5801d3caeb526c609cafc (patch)
treeba3d8bf37cafacd6015e31f276c918066767ef26 /lib/libcrypto/man
parent3922ed286707b5265516619c0a5cb753d833bc03 (diff)
Merge all of rsa(3) into RSA_new(3).
In this case, keep the text about individual struct fields because it contains some actual information.
Diffstat (limited to 'lib/libcrypto/man')
-rw-r--r--lib/libcrypto/man/Makefile3
-rw-r--r--lib/libcrypto/man/RSA_new.391
-rw-r--r--lib/libcrypto/man/rsa.385
3 files changed, 86 insertions, 93 deletions
diff --git a/lib/libcrypto/man/Makefile b/lib/libcrypto/man/Makefile
index ca8fec58fdf..82d313af96c 100644
--- a/lib/libcrypto/man/Makefile
+++ b/lib/libcrypto/man/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.71 2016/12/10 22:53:31 schwarze Exp $
+# $OpenBSD: Makefile,v 1.72 2016/12/11 12:52:28 schwarze Exp $
.include <bsd.own.mk>
@@ -219,7 +219,6 @@ MAN= \
i2d_PKCS7_bio_stream.3 \
lh_new.3 \
lh_stats.3 \
- rsa.3 \
x509.3
all clean cleandir depend includes obj tags:
diff --git a/lib/libcrypto/man/RSA_new.3 b/lib/libcrypto/man/RSA_new.3
index 4ec89d259e0..9e43f03f1d0 100644
--- a/lib/libcrypto/man/RSA_new.3
+++ b/lib/libcrypto/man/RSA_new.3
@@ -1,8 +1,9 @@
-.\" $OpenBSD: RSA_new.3,v 1.3 2016/11/29 16:41:44 schwarze Exp $
-.\" OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
+.\" $OpenBSD: RSA_new.3,v 1.4 2016/12/11 12:52:28 schwarze Exp $
+.\" OpenSSL doc/man3/RSA_new.pod 99d63d46 Oct 26 13:56:48 2016 -0400
+.\" OpenSSL doc/crypto/rsa.pod 35d2e327 Jun 3 16:19:49 2016 -0400
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
-.\" Copyright (c) 2000, 2002 The OpenSSL Project. All rights reserved.
+.\" Copyright (c) 2000, 2002, 2016 The OpenSSL Project. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
@@ -48,7 +49,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: November 29 2016 $
+.Dd $Mdocdate: December 11 2016 $
.Dt RSA_NEW 3
.Os
.Sh NAME
@@ -64,6 +65,9 @@
.Fa "RSA *rsa"
.Fc
.Sh DESCRIPTION
+The RSA functions implement RSA public key encryption and signatures
+as defined in PKCS #1 v2.0 (RFC 2437).
+.Pp
.Fn RSA_new
allocates and initializes an
.Vt RSA
@@ -81,6 +85,62 @@ If
is a
.Dv NULL
pointer, no action occurs.
+.Pp
+The
+.Vt RSA
+structure consists of several
+.Vt BIGNUM
+components.
+It can contain public as well as private RSA keys:
+.Bd -literal
+typdef struct {
+ BIGNUM *n; // public modulus
+ BIGNUM *e; // public exponent
+ BIGNUM *d; // private exponent
+ BIGNUM *p; // secret prime factor
+ BIGNUM *q; // secret prime factor
+ BIGNUM *dmp1; // d mod (p-1)
+ BIGNUM *dmq1; // d mod (q-1)
+ BIGNUM *iqmp; // q^-1 mod p
+ // ...
+} RSA;
+.Ed
+.Pp
+In public keys, the private exponent
+.Fa d
+and the related secret values
+.Fa p , q , dmp1 , dmp2 ,
+and
+.Fa iqmp
+are
+.Dv NULL .
+.Pp
+.Fa p ,
+.Fa q ,
+.Fa dmp1 ,
+.Fa dmq1 ,
+and
+.Fa iqmp
+may be
+.Dv NULL
+in private keys, but the RSA operations are much faster when these
+values are available.
+.Pp
+Note that RSA keys may use non-standard
+.Vt RSA_METHOD
+implementations, either directly or by the use of
+.Vt ENGINE
+modules.
+In some cases (e.g. an
+.Vt ENGINE
+providing support for hardware-embedded keys), these
+.Vt BIGNUM
+values will not be used by the implementation or may be used for
+alternative data storage.
+For this reason, applications should generally avoid using
+.Vt RSA
+structure elements directly and instead use API functions to query
+or modify keys.
.Sh RETURN VALUES
If the allocation fails,
.Fn RSA_new
@@ -90,10 +150,29 @@ and sets an error code that can be obtained by
.Xr ERR_get_error 3 .
Otherwise it returns a pointer to the newly allocated structure.
.Sh SEE ALSO
+.Xr BN_new 3 ,
+.Xr d2i_RSAPublicKey 3 ,
+.Xr DH_new 3 ,
+.Xr DSA_new 3 ,
+.Xr engine 3 ,
.Xr ERR_get_error 3 ,
-.Xr rsa 3 ,
+.Xr EVP_PKEY_set1_RSA 3 ,
+.Xr RSA_blinding_on 3 ,
+.Xr RSA_check_key 3 ,
.Xr RSA_generate_key 3 ,
-.Xr RSA_new_method 3
+.Xr RSA_get_ex_new_index 3 ,
+.Xr RSA_padding_add_PKCS1_type_1 3 ,
+.Xr RSA_print 3 ,
+.Xr RSA_private_encrypt 3 ,
+.Xr RSA_public_encrypt 3 ,
+.Xr RSA_set_method 3 ,
+.Xr RSA_sign 3 ,
+.Xr RSA_sign_ASN1_OCTET_STRING 3 ,
+.Xr RSA_size 3
+.Sh STANDARDS
+SSL, PKCS #1 v2.0
+.Pp
+RSA was covered by a US patent which expired in September 2000.
.Sh HISTORY
.Fn RSA_new
and
diff --git a/lib/libcrypto/man/rsa.3 b/lib/libcrypto/man/rsa.3
deleted file mode 100644
index 7a7aa4a4d76..00000000000
--- a/lib/libcrypto/man/rsa.3
+++ /dev/null
@@ -1,85 +0,0 @@
-.\" $OpenBSD: rsa.3,v 1.6 2016/12/11 09:57:57 jmc Exp $
-.\"
-.Dd $Mdocdate: December 11 2016 $
-.Dt RSA 3
-.Os
-.Sh NAME
-.Nm rsa
-.Nd RSA public key cryptosystem
-.Sh SYNOPSIS
-.In openssl/rsa.h
-.Sh DESCRIPTION
-These functions implement RSA public key encryption and signatures as
-defined in PKCS #1 v2.0 [RFC 2437].
-.Pp
-The
-.Vt RSA
-structure consists of several BIGNUM components.
-It can contain public as well as private RSA keys:
-.Bd -literal
-typdef struct {
- BIGNUM *n; // public modulus
- BIGNUM *e; // public exponent
- BIGNUM *d; // private exponent
- BIGNUM *p; // secret prime factor
- BIGNUM *q; // secret prime factor
- BIGNUM *dmp1; // d mod (p-1)
- BIGNUM *dmq1; // d mod (q-1)
- BIGNUM *iqmp; // q^-1 mod p
- // ...
-} RSA;
-.Ed
-.Pp
-In public keys, the private exponent and the related secret values are
-.Dv NULL .
-.Pp
-.Fa p ,
-.Fa q ,
-.Fa dmp1 ,
-.Fa dmq1 ,
-and
-.Fa iqmp
-may be
-.Dv NULL
-in private keys, but the RSA operations are much faster when these
-values are available.
-.Pp
-Note that RSA keys may use non-standard
-.Vt RSA_METHOD
-implementations, either directly or by the use of
-.Vt ENGINE
-modules.
-In some cases (e.g. an
-.Vt ENGINE
-providing support for hardware-embedded keys), these
-.Vt BIGNUM
-values will not be used by the implementation or may be used for
-alternative data storage.
-For this reason, applications should generally avoid using
-.Vt RSA
-structure elements directly and instead use API functions to query
-or modify keys.
-.Sh SEE ALSO
-.Xr BN_new 3 ,
-.Xr d2i_RSAPublicKey 3 ,
-.Xr DH_new 3 ,
-.Xr DSA_new 3 ,
-.Xr engine 3 ,
-.Xr EVP_PKEY_set1_RSA 3 ,
-.Xr RSA_blinding_on 3 ,
-.Xr RSA_check_key 3 ,
-.Xr RSA_generate_key 3 ,
-.Xr RSA_get_ex_new_index 3 ,
-.Xr RSA_new 3 ,
-.Xr RSA_padding_add_PKCS1_type_1 3 ,
-.Xr RSA_print 3 ,
-.Xr RSA_private_encrypt 3 ,
-.Xr RSA_public_encrypt 3 ,
-.Xr RSA_set_method 3 ,
-.Xr RSA_sign 3 ,
-.Xr RSA_sign_ASN1_OCTET_STRING 3 ,
-.Xr RSA_size 3
-.Sh STANDARDS
-SSL, PKCS #1 v2.0
-.Pp
-RSA was covered by a US patent which expired in September 2000.