diff options
author | cvs2svn <admin@example.com> | 2025-04-14 17:32:06 +0000 |
---|---|---|
committer | cvs2svn <admin@example.com> | 2025-04-14 17:32:06 +0000 |
commit | eb8dd9dca1228af0cd132f515509051ecfabf6f6 (patch) | |
tree | edb6da6af7e865d488dc1a29309f1e1ec226e603 /src/lib/libc/crypt/blowfish.3 | |
parent | 247f0352e0ed72a4f476db9dc91f4d982bc83eb2 (diff) | |
download | openbsd-tb_20250414.tar.gz openbsd-tb_20250414.tar.bz2 openbsd-tb_20250414.zip |
This commit was manufactured by cvs2git to create tag 'tb_20250414'.tb_20250414
Diffstat (limited to 'src/lib/libc/crypt/blowfish.3')
-rw-r--r-- | src/lib/libc/crypt/blowfish.3 | 103 |
1 files changed, 0 insertions, 103 deletions
diff --git a/src/lib/libc/crypt/blowfish.3 b/src/lib/libc/crypt/blowfish.3 deleted file mode 100644 index c64ccb684b..0000000000 --- a/src/lib/libc/crypt/blowfish.3 +++ /dev/null | |||
@@ -1,103 +0,0 @@ | |||
1 | .\" $OpenBSD: blowfish.3,v 1.24 2021/11/29 01:04:45 djm Exp $ | ||
2 | .\" | ||
3 | .\" Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de> | ||
4 | .\" All rights reserved. | ||
5 | .\" | ||
6 | .\" Redistribution and use in source and binary forms, with or without | ||
7 | .\" modification, are permitted provided that the following conditions | ||
8 | .\" are met: | ||
9 | .\" 1. Redistributions of source code must retain the above copyright | ||
10 | .\" notice, this list of conditions and the following disclaimer. | ||
11 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer in the | ||
13 | .\" documentation and/or other materials provided with the distribution. | ||
14 | .\" 3. The name of the author may not be used to endorse or promote products | ||
15 | .\" derived from this software without specific prior written permission. | ||
16 | .\" | ||
17 | .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | ||
18 | .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | ||
19 | .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | ||
20 | .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
21 | .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
22 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
23 | .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
24 | .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
25 | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
26 | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
27 | .\" | ||
28 | .\" Manual page, using -mandoc macros | ||
29 | .\" | ||
30 | .Dd $Mdocdate: November 29 2021 $ | ||
31 | .Dt BLF_KEY 3 | ||
32 | .Os | ||
33 | .Sh NAME | ||
34 | .Nm blf_key , | ||
35 | .Nm blf_enc , | ||
36 | .Nm blf_dec , | ||
37 | .Nm blf_ecb_encrypt , | ||
38 | .Nm blf_ecb_decrypt , | ||
39 | .Nm blf_cbc_encrypt , | ||
40 | .Nm blf_cbc_decrypt | ||
41 | .Nd Blowfish encryption | ||
42 | .Sh SYNOPSIS | ||
43 | .In blf.h | ||
44 | .Ft void | ||
45 | .Fn blf_key "blf_ctx *state" "const u_int8_t *key" "u_int16_t keylen" | ||
46 | .Ft void | ||
47 | .Fn blf_enc "blf_ctx *state" "u_int32_t *data" "u_int16_t blocks" | ||
48 | .Ft void | ||
49 | .Fn blf_dec "blf_ctx *state" "u_int32_t *data" "u_int16_t blocks" | ||
50 | .Ft void | ||
51 | .Fn blf_ecb_encrypt "blf_ctx *state" "u_int8_t *data" "u_int32_t datalen" | ||
52 | .Ft void | ||
53 | .Fn blf_ecb_decrypt "blf_ctx *state" "u_int8_t *data" "u_int32_t datalen" | ||
54 | .Ft void | ||
55 | .Fn blf_cbc_encrypt "blf_ctx *state" "u_int8_t *iv" "u_int8_t *data" "u_int32_t datalen" | ||
56 | .Ft void | ||
57 | .Fn blf_cbc_decrypt "blf_ctx *state" "u_int8_t *iv" "u_int8_t *data" "u_int32_t datalen" | ||
58 | .Sh DESCRIPTION | ||
59 | .Em Blowfish | ||
60 | is a fast unpatented block cipher designed by Bruce Schneier. | ||
61 | It basically consists of a 16-round Feistel network. | ||
62 | The block size is 64 bits and the maximum key size is 448 bits. | ||
63 | .Pp | ||
64 | The | ||
65 | .Fn blf_key | ||
66 | function initializes the 4 8-bit S-boxes and the 18 Subkeys with | ||
67 | the hexadecimal digits of Pi. | ||
68 | The key is used for further randomization. | ||
69 | The first argument to | ||
70 | .Fn blf_enc | ||
71 | is the initialized state derived from | ||
72 | .Fn blf_key . | ||
73 | The stream of 32-bit words is encrypted in Electronic Codebook | ||
74 | Mode (ECB) and | ||
75 | .Fa blocks | ||
76 | is the number of 64-bit blocks in the stream. | ||
77 | .Fn blf_dec | ||
78 | is used for decrypting Blowfish encrypted blocks. | ||
79 | .Pp | ||
80 | The functions | ||
81 | .Fn blf_ecb_encrypt | ||
82 | and | ||
83 | .Fn blf_ecb_decrypt | ||
84 | are used for encrypting and decrypting octet streams in ECB mode. | ||
85 | The functions | ||
86 | .Fn blf_cbc_encrypt | ||
87 | and | ||
88 | .Fn blf_cbc_decrypt | ||
89 | are used for encrypting and decrypting octet streams in | ||
90 | Cipherblock Chaining Mode (CBC). | ||
91 | For these functions | ||
92 | .Fa datalen | ||
93 | specifies the number of octets of data to encrypt or decrypt. | ||
94 | It must be a multiple of 8 (64-bit block). | ||
95 | The initialisation vector | ||
96 | .Fa iv | ||
97 | points to an 8-byte buffer. | ||
98 | .Sh SEE ALSO | ||
99 | .Xr passwd 1 , | ||
100 | .Xr crypt 3 , | ||
101 | .Xr passwd 5 | ||
102 | .Sh AUTHORS | ||
103 | .An Niels Provos Aq Mt provos@physnet.uni-hamburg.de | ||