diff options
author | schwarze <> | 2024-11-09 22:03:49 +0000 |
---|---|---|
committer | schwarze <> | 2024-11-09 22:03:49 +0000 |
commit | 00b35208c83ec1d015bb83985f53e1e4cbbc0e70 (patch) | |
tree | 16b296573ca66b1f60e34fdb03b4b43963fcce0e /src/lib/libcrypto/man/EVP_EncryptInit.3 | |
parent | d0c0ceacf41c5d7d278724824d2b6fb5730c2201 (diff) | |
download | openbsd-00b35208c83ec1d015bb83985f53e1e4cbbc0e70.tar.gz openbsd-00b35208c83ec1d015bb83985f53e1e4cbbc0e70.tar.bz2 openbsd-00b35208c83ec1d015bb83985f53e1e4cbbc0e70.zip |
Mention the key lengths of some encryption algorithms.
This is relevant because EVP_EncryptInit(3) takes a "key" argument,
and users need to consider the size of that argument.
While here, also mention whether ciphers are stream ciphers
or block ciphers and what the block size is.
Diffstat (limited to 'src/lib/libcrypto/man/EVP_EncryptInit.3')
-rw-r--r-- | src/lib/libcrypto/man/EVP_EncryptInit.3 | 41 |
1 files changed, 27 insertions, 14 deletions
diff --git a/src/lib/libcrypto/man/EVP_EncryptInit.3 b/src/lib/libcrypto/man/EVP_EncryptInit.3 index a0adfbab09..32ed3349b9 100644 --- a/src/lib/libcrypto/man/EVP_EncryptInit.3 +++ b/src/lib/libcrypto/man/EVP_EncryptInit.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: EVP_EncryptInit.3,v 1.52 2024/07/21 08:36:43 tb Exp $ | 1 | .\" $OpenBSD: EVP_EncryptInit.3,v 1.53 2024/11/09 22:03:49 schwarze Exp $ |
2 | .\" full merge up to: OpenSSL 5211e094 Nov 11 14:39:11 2014 -0800 | 2 | .\" full merge up to: OpenSSL 5211e094 Nov 11 14:39:11 2014 -0800 |
3 | .\" EVP_bf_cbc.pod EVP_cast5_cbc.pod EVP_idea_cbc.pod EVP_rc2_cbc.pod | 3 | .\" EVP_bf_cbc.pod EVP_cast5_cbc.pod EVP_idea_cbc.pod EVP_rc2_cbc.pod |
4 | .\" 7c6d372a Nov 20 13:20:01 2018 +0000 | 4 | .\" 7c6d372a Nov 20 13:20:01 2018 +0000 |
@@ -69,7 +69,7 @@ | |||
69 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 69 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
70 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 70 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
71 | .\" | 71 | .\" |
72 | .Dd $Mdocdate: July 21 2024 $ | 72 | .Dd $Mdocdate: November 9 2024 $ |
73 | .Dt EVP_ENCRYPTINIT 3 | 73 | .Dt EVP_ENCRYPTINIT 3 |
74 | .Os | 74 | .Os |
75 | .Sh NAME | 75 | .Sh NAME |
@@ -553,7 +553,6 @@ returns an | |||
553 | .Vt EVP_CIPHER | 553 | .Vt EVP_CIPHER |
554 | structure. | 554 | structure. |
555 | .Sh CIPHER LISTING | 555 | .Sh CIPHER LISTING |
556 | All algorithms have a fixed key length unless otherwise stated. | ||
557 | .Bl -tag -width Ds | 556 | .Bl -tag -width Ds |
558 | .It Fn EVP_enc_null | 557 | .It Fn EVP_enc_null |
559 | Null cipher: does nothing. | 558 | Null cipher: does nothing. |
@@ -564,6 +563,8 @@ Null cipher: does nothing. | |||
564 | .Fn EVP_idea_ofb | 563 | .Fn EVP_idea_ofb |
565 | .Xc | 564 | .Xc |
566 | IDEA encryption algorithm in CBC, ECB, CFB and OFB modes respectively. | 565 | IDEA encryption algorithm in CBC, ECB, CFB and OFB modes respectively. |
566 | IDEA is a block cipher operating on 64 bit blocks using a 128 bit | ||
567 | .Fa key . | ||
567 | .Fn EVP_idea_cfb | 568 | .Fn EVP_idea_cfb |
568 | is an alias for | 569 | is an alias for |
569 | .Fn EVP_idea_cfb64 , | 570 | .Fn EVP_idea_cfb64 , |
@@ -575,7 +576,9 @@ implemented as a macro. | |||
575 | .Fn EVP_rc2_ofb | 576 | .Fn EVP_rc2_ofb |
576 | .Xc | 577 | .Xc |
577 | RC2 encryption algorithm in CBC, ECB, CFB and OFB modes respectively. | 578 | RC2 encryption algorithm in CBC, ECB, CFB and OFB modes respectively. |
578 | This is a variable key length cipher with an additional parameter called | 579 | RC2 is a block cipher operating on 64 bit blocks using a variable |
580 | .Fa key | ||
581 | length with an additional parameter called | ||
579 | "effective key bits" or "effective key length". | 582 | "effective key bits" or "effective key length". |
580 | By default both are set to 128 bits. | 583 | By default both are set to 128 bits. |
581 | .Fn EVP_rc2_cfb | 584 | .Fn EVP_rc2_cfb |
@@ -602,7 +605,10 @@ to set the key length and effective key length. | |||
602 | .Xc | 605 | .Xc |
603 | Blowfish encryption algorithm in CBC, ECB, CFB and OFB modes | 606 | Blowfish encryption algorithm in CBC, ECB, CFB and OFB modes |
604 | respectively. | 607 | respectively. |
605 | This is a variable key length cipher. | 608 | Blowfish is a block cipher operating on 64 bit blocks using a variable |
609 | .Fa key | ||
610 | length. | ||
611 | The default key length is 128 bits. | ||
606 | .Fn EVP_bf_cfb | 612 | .Fn EVP_bf_cfb |
607 | is an alias for | 613 | is an alias for |
608 | .Fn EVP_bf_cfb64 , | 614 | .Fn EVP_bf_cfb64 , |
@@ -613,21 +619,28 @@ implemented as a macro. | |||
613 | .Fn EVP_cast5_cfb64 , | 619 | .Fn EVP_cast5_cfb64 , |
614 | .Fn EVP_cast5_ofb | 620 | .Fn EVP_cast5_ofb |
615 | .Xc | 621 | .Xc |
616 | CAST encryption algorithm in CBC, ECB, CFB and OFB modes respectively. | 622 | CAST-128 encryption algorithm in CBC, ECB, CFB and OFB modes respectively. |
617 | This is a variable key length cipher. | 623 | CAST-128 is a block cipher operating on 64 bit blocks using a variable |
624 | .Fa key | ||
625 | length. | ||
626 | The default and maximum key length is 128 bits. | ||
618 | .Fn EVP_cast5_cfb | 627 | .Fn EVP_cast5_cfb |
619 | is an alias for | 628 | is an alias for |
620 | .Fn EVP_cast5_cfb64 , | 629 | .Fn EVP_cast5_cfb64 , |
621 | implemented as a macro. | 630 | implemented as a macro. |
622 | .El | 631 | .El |
623 | .Pp | 632 | .Pp |
624 | See also | 633 | Some algorithms are documented in separate manual pages: |
625 | .Xr EVP_aes_128_cbc 3 , | 634 | .Pp |
626 | .Xr EVP_camellia_128_cbc 3 , | 635 | .Bl -column "EVP_camellia_128_cbc(3)" "block size" -compact |
627 | .Xr EVP_des_cbc 3 , | 636 | .It manual page Ta block size Ta Fa key No size Pq in bits |
628 | .Xr EVP_rc4 3 , | 637 | .It Xr EVP_aes_128_cbc 3 Ta 128 Ta 128, 192, 256 |
629 | and | 638 | .It Xr EVP_camellia_128_cbc 3 Ta 128 Ta 128, 192, 256 |
630 | .Xr EVP_sm4_cbc 3 . | 639 | .It Xr EVP_chacha20 3 Ta stream Ta 256 |
640 | .It Xr EVP_des_cbc 3 Ta 64 Ta 64 | ||
641 | .It Xr EVP_rc4 3 Ta stream Ta variable, default 128 | ||
642 | .It Xr EVP_sm4_cbc 3 Ta 128 Ta 128 | ||
643 | .El | ||
631 | .Ss GCM mode | 644 | .Ss GCM mode |
632 | For GCM mode ciphers, the behaviour of the EVP interface | 645 | For GCM mode ciphers, the behaviour of the EVP interface |
633 | is subtly altered and several additional ctrl operations are | 646 | is subtly altered and several additional ctrl operations are |