diff options
Diffstat (limited to 'src/lib/libcrypto/doc/EVP_EncryptInit.pod')
| -rw-r--r-- | src/lib/libcrypto/doc/EVP_EncryptInit.pod | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/libcrypto/doc/EVP_EncryptInit.pod b/src/lib/libcrypto/doc/EVP_EncryptInit.pod index 1c4bf184a1..84875e0fe0 100644 --- a/src/lib/libcrypto/doc/EVP_EncryptInit.pod +++ b/src/lib/libcrypto/doc/EVP_EncryptInit.pod | |||
| @@ -128,7 +128,7 @@ calls to EVP_EncryptUpdate() should be made. | |||
| 128 | 128 | ||
| 129 | If padding is disabled then EVP_EncryptFinal_ex() will not encrypt any more | 129 | If padding is disabled then EVP_EncryptFinal_ex() will not encrypt any more |
| 130 | data and it will return an error if any data remains in a partial block: | 130 | data and it will return an error if any data remains in a partial block: |
| 131 | that is if the total data length is not a multiple of the block size. | 131 | that is if the total data length is not a multiple of the block size. |
| 132 | 132 | ||
| 133 | EVP_DecryptInit_ex(), EVP_DecryptUpdate() and EVP_DecryptFinal_ex() are the | 133 | EVP_DecryptInit_ex(), EVP_DecryptUpdate() and EVP_DecryptFinal_ex() are the |
| 134 | corresponding decryption operations. EVP_DecryptFinal() will return an | 134 | corresponding decryption operations. EVP_DecryptFinal() will return an |
| @@ -157,7 +157,7 @@ initialized and they always use the default cipher implementation. | |||
| 157 | 157 | ||
| 158 | EVP_EncryptFinal(), EVP_DecryptFinal() and EVP_CipherFinal() behave in a | 158 | EVP_EncryptFinal(), EVP_DecryptFinal() and EVP_CipherFinal() behave in a |
| 159 | similar way to EVP_EncryptFinal_ex(), EVP_DecryptFinal_ex() and | 159 | similar way to EVP_EncryptFinal_ex(), EVP_DecryptFinal_ex() and |
| 160 | EVP_CipherFinal_ex() except B<ctx> is automatically cleaned up | 160 | EVP_CipherFinal_ex() except B<ctx> is automatically cleaned up |
| 161 | after the call. | 161 | after the call. |
| 162 | 162 | ||
| 163 | EVP_get_cipherbyname(), EVP_get_cipherbynid() and EVP_get_cipherbyobj() | 163 | EVP_get_cipherbyname(), EVP_get_cipherbynid() and EVP_get_cipherbyobj() |
| @@ -268,7 +268,7 @@ OBJECT IDENTIFIER or NID_undef if it has no defined OBJECT IDENTIFIER. | |||
| 268 | 268 | ||
| 269 | EVP_CIPHER_CTX_cipher() returns an B<EVP_CIPHER> structure. | 269 | EVP_CIPHER_CTX_cipher() returns an B<EVP_CIPHER> structure. |
| 270 | 270 | ||
| 271 | EVP_CIPHER_param_to_asn1() and EVP_CIPHER_asn1_to_param() return 1 for | 271 | EVP_CIPHER_param_to_asn1() and EVP_CIPHER_asn1_to_param() return 1 for |
| 272 | success or zero for failure. | 272 | success or zero for failure. |
| 273 | 273 | ||
| 274 | =head1 CIPHER LISTING | 274 | =head1 CIPHER LISTING |
| @@ -283,7 +283,7 @@ Null cipher: does nothing. | |||
| 283 | 283 | ||
| 284 | =item EVP_des_cbc(void), EVP_des_ecb(void), EVP_des_cfb(void), EVP_des_ofb(void) | 284 | =item EVP_des_cbc(void), EVP_des_ecb(void), EVP_des_cfb(void), EVP_des_ofb(void) |
| 285 | 285 | ||
| 286 | DES in CBC, ECB, CFB and OFB modes respectively. | 286 | DES in CBC, ECB, CFB and OFB modes respectively. |
| 287 | 287 | ||
| 288 | =item EVP_des_ede_cbc(void), EVP_des_ede(), EVP_des_ede_ofb(void), EVP_des_ede_cfb(void) | 288 | =item EVP_des_ede_cbc(void), EVP_des_ede(), EVP_des_ede_ofb(void), EVP_des_ede_cfb(void) |
| 289 | 289 | ||
| @@ -346,7 +346,7 @@ Where possible the B<EVP> interface to symmetric ciphers should be used in | |||
| 346 | preference to the low level interfaces. This is because the code then becomes | 346 | preference to the low level interfaces. This is because the code then becomes |
| 347 | transparent to the cipher used and much more flexible. | 347 | transparent to the cipher used and much more flexible. |
| 348 | 348 | ||
| 349 | PKCS padding works by adding B<n> padding bytes of value B<n> to make the total | 349 | PKCS padding works by adding B<n> padding bytes of value B<n> to make the total |
| 350 | length of the encrypted data a multiple of the block size. Padding is always | 350 | length of the encrypted data a multiple of the block size. Padding is always |
| 351 | added so if the data is already a multiple of the block size B<n> will equal | 351 | added so if the data is already a multiple of the block size B<n> will equal |
| 352 | the block size. For example if the block size is 8 and 11 bytes are to be | 352 | the block size. For example if the block size is 8 and 11 bytes are to be |
| @@ -376,7 +376,7 @@ a limitation of the current RC5 code rather than the EVP interface. | |||
| 376 | 376 | ||
| 377 | EVP_MAX_KEY_LENGTH and EVP_MAX_IV_LENGTH only refer to the internal ciphers with | 377 | EVP_MAX_KEY_LENGTH and EVP_MAX_IV_LENGTH only refer to the internal ciphers with |
| 378 | default key lengths. If custom ciphers exceed these values the results are | 378 | default key lengths. If custom ciphers exceed these values the results are |
| 379 | unpredictable. This is because it has become standard practice to define a | 379 | unpredictable. This is because it has become standard practice to define a |
| 380 | generic key as a fixed unsigned char array containing EVP_MAX_KEY_LENGTH bytes. | 380 | generic key as a fixed unsigned char array containing EVP_MAX_KEY_LENGTH bytes. |
| 381 | 381 | ||
| 382 | The ASN1 code is incomplete (and sometimes inaccurate) it has only been tested | 382 | The ASN1 code is incomplete (and sometimes inaccurate) it has only been tested |
| @@ -449,7 +449,7 @@ Encrypt a string using blowfish: | |||
| 449 | 449 | ||
| 450 | The ciphertext from the above example can be decrypted using the B<openssl> | 450 | The ciphertext from the above example can be decrypted using the B<openssl> |
| 451 | utility with the command line: | 451 | utility with the command line: |
| 452 | 452 | ||
| 453 | S<openssl bf -in cipher.bin -K 000102030405060708090A0B0C0D0E0F -iv 0102030405060708 -d> | 453 | S<openssl bf -in cipher.bin -K 000102030405060708090A0B0C0D0E0F -iv 0102030405060708 -d> |
| 454 | 454 | ||
| 455 | General encryption, decryption function example using FILE I/O and RC2 with an | 455 | General encryption, decryption function example using FILE I/O and RC2 with an |
| @@ -472,7 +472,7 @@ General encryption, decryption function example using FILE I/O and RC2 with an | |||
| 472 | /* We finished modifying parameters so now we can set key and IV */ | 472 | /* We finished modifying parameters so now we can set key and IV */ |
| 473 | EVP_CipherInit_ex(&ctx, NULL, NULL, key, iv, do_encrypt); | 473 | EVP_CipherInit_ex(&ctx, NULL, NULL, key, iv, do_encrypt); |
| 474 | 474 | ||
| 475 | for(;;) | 475 | for(;;) |
| 476 | { | 476 | { |
| 477 | inlen = fread(inbuf, 1, 1024, in); | 477 | inlen = fread(inbuf, 1, 1024, in); |
| 478 | if(inlen <= 0) break; | 478 | if(inlen <= 0) break; |
