diff options
| author | provos <> | 1998-08-10 18:40:59 +0000 |
|---|---|---|
| committer | provos <> | 1998-08-10 18:40:59 +0000 |
| commit | 48c04e20a6d223f0f0c769f5c8446952c06c8296 (patch) | |
| tree | 2d1c21fc2f437b6d7518df9957e38dcb302a941b /src/lib/libc/crypt/blowfish.3 | |
| parent | 4b7e5519b6321af405d7c2e537dd087cd98d41af (diff) | |
| download | openbsd-48c04e20a6d223f0f0c769f5c8446952c06c8296.tar.gz openbsd-48c04e20a6d223f0f0c769f5c8446952c06c8296.tar.bz2 openbsd-48c04e20a6d223f0f0c769f5c8446952c06c8296.zip | |
add ECB and CBC encryption for octet streams
Diffstat (limited to 'src/lib/libc/crypt/blowfish.3')
| -rw-r--r-- | src/lib/libc/crypt/blowfish.3 | 28 |
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 |
| 50 | is a fast unpatented block cipher designed by Bruce Schneier. | 58 | is 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 |
| 60 | is the initalized state derived from | 68 | is the initalized state derived from |
| 61 | .Fn blf_key . | 69 | .Fn blf_key . |
| 62 | The stream of data is encrypted in Electronic Cookbook Mode (ECB) and | 70 | The stream of 32-bit words is encrypted in Electronic Codebook |
| 71 | Mode (ECB) and | ||
| 63 | .Pa datalen | 72 | .Pa datalen |
| 64 | must be even. | 73 | must be even. |
| 65 | .Fn blf_dec | 74 | .Fn blf_dec |
| 66 | is used for decrypting Blowfish encrypted blocks. | 75 | is used for decrypting Blowfish encrypted blocks. |
| 67 | .Pp | 76 | .Pp |
| 77 | The functions | ||
| 78 | .Fn blf_ecb_encrypt | ||
| 79 | and | ||
| 80 | .Fn blf_ecb_decrypt | ||
| 81 | are used for encrypting and decrypting octet streams in ECB mode. | ||
| 82 | The functions | ||
| 83 | .Fn blf_cbc_encrypt | ||
| 84 | and | ||
| 85 | .Fn blf_cbc_decrypt | ||
| 86 | are used for encrypting and decrypting octet streams in | ||
| 87 | Cipherblock Chaining Mode (CBC). | ||
| 88 | .Pp | ||
| 68 | The functions | 89 | The 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 |
| 75 | are used for customization of the | 96 | are used for customization of the |
| 76 | .Pa Blowfish | 97 | .Pa Blowfish |
| 77 | cipher, i.e. for the blowfish password hashing function or for | 98 | cipher, e.g. for the blowfish password hashing function. |
| 78 | implementation 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 , |
