diff options
author | schwarze <> | 2016-11-03 09:35:34 +0000 |
---|---|---|
committer | schwarze <> | 2016-11-03 09:35:34 +0000 |
commit | 4d607f17ea3eb38ed9f7703afd423f6055c686d4 (patch) | |
tree | 58d82d0d7f6aeee380eaadbcfaa231ecbe6b90a0 /src/lib/libcrypto/man/evp.3 | |
parent | cf67afe5881727d740e9f6c772aa478123f7d698 (diff) | |
download | openbsd-4d607f17ea3eb38ed9f7703afd423f6055c686d4.tar.gz openbsd-4d607f17ea3eb38ed9f7703afd423f6055c686d4.tar.bz2 openbsd-4d607f17ea3eb38ed9f7703afd423f6055c686d4.zip |
convert EVP manuals from pod to mdoc
Diffstat (limited to 'src/lib/libcrypto/man/evp.3')
-rw-r--r-- | src/lib/libcrypto/man/evp.3 | 151 |
1 files changed, 151 insertions, 0 deletions
diff --git a/src/lib/libcrypto/man/evp.3 b/src/lib/libcrypto/man/evp.3 new file mode 100644 index 0000000000..7bf7dfec81 --- /dev/null +++ b/src/lib/libcrypto/man/evp.3 | |||
@@ -0,0 +1,151 @@ | |||
1 | .Dd $Mdocdate: November 3 2016 $ | ||
2 | .Dt EVP 3 | ||
3 | .Os | ||
4 | .Sh NAME | ||
5 | .Nm evp | ||
6 | .Nd high-level cryptographic functions | ||
7 | .Sh SYNOPSIS | ||
8 | .In openssl/evp.h | ||
9 | .Sh DESCRIPTION | ||
10 | The EVP library provides a high-level interface to cryptographic | ||
11 | functions. | ||
12 | .Pp | ||
13 | .Xr EVP_SealInit 3 | ||
14 | and | ||
15 | .Xr EVP_OpenInit 3 | ||
16 | provide public key encryption and decryption to implement digital | ||
17 | "envelopes". | ||
18 | .Pp | ||
19 | The | ||
20 | .Xr EVP_DigestSignInit 3 | ||
21 | and | ||
22 | .Xr EVP_DigestVerifyInit 3 | ||
23 | functions implement digital signatures and Message Authentication Codes | ||
24 | (MACs). | ||
25 | Also see the older | ||
26 | .Xr EVP_SignInit 3 | ||
27 | and | ||
28 | .Xr EVP_VerifyInit 3 | ||
29 | functions. | ||
30 | .Pp | ||
31 | Symmetric encryption is available with the | ||
32 | .Xr EVP_EncryptInit 3 | ||
33 | functions. | ||
34 | The | ||
35 | .Xr EVP_DigestInit 3 | ||
36 | functions provide message digests. | ||
37 | .Pp | ||
38 | Authenticated encryption with additional data (AEAD) is available with | ||
39 | the | ||
40 | .Xr EVP_AEAD_CTX_init 3 | ||
41 | functions. | ||
42 | .Pp | ||
43 | The | ||
44 | .Fn EVP_PKEY_* | ||
45 | functions provide a high level interface to asymmetric algorithms. | ||
46 | To create a new | ||
47 | .Vt EVP_PKEY , | ||
48 | see | ||
49 | .Xr EVP_PKEY_new 3 . | ||
50 | .Vt EVP_PKEY Ns s | ||
51 | can be associated with a private key of a particular algorithm | ||
52 | by using the functions described in the | ||
53 | .Xr EVP_PKEY_set1_RSA 3 | ||
54 | page, or new keys can be generated using | ||
55 | .Xr EVP_PKEY_keygen 3 . | ||
56 | .Vt EVP_PKEY Ns s | ||
57 | can be compared using | ||
58 | .Xr EVP_PKEY_cmp 3 | ||
59 | or printed using | ||
60 | .Xr EVP_PKEY_print_private 3 . | ||
61 | .Pp | ||
62 | The | ||
63 | .Fn EVP_PKEY_* | ||
64 | functions support the full range of asymmetric algorithm operations: | ||
65 | .Bl -bullet | ||
66 | .It | ||
67 | For key agreement, see | ||
68 | .Xr EVP_PKEY_derive 3 . | ||
69 | .It | ||
70 | For signing and verifying, see | ||
71 | .Xr EVP_PKEY_sign 3 , | ||
72 | .Xr EVP_PKEY_verify 3 , | ||
73 | and | ||
74 | .Xr EVP_PKEY_verify_recover 3 . | ||
75 | However, note that these functions do not perform a digest of the | ||
76 | data to be signed. | ||
77 | Therefore normally you would use the | ||
78 | .Xr EVP_DigestSignInit 3 | ||
79 | functions for this purpose. | ||
80 | .It | ||
81 | For encryption and decryption see | ||
82 | .Xr EVP_PKEY_encrypt 3 | ||
83 | and | ||
84 | .Xr EVP_PKEY_decrypt 3 , | ||
85 | respectively. | ||
86 | However, note that these functions perform encryption and decryption only. | ||
87 | As public key encryption is an expensive operation, normally you | ||
88 | would wrap an encrypted message in a digital envelope using the | ||
89 | .Xr EVP_SealInit 3 | ||
90 | and | ||
91 | .Xr EVP_OpenInit 3 | ||
92 | functions. | ||
93 | .El | ||
94 | .Pp | ||
95 | The | ||
96 | .Xr EVP_BytesToKey 3 | ||
97 | function provides some limited support for password based encryption. | ||
98 | Careful selection of the parameters will provide a PKCS#5 PBKDF1 | ||
99 | compatible implementation. | ||
100 | However, new applications should typically not use this (preferring, for | ||
101 | example, PBKDF2 from PCKS#5). | ||
102 | .Pp | ||
103 | Algorithms are loaded with | ||
104 | .Xr OpenSSL_add_all_algorithms 3 . | ||
105 | .Pp | ||
106 | All the symmetric algorithms (ciphers), digests and asymmetric | ||
107 | algorithms (public key algorithms) can be replaced by | ||
108 | .Xr engine 3 | ||
109 | modules providing alternative implementations. | ||
110 | If | ||
111 | .Vt ENGINE | ||
112 | implementations of ciphers or digests are registered as defaults, | ||
113 | then the various EVP functions will automatically use those | ||
114 | implementations in preference to built in software implementations. | ||
115 | For more information, consult the | ||
116 | .Xr engine 3 | ||
117 | manual page. | ||
118 | .Pp | ||
119 | Although low level algorithm specific functions exist for many | ||
120 | algorithms, their use is discouraged. | ||
121 | They cannot be used with an | ||
122 | .Vt ENGINE , | ||
123 | and | ||
124 | .Vt ENGINE | ||
125 | versions of new algorithms cannot be accessed using the low level | ||
126 | functions. | ||
127 | Using them also makes code harder to adapt to new algorithms, some | ||
128 | options are not cleanly supported at the low level, and some | ||
129 | operations are more efficient using the high level interfaces. | ||
130 | .Sh SEE ALSO | ||
131 | .Xr engine 3 , | ||
132 | .Xr EVP_AEAD_CTX_init 3 , | ||
133 | .Xr EVP_BytesToKey 3 , | ||
134 | .Xr EVP_DigestInit 3 , | ||
135 | .Xr EVP_DigestSignInit 3 , | ||
136 | .Xr EVP_EncryptInit 3 , | ||
137 | .Xr EVP_OpenInit 3 , | ||
138 | .Xr EVP_PKEY_decrypt 3 , | ||
139 | .Xr EVP_PKEY_derive 3 , | ||
140 | .Xr EVP_PKEY_encrypt 3 , | ||
141 | .Xr EVP_PKEY_keygen 3 , | ||
142 | .Xr EVP_PKEY_new 3 , | ||
143 | .Xr EVP_PKEY_print_private 3 , | ||
144 | .Xr EVP_PKEY_set1_RSA 3 , | ||
145 | .Xr EVP_PKEY_sign 3 , | ||
146 | .Xr EVP_PKEY_verify 3 , | ||
147 | .Xr EVP_PKEY_verify_recover 3 , | ||
148 | .Xr EVP_SealInit 3 , | ||
149 | .Xr EVP_SignInit 3 , | ||
150 | .Xr EVP_VerifyInit 3 , | ||
151 | .Xr OpenSSL_add_all_algorithms 3 | ||