summaryrefslogtreecommitdiff
path: root/src/lib/libc/crypt/blowfish.3
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/libc/crypt/blowfish.328
1 files changed, 24 insertions, 4 deletions
diff --git a/src/lib/libc/crypt/blowfish.3 b/src/lib/libc/crypt/blowfish.3
index 0b45790658..02a1ef8738 100644
--- a/src/lib/libc/crypt/blowfish.3
+++ b/src/lib/libc/crypt/blowfish.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: blowfish.3,v 1.1 1997/02/16 20:58:16 provos Exp $ 1.\" $OpenBSD: blowfish.3,v 1.2 1998/08/10 18:40:58 provos Exp $
2.\" Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de> 2.\" Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
3.\" All rights reserved. 3.\" All rights reserved.
4.\" 4.\"
@@ -45,6 +45,14 @@
45.Fn blf_enc "blf_ctx *state" "u_int32_t *data" "u_int16_t datalen" 45.Fn blf_enc "blf_ctx *state" "u_int32_t *data" "u_int16_t datalen"
46.Ft void 46.Ft void
47.Fn blf_dec "blf_ctx *state" "u_int32_t *data" "u_int16_t datalen" 47.Fn blf_dec "blf_ctx *state" "u_int32_t *data" "u_int16_t datalen"
48.Ft void
49.Fn blf_ecb_encrypt "blf_ctx *state" "u_int8_t *data" "u_int32_t datalen"
50.Ft void
51.Fn blf_ecb_decrypt "blf_ctx *state" "u_int8_t *data" "u_int32_t datalen"
52.Ft void
53.Fn blf_cbc_encrypt "blf_ctx *state" "u_int8_t *iv" "u_int8_t *data" "u_int32_t datalen"
54.Ft void
55.Fn blf_cbc_decrypt "blf_ctx *state" "u_int8_t *iv" "u_int8_t *data" "u_int32_t datalen"
48.Sh DESCRIPTION 56.Sh DESCRIPTION
49.Pa Blowfish 57.Pa Blowfish
50is a fast unpatented block cipher designed by Bruce Schneier. 58is a fast unpatented block cipher designed by Bruce Schneier.
@@ -59,12 +67,25 @@ The first argument to
59.Fn blf_enc 67.Fn blf_enc
60is the initalized state derived from 68is the initalized state derived from
61.Fn blf_key . 69.Fn blf_key .
62The stream of data is encrypted in Electronic Cookbook Mode (ECB) and 70The stream of 32-bit words is encrypted in Electronic Codebook
71Mode (ECB) and
63.Pa datalen 72.Pa datalen
64must be even. 73must be even.
65.Fn blf_dec 74.Fn blf_dec
66is used for decrypting Blowfish encrypted blocks. 75is used for decrypting Blowfish encrypted blocks.
67.Pp 76.Pp
77The functions
78.Fn blf_ecb_encrypt
79and
80.Fn blf_ecb_decrypt
81are used for encrypting and decrypting octet streams in ECB mode.
82The functions
83.Fn blf_cbc_encrypt
84and
85.Fn blf_cbc_decrypt
86are used for encrypting and decrypting octet streams in
87Cipherblock Chaining Mode (CBC).
88.Pp
68The functions 89The functions
69.Fn Blowfish_initstate , 90.Fn Blowfish_initstate ,
70.Fn Blowfish_expand0state , 91.Fn Blowfish_expand0state ,
@@ -74,8 +95,7 @@ and
74.Fn Blowfish_decipher 95.Fn Blowfish_decipher
75are used for customization of the 96are used for customization of the
76.Pa Blowfish 97.Pa Blowfish
77cipher, i.e. for the blowfish password hashing function or for 98cipher, e.g. for the blowfish password hashing function.
78implementation of Cipher Block Chaining Mode (CBC).
79.Sh SEE ALSO 99.Sh SEE ALSO
80.Xr crypt 3 , 100.Xr crypt 3 ,
81.Xr passwd 1 , 101.Xr passwd 1 ,