summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormiod <>2014-07-10 13:08:58 +0000
committermiod <>2014-07-10 13:08:58 +0000
commit324d92fa7f658d01382ff72c596358f190772369 (patch)
tree4b65e7dddebc9f3ed56aeb299478c2f0029aabfd /src
parenta21d4e83af767763bc6679d7872bb1a74a952d84 (diff)
downloadopenbsd-324d92fa7f658d01382ff72c596358f190772369.tar.gz
openbsd-324d92fa7f658d01382ff72c596358f190772369.tar.bz2
openbsd-324d92fa7f658d01382ff72c596358f190772369.zip
Attempt to (incompletely) document EVP_aes_*().
When EVP_des_cbc() was suggested, suggest EVP_aes_256_cbc() instead. Remove mention of EVP_des_ede3_cbc() being the algorithm of choice for S/MIME. Don't mention US-export limited RC2 algorithms, you'd better not know about them.
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/doc/EVP_EncryptInit.pod16
-rw-r--r--src/lib/libcrypto/doc/EVP_SealInit.pod2
-rw-r--r--src/lib/libcrypto/doc/PKCS7_encrypt.pod7
-rw-r--r--src/lib/libssl/src/doc/crypto/CMS_encrypt.pod3
-rw-r--r--src/lib/libssl/src/doc/crypto/EVP_EncryptInit.pod16
-rw-r--r--src/lib/libssl/src/doc/crypto/EVP_SealInit.pod2
-rw-r--r--src/lib/libssl/src/doc/crypto/PKCS7_encrypt.pod7
7 files changed, 30 insertions, 23 deletions
diff --git a/src/lib/libcrypto/doc/EVP_EncryptInit.pod b/src/lib/libcrypto/doc/EVP_EncryptInit.pod
index d42445cf10..a876ac789c 100644
--- a/src/lib/libcrypto/doc/EVP_EncryptInit.pod
+++ b/src/lib/libcrypto/doc/EVP_EncryptInit.pod
@@ -101,7 +101,7 @@ EVP_CIPHER_CTX_init() initializes cipher contex B<ctx>.
101EVP_EncryptInit_ex() sets up cipher context B<ctx> for encryption 101EVP_EncryptInit_ex() sets up cipher context B<ctx> for encryption
102with cipher B<type> from ENGINE B<impl>. B<ctx> must be initialized 102with cipher B<type> from ENGINE B<impl>. B<ctx> must be initialized
103before calling this function. B<type> is normally supplied 103before calling this function. B<type> is normally supplied
104by a function such as EVP_des_cbc(). If B<impl> is NULL then the 104by a function such as EVP_aes_256_cbc(). If B<impl> is NULL then the
105default implementation is used. B<key> is the symmetric key to use 105default implementation is used. B<key> is the symmetric key to use
106and B<iv> is the IV to use (if necessary), the actual number of bytes 106and B<iv> is the IV to use (if necessary), the actual number of bytes
107used for the key and IV depends on the cipher. It is possible to set 107used for the key and IV depends on the cipher. It is possible to set
@@ -279,10 +279,22 @@ All algorithms have a fixed key length unless otherwise stated.
279 279
280=over 4 280=over 4
281 281
282=item EVP_enc_null() 282=item EVP_enc_null(void)
283 283
284Null cipher: does nothing. 284Null cipher: does nothing.
285 285
286=item EVP_aes_128_cbc(void), EVP_aes_128_ecb(void), EVP_aes_128_cfb(void), EVP_aes_128_ofb(void)
287
288128-bit AES in CBC, ECB, CFB and OFB modes respectively.
289
290=item EVP_aes_192_cbc(void), EVP_aes_192_ecb(void), EVP_aes_192_cfb(void), EVP_aes_192_ofb(void)
291
292192-bit AES in CBC, ECB, CFB and OFB modes respectively.
293
294=item EVP_aes_256_cbc(void), EVP_aes_256_ecb(void), EVP_aes_256_cfb(void), EVP_aes_256_ofb(void)
295
296256-bit AES in CBC, ECB, CFB and OFB modes respectively.
297
286=item EVP_des_cbc(void), EVP_des_ecb(void), EVP_des_cfb(void), EVP_des_ofb(void) 298=item EVP_des_cbc(void), EVP_des_ecb(void), EVP_des_cfb(void), EVP_des_ofb(void)
287 299
288DES in CBC, ECB, CFB and OFB modes respectively. 300DES in CBC, ECB, CFB and OFB modes respectively.
diff --git a/src/lib/libcrypto/doc/EVP_SealInit.pod b/src/lib/libcrypto/doc/EVP_SealInit.pod
index ff73a04fd9..76eebb72a9 100644
--- a/src/lib/libcrypto/doc/EVP_SealInit.pod
+++ b/src/lib/libcrypto/doc/EVP_SealInit.pod
@@ -25,7 +25,7 @@ encrypted using this key.
25 25
26EVP_SealInit() initializes a cipher context B<ctx> for encryption 26EVP_SealInit() initializes a cipher context B<ctx> for encryption
27with cipher B<type> using a random secret key and IV. B<type> is normally 27with cipher B<type> using a random secret key and IV. B<type> is normally
28supplied by a function such as EVP_des_cbc(). The secret key is encrypted 28supplied by a function such as EVP_aes_256_cbc(). The secret key is encrypted
29using one or more public keys, this allows the same encrypted data to be 29using one or more public keys, this allows the same encrypted data to be
30decrypted using any of the corresponding private keys. B<ek> is an array of 30decrypted using any of the corresponding private keys. B<ek> is an array of
31buffers where the public key encrypted secret key will be written, each buffer 31buffers where the public key encrypted secret key will be written, each buffer
diff --git a/src/lib/libcrypto/doc/PKCS7_encrypt.pod b/src/lib/libcrypto/doc/PKCS7_encrypt.pod
index e206684384..8bc77407b9 100644
--- a/src/lib/libcrypto/doc/PKCS7_encrypt.pod
+++ b/src/lib/libcrypto/doc/PKCS7_encrypt.pod
@@ -22,13 +22,6 @@ Only RSA keys are supported in PKCS#7 and envelopedData so the recipient
22certificates supplied to this function must all contain RSA public keys, though 22certificates supplied to this function must all contain RSA public keys, though
23they do not have to be signed using the RSA algorithm. 23they do not have to be signed using the RSA algorithm.
24 24
25EVP_des_ede3_cbc() (triple DES) is the algorithm of choice for S/MIME use
26because most clients will support it.
27
28Some old "export grade" clients may only support weak encryption using 40 or 64
29bit RC2. These can be used by passing EVP_rc2_40_cbc() and EVP_rc2_64_cbc()
30respectively.
31
32The algorithm passed in the B<cipher> parameter must support ASN1 encoding of 25The algorithm passed in the B<cipher> parameter must support ASN1 encoding of
33its parameters. 26its parameters.
34 27
diff --git a/src/lib/libssl/src/doc/crypto/CMS_encrypt.pod b/src/lib/libssl/src/doc/crypto/CMS_encrypt.pod
index 4f26e24bf6..f697e87e2b 100644
--- a/src/lib/libssl/src/doc/crypto/CMS_encrypt.pod
+++ b/src/lib/libssl/src/doc/crypto/CMS_encrypt.pod
@@ -22,9 +22,6 @@ Only certificates carrying RSA keys are supported so the recipient certificates
22supplied to this function must all contain RSA public keys, though they do not 22supplied to this function must all contain RSA public keys, though they do not
23have to be signed using the RSA algorithm. 23have to be signed using the RSA algorithm.
24 24
25EVP_des_ede3_cbc() (triple DES) is the algorithm of choice for S/MIME use
26because most clients will support it.
27
28The algorithm passed in the B<cipher> parameter must support ASN1 encoding of 25The algorithm passed in the B<cipher> parameter must support ASN1 encoding of
29its parameters. 26its parameters.
30 27
diff --git a/src/lib/libssl/src/doc/crypto/EVP_EncryptInit.pod b/src/lib/libssl/src/doc/crypto/EVP_EncryptInit.pod
index d42445cf10..a876ac789c 100644
--- a/src/lib/libssl/src/doc/crypto/EVP_EncryptInit.pod
+++ b/src/lib/libssl/src/doc/crypto/EVP_EncryptInit.pod
@@ -101,7 +101,7 @@ EVP_CIPHER_CTX_init() initializes cipher contex B<ctx>.
101EVP_EncryptInit_ex() sets up cipher context B<ctx> for encryption 101EVP_EncryptInit_ex() sets up cipher context B<ctx> for encryption
102with cipher B<type> from ENGINE B<impl>. B<ctx> must be initialized 102with cipher B<type> from ENGINE B<impl>. B<ctx> must be initialized
103before calling this function. B<type> is normally supplied 103before calling this function. B<type> is normally supplied
104by a function such as EVP_des_cbc(). If B<impl> is NULL then the 104by a function such as EVP_aes_256_cbc(). If B<impl> is NULL then the
105default implementation is used. B<key> is the symmetric key to use 105default implementation is used. B<key> is the symmetric key to use
106and B<iv> is the IV to use (if necessary), the actual number of bytes 106and B<iv> is the IV to use (if necessary), the actual number of bytes
107used for the key and IV depends on the cipher. It is possible to set 107used for the key and IV depends on the cipher. It is possible to set
@@ -279,10 +279,22 @@ All algorithms have a fixed key length unless otherwise stated.
279 279
280=over 4 280=over 4
281 281
282=item EVP_enc_null() 282=item EVP_enc_null(void)
283 283
284Null cipher: does nothing. 284Null cipher: does nothing.
285 285
286=item EVP_aes_128_cbc(void), EVP_aes_128_ecb(void), EVP_aes_128_cfb(void), EVP_aes_128_ofb(void)
287
288128-bit AES in CBC, ECB, CFB and OFB modes respectively.
289
290=item EVP_aes_192_cbc(void), EVP_aes_192_ecb(void), EVP_aes_192_cfb(void), EVP_aes_192_ofb(void)
291
292192-bit AES in CBC, ECB, CFB and OFB modes respectively.
293
294=item EVP_aes_256_cbc(void), EVP_aes_256_ecb(void), EVP_aes_256_cfb(void), EVP_aes_256_ofb(void)
295
296256-bit AES in CBC, ECB, CFB and OFB modes respectively.
297
286=item EVP_des_cbc(void), EVP_des_ecb(void), EVP_des_cfb(void), EVP_des_ofb(void) 298=item EVP_des_cbc(void), EVP_des_ecb(void), EVP_des_cfb(void), EVP_des_ofb(void)
287 299
288DES in CBC, ECB, CFB and OFB modes respectively. 300DES in CBC, ECB, CFB and OFB modes respectively.
diff --git a/src/lib/libssl/src/doc/crypto/EVP_SealInit.pod b/src/lib/libssl/src/doc/crypto/EVP_SealInit.pod
index ff73a04fd9..76eebb72a9 100644
--- a/src/lib/libssl/src/doc/crypto/EVP_SealInit.pod
+++ b/src/lib/libssl/src/doc/crypto/EVP_SealInit.pod
@@ -25,7 +25,7 @@ encrypted using this key.
25 25
26EVP_SealInit() initializes a cipher context B<ctx> for encryption 26EVP_SealInit() initializes a cipher context B<ctx> for encryption
27with cipher B<type> using a random secret key and IV. B<type> is normally 27with cipher B<type> using a random secret key and IV. B<type> is normally
28supplied by a function such as EVP_des_cbc(). The secret key is encrypted 28supplied by a function such as EVP_aes_256_cbc(). The secret key is encrypted
29using one or more public keys, this allows the same encrypted data to be 29using one or more public keys, this allows the same encrypted data to be
30decrypted using any of the corresponding private keys. B<ek> is an array of 30decrypted using any of the corresponding private keys. B<ek> is an array of
31buffers where the public key encrypted secret key will be written, each buffer 31buffers where the public key encrypted secret key will be written, each buffer
diff --git a/src/lib/libssl/src/doc/crypto/PKCS7_encrypt.pod b/src/lib/libssl/src/doc/crypto/PKCS7_encrypt.pod
index e206684384..8bc77407b9 100644
--- a/src/lib/libssl/src/doc/crypto/PKCS7_encrypt.pod
+++ b/src/lib/libssl/src/doc/crypto/PKCS7_encrypt.pod
@@ -22,13 +22,6 @@ Only RSA keys are supported in PKCS#7 and envelopedData so the recipient
22certificates supplied to this function must all contain RSA public keys, though 22certificates supplied to this function must all contain RSA public keys, though
23they do not have to be signed using the RSA algorithm. 23they do not have to be signed using the RSA algorithm.
24 24
25EVP_des_ede3_cbc() (triple DES) is the algorithm of choice for S/MIME use
26because most clients will support it.
27
28Some old "export grade" clients may only support weak encryption using 40 or 64
29bit RC2. These can be used by passing EVP_rc2_40_cbc() and EVP_rc2_64_cbc()
30respectively.
31
32The algorithm passed in the B<cipher> parameter must support ASN1 encoding of 25The algorithm passed in the B<cipher> parameter must support ASN1 encoding of
33its parameters. 26its parameters.
34 27