diff options
author | miod <> | 2014-07-10 13:08:58 +0000 |
---|---|---|
committer | miod <> | 2014-07-10 13:08:58 +0000 |
commit | 324d92fa7f658d01382ff72c596358f190772369 (patch) | |
tree | 4b65e7dddebc9f3ed56aeb299478c2f0029aabfd /src | |
parent | a21d4e83af767763bc6679d7872bb1a74a952d84 (diff) | |
download | openbsd-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.pod | 16 | ||||
-rw-r--r-- | src/lib/libcrypto/doc/EVP_SealInit.pod | 2 | ||||
-rw-r--r-- | src/lib/libcrypto/doc/PKCS7_encrypt.pod | 7 | ||||
-rw-r--r-- | src/lib/libssl/src/doc/crypto/CMS_encrypt.pod | 3 | ||||
-rw-r--r-- | src/lib/libssl/src/doc/crypto/EVP_EncryptInit.pod | 16 | ||||
-rw-r--r-- | src/lib/libssl/src/doc/crypto/EVP_SealInit.pod | 2 | ||||
-rw-r--r-- | src/lib/libssl/src/doc/crypto/PKCS7_encrypt.pod | 7 |
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>. | |||
101 | EVP_EncryptInit_ex() sets up cipher context B<ctx> for encryption | 101 | EVP_EncryptInit_ex() sets up cipher context B<ctx> for encryption |
102 | with cipher B<type> from ENGINE B<impl>. B<ctx> must be initialized | 102 | with cipher B<type> from ENGINE B<impl>. B<ctx> must be initialized |
103 | before calling this function. B<type> is normally supplied | 103 | before calling this function. B<type> is normally supplied |
104 | by a function such as EVP_des_cbc(). If B<impl> is NULL then the | 104 | by a function such as EVP_aes_256_cbc(). If B<impl> is NULL then the |
105 | default implementation is used. B<key> is the symmetric key to use | 105 | default implementation is used. B<key> is the symmetric key to use |
106 | and B<iv> is the IV to use (if necessary), the actual number of bytes | 106 | and B<iv> is the IV to use (if necessary), the actual number of bytes |
107 | used for the key and IV depends on the cipher. It is possible to set | 107 | used 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 | ||
284 | Null cipher: does nothing. | 284 | Null 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 | |||
288 | 128-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 | |||
292 | 192-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 | |||
296 | 256-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 | ||
288 | DES in CBC, ECB, CFB and OFB modes respectively. | 300 | DES 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 | ||
26 | EVP_SealInit() initializes a cipher context B<ctx> for encryption | 26 | EVP_SealInit() initializes a cipher context B<ctx> for encryption |
27 | with cipher B<type> using a random secret key and IV. B<type> is normally | 27 | with cipher B<type> using a random secret key and IV. B<type> is normally |
28 | supplied by a function such as EVP_des_cbc(). The secret key is encrypted | 28 | supplied by a function such as EVP_aes_256_cbc(). The secret key is encrypted |
29 | using one or more public keys, this allows the same encrypted data to be | 29 | using one or more public keys, this allows the same encrypted data to be |
30 | decrypted using any of the corresponding private keys. B<ek> is an array of | 30 | decrypted using any of the corresponding private keys. B<ek> is an array of |
31 | buffers where the public key encrypted secret key will be written, each buffer | 31 | buffers 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 | |||
22 | certificates supplied to this function must all contain RSA public keys, though | 22 | certificates supplied to this function must all contain RSA public keys, though |
23 | they do not have to be signed using the RSA algorithm. | 23 | they do not have to be signed using the RSA algorithm. |
24 | 24 | ||
25 | EVP_des_ede3_cbc() (triple DES) is the algorithm of choice for S/MIME use | ||
26 | because most clients will support it. | ||
27 | |||
28 | Some old "export grade" clients may only support weak encryption using 40 or 64 | ||
29 | bit RC2. These can be used by passing EVP_rc2_40_cbc() and EVP_rc2_64_cbc() | ||
30 | respectively. | ||
31 | |||
32 | The algorithm passed in the B<cipher> parameter must support ASN1 encoding of | 25 | The algorithm passed in the B<cipher> parameter must support ASN1 encoding of |
33 | its parameters. | 26 | its 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 | |||
22 | supplied to this function must all contain RSA public keys, though they do not | 22 | supplied to this function must all contain RSA public keys, though they do not |
23 | have to be signed using the RSA algorithm. | 23 | have to be signed using the RSA algorithm. |
24 | 24 | ||
25 | EVP_des_ede3_cbc() (triple DES) is the algorithm of choice for S/MIME use | ||
26 | because most clients will support it. | ||
27 | |||
28 | The algorithm passed in the B<cipher> parameter must support ASN1 encoding of | 25 | The algorithm passed in the B<cipher> parameter must support ASN1 encoding of |
29 | its parameters. | 26 | its 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>. | |||
101 | EVP_EncryptInit_ex() sets up cipher context B<ctx> for encryption | 101 | EVP_EncryptInit_ex() sets up cipher context B<ctx> for encryption |
102 | with cipher B<type> from ENGINE B<impl>. B<ctx> must be initialized | 102 | with cipher B<type> from ENGINE B<impl>. B<ctx> must be initialized |
103 | before calling this function. B<type> is normally supplied | 103 | before calling this function. B<type> is normally supplied |
104 | by a function such as EVP_des_cbc(). If B<impl> is NULL then the | 104 | by a function such as EVP_aes_256_cbc(). If B<impl> is NULL then the |
105 | default implementation is used. B<key> is the symmetric key to use | 105 | default implementation is used. B<key> is the symmetric key to use |
106 | and B<iv> is the IV to use (if necessary), the actual number of bytes | 106 | and B<iv> is the IV to use (if necessary), the actual number of bytes |
107 | used for the key and IV depends on the cipher. It is possible to set | 107 | used 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 | ||
284 | Null cipher: does nothing. | 284 | Null 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 | |||
288 | 128-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 | |||
292 | 192-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 | |||
296 | 256-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 | ||
288 | DES in CBC, ECB, CFB and OFB modes respectively. | 300 | DES 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 | ||
26 | EVP_SealInit() initializes a cipher context B<ctx> for encryption | 26 | EVP_SealInit() initializes a cipher context B<ctx> for encryption |
27 | with cipher B<type> using a random secret key and IV. B<type> is normally | 27 | with cipher B<type> using a random secret key and IV. B<type> is normally |
28 | supplied by a function such as EVP_des_cbc(). The secret key is encrypted | 28 | supplied by a function such as EVP_aes_256_cbc(). The secret key is encrypted |
29 | using one or more public keys, this allows the same encrypted data to be | 29 | using one or more public keys, this allows the same encrypted data to be |
30 | decrypted using any of the corresponding private keys. B<ek> is an array of | 30 | decrypted using any of the corresponding private keys. B<ek> is an array of |
31 | buffers where the public key encrypted secret key will be written, each buffer | 31 | buffers 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 | |||
22 | certificates supplied to this function must all contain RSA public keys, though | 22 | certificates supplied to this function must all contain RSA public keys, though |
23 | they do not have to be signed using the RSA algorithm. | 23 | they do not have to be signed using the RSA algorithm. |
24 | 24 | ||
25 | EVP_des_ede3_cbc() (triple DES) is the algorithm of choice for S/MIME use | ||
26 | because most clients will support it. | ||
27 | |||
28 | Some old "export grade" clients may only support weak encryption using 40 or 64 | ||
29 | bit RC2. These can be used by passing EVP_rc2_40_cbc() and EVP_rc2_64_cbc() | ||
30 | respectively. | ||
31 | |||
32 | The algorithm passed in the B<cipher> parameter must support ASN1 encoding of | 25 | The algorithm passed in the B<cipher> parameter must support ASN1 encoding of |
33 | its parameters. | 26 | its parameters. |
34 | 27 | ||