summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/evp.3
diff options
context:
space:
mode:
authorschwarze <>2016-11-03 09:35:34 +0000
committerschwarze <>2016-11-03 09:35:34 +0000
commit4d607f17ea3eb38ed9f7703afd423f6055c686d4 (patch)
tree58d82d0d7f6aeee380eaadbcfaa231ecbe6b90a0 /src/lib/libcrypto/man/evp.3
parentcf67afe5881727d740e9f6c772aa478123f7d698 (diff)
downloadopenbsd-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.3151
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
10The EVP library provides a high-level interface to cryptographic
11functions.
12.Pp
13.Xr EVP_SealInit 3
14and
15.Xr EVP_OpenInit 3
16provide public key encryption and decryption to implement digital
17"envelopes".
18.Pp
19The
20.Xr EVP_DigestSignInit 3
21and
22.Xr EVP_DigestVerifyInit 3
23functions implement digital signatures and Message Authentication Codes
24(MACs).
25Also see the older
26.Xr EVP_SignInit 3
27and
28.Xr EVP_VerifyInit 3
29functions.
30.Pp
31Symmetric encryption is available with the
32.Xr EVP_EncryptInit 3
33functions.
34The
35.Xr EVP_DigestInit 3
36functions provide message digests.
37.Pp
38Authenticated encryption with additional data (AEAD) is available with
39the
40.Xr EVP_AEAD_CTX_init 3
41functions.
42.Pp
43The
44.Fn EVP_PKEY_*
45functions provide a high level interface to asymmetric algorithms.
46To create a new
47.Vt EVP_PKEY ,
48see
49.Xr EVP_PKEY_new 3 .
50.Vt EVP_PKEY Ns s
51can be associated with a private key of a particular algorithm
52by using the functions described in the
53.Xr EVP_PKEY_set1_RSA 3
54page, or new keys can be generated using
55.Xr EVP_PKEY_keygen 3 .
56.Vt EVP_PKEY Ns s
57can be compared using
58.Xr EVP_PKEY_cmp 3
59or printed using
60.Xr EVP_PKEY_print_private 3 .
61.Pp
62The
63.Fn EVP_PKEY_*
64functions support the full range of asymmetric algorithm operations:
65.Bl -bullet
66.It
67For key agreement, see
68.Xr EVP_PKEY_derive 3 .
69.It
70For signing and verifying, see
71.Xr EVP_PKEY_sign 3 ,
72.Xr EVP_PKEY_verify 3 ,
73and
74.Xr EVP_PKEY_verify_recover 3 .
75However, note that these functions do not perform a digest of the
76data to be signed.
77Therefore normally you would use the
78.Xr EVP_DigestSignInit 3
79functions for this purpose.
80.It
81For encryption and decryption see
82.Xr EVP_PKEY_encrypt 3
83and
84.Xr EVP_PKEY_decrypt 3 ,
85respectively.
86However, note that these functions perform encryption and decryption only.
87As public key encryption is an expensive operation, normally you
88would wrap an encrypted message in a digital envelope using the
89.Xr EVP_SealInit 3
90and
91.Xr EVP_OpenInit 3
92functions.
93.El
94.Pp
95The
96.Xr EVP_BytesToKey 3
97function provides some limited support for password based encryption.
98Careful selection of the parameters will provide a PKCS#5 PBKDF1
99compatible implementation.
100However, new applications should typically not use this (preferring, for
101example, PBKDF2 from PCKS#5).
102.Pp
103Algorithms are loaded with
104.Xr OpenSSL_add_all_algorithms 3 .
105.Pp
106All the symmetric algorithms (ciphers), digests and asymmetric
107algorithms (public key algorithms) can be replaced by
108.Xr engine 3
109modules providing alternative implementations.
110If
111.Vt ENGINE
112implementations of ciphers or digests are registered as defaults,
113then the various EVP functions will automatically use those
114implementations in preference to built in software implementations.
115For more information, consult the
116.Xr engine 3
117manual page.
118.Pp
119Although low level algorithm specific functions exist for many
120algorithms, their use is discouraged.
121They cannot be used with an
122.Vt ENGINE ,
123and
124.Vt ENGINE
125versions of new algorithms cannot be accessed using the low level
126functions.
127Using them also makes code harder to adapt to new algorithms, some
128options are not cleanly supported at the low level, and some
129operations 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