summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/rsa.3
diff options
context:
space:
mode:
authorschwarze <>2016-12-11 12:52:28 +0000
committerschwarze <>2016-12-11 12:52:28 +0000
commit11d403ec421a1cca33b5766d8b16528cfce5625c (patch)
treed4581068f1fca91b79be795008ae6440474cd96b /src/lib/libcrypto/man/rsa.3
parent0864d137aaead93392c7bca5e264c42d8aa291e3 (diff)
downloadopenbsd-11d403ec421a1cca33b5766d8b16528cfce5625c.tar.gz
openbsd-11d403ec421a1cca33b5766d8b16528cfce5625c.tar.bz2
openbsd-11d403ec421a1cca33b5766d8b16528cfce5625c.zip
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 'src/lib/libcrypto/man/rsa.3')
-rw-r--r--src/lib/libcrypto/man/rsa.385
1 files changed, 0 insertions, 85 deletions
diff --git a/src/lib/libcrypto/man/rsa.3 b/src/lib/libcrypto/man/rsa.3
deleted file mode 100644
index 7a7aa4a4d7..0000000000
--- a/src/lib/libcrypto/man/rsa.3
+++ /dev/null
@@ -1,85 +0,0 @@
1.\" $OpenBSD: rsa.3,v 1.6 2016/12/11 09:57:57 jmc Exp $
2.\"
3.Dd $Mdocdate: December 11 2016 $
4.Dt RSA 3
5.Os
6.Sh NAME
7.Nm rsa
8.Nd RSA public key cryptosystem
9.Sh SYNOPSIS
10.In openssl/rsa.h
11.Sh DESCRIPTION
12These functions implement RSA public key encryption and signatures as
13defined in PKCS #1 v2.0 [RFC 2437].
14.Pp
15The
16.Vt RSA
17structure consists of several BIGNUM components.
18It can contain public as well as private RSA keys:
19.Bd -literal
20typdef struct {
21 BIGNUM *n; // public modulus
22 BIGNUM *e; // public exponent
23 BIGNUM *d; // private exponent
24 BIGNUM *p; // secret prime factor
25 BIGNUM *q; // secret prime factor
26 BIGNUM *dmp1; // d mod (p-1)
27 BIGNUM *dmq1; // d mod (q-1)
28 BIGNUM *iqmp; // q^-1 mod p
29 // ...
30} RSA;
31.Ed
32.Pp
33In public keys, the private exponent and the related secret values are
34.Dv NULL .
35.Pp
36.Fa p ,
37.Fa q ,
38.Fa dmp1 ,
39.Fa dmq1 ,
40and
41.Fa iqmp
42may be
43.Dv NULL
44in private keys, but the RSA operations are much faster when these
45values are available.
46.Pp
47Note that RSA keys may use non-standard
48.Vt RSA_METHOD
49implementations, either directly or by the use of
50.Vt ENGINE
51modules.
52In some cases (e.g. an
53.Vt ENGINE
54providing support for hardware-embedded keys), these
55.Vt BIGNUM
56values will not be used by the implementation or may be used for
57alternative data storage.
58For this reason, applications should generally avoid using
59.Vt RSA
60structure elements directly and instead use API functions to query
61or modify keys.
62.Sh SEE ALSO
63.Xr BN_new 3 ,
64.Xr d2i_RSAPublicKey 3 ,
65.Xr DH_new 3 ,
66.Xr DSA_new 3 ,
67.Xr engine 3 ,
68.Xr EVP_PKEY_set1_RSA 3 ,
69.Xr RSA_blinding_on 3 ,
70.Xr RSA_check_key 3 ,
71.Xr RSA_generate_key 3 ,
72.Xr RSA_get_ex_new_index 3 ,
73.Xr RSA_new 3 ,
74.Xr RSA_padding_add_PKCS1_type_1 3 ,
75.Xr RSA_print 3 ,
76.Xr RSA_private_encrypt 3 ,
77.Xr RSA_public_encrypt 3 ,
78.Xr RSA_set_method 3 ,
79.Xr RSA_sign 3 ,
80.Xr RSA_sign_ASN1_OCTET_STRING 3 ,
81.Xr RSA_size 3
82.Sh STANDARDS
83SSL, PKCS #1 v2.0
84.Pp
85RSA was covered by a US patent which expired in September 2000.