summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmc <>2016-11-06 18:54:34 +0000
committerjmc <>2016-11-06 18:54:34 +0000
commite638403f591087e1ef609e3bc88e3028a97af60e (patch)
treece917e36da781adfcbc395ae0800a1bcdfd89e38
parentf71f312b19aedeadadd635424419f28542e7f38f (diff)
downloadopenbsd-e638403f591087e1ef609e3bc88e3028a97af60e.tar.gz
openbsd-e638403f591087e1ef609e3bc88e3028a97af60e.tar.bz2
openbsd-e638403f591087e1ef609e3bc88e3028a97af60e.zip
some cleanup;
-rw-r--r--src/lib/libcrypto/man/BF_set_key.359
1 files changed, 28 insertions, 31 deletions
diff --git a/src/lib/libcrypto/man/BF_set_key.3 b/src/lib/libcrypto/man/BF_set_key.3
index 5eca4409a0..108db57036 100644
--- a/src/lib/libcrypto/man/BF_set_key.3
+++ b/src/lib/libcrypto/man/BF_set_key.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: BF_set_key.3,v 1.3 2016/11/06 15:52:50 jmc Exp $ 1.\" $OpenBSD: BF_set_key.3,v 1.4 2016/11/06 18:54:34 jmc Exp $
2.\" 2.\"
3.Dd $Mdocdate: November 6 2016 $ 3.Dd $Mdocdate: November 6 2016 $
4.Dt BF_SET_KEY 3 4.Dt BF_SET_KEY 3
@@ -22,6 +22,16 @@
22.Fa "const unsigned char *data" 22.Fa "const unsigned char *data"
23.Fc 23.Fc
24.Ft void 24.Ft void
25.Fo BF_encrypt
26.Fa "BF_LONG *data"
27.Fa "const BF_KEY *key"
28.Fc
29.Ft void
30.Fo BF_decrypt
31.Fa "BF_LONG *data"
32.Fa "const BF_KEY *key"
33.Fc
34.Ft void
25.Fo BF_ecb_encrypt 35.Fo BF_ecb_encrypt
26.Fa "const unsigned char *in" 36.Fa "const unsigned char *in"
27.Fa "unsigned char *out" 37.Fa "unsigned char *out"
@@ -60,27 +70,19 @@
60.Fo BF_options 70.Fo BF_options
61.Fa void 71.Fa void
62.Fc 72.Fc
63.Ft void
64.Fo BF_encrypt
65.Fa "BF_LONG *data"
66.Fa "const BF_KEY *key"
67.Fc
68.Ft void
69.Fo BF_decrypt
70.Fa "BF_LONG *data"
71.Fa "const BF_KEY *key"
72.Fc
73.Sh DESCRIPTION 73.Sh DESCRIPTION
74This library implements the Blowfish cipher, 74This library implements the Blowfish cipher,
75which was invented and described by 75which was invented and defined by
76.An Counterpane . 76.An Counterpane .
77Note that applications should use higher level functions such as
78.Xr EVP_EncryptInit 3
79instead of calling the Blowfish functions directly.
77.Pp 80.Pp
78Blowfish is a block cipher that operates on 64 bit (8 byte) blocks of data. 81Blowfish is a block cipher that operates on 64-bit (8 byte) blocks of data.
79It uses a variable size key, but typically, 128 bit (16 byte) keys 82It uses a variable size key, but typically, 128-bit (16 byte) keys
80are considered good for strong encryption. 83are considered good for strong encryption.
81Blowfish can be used in the same modes as DES (see 84Blowfish can be used in the same modes as DES
82.Xr des_modes 3 ) . 85and is currently one of the faster block ciphers.
83Blowfish is currently one of the faster block ciphers.
84It is quite a bit faster than DES, and much faster than IDEA or RC2. 86It is quite a bit faster than DES, and much faster than IDEA or RC2.
85.Pp 87.Pp
86Blowfish consists of a key setup phase 88Blowfish consists of a key setup phase
@@ -139,8 +141,8 @@ and
139.Fn BF_ofb64_encrypt 141.Fn BF_ofb64_encrypt
140are used to encrypt an variable number of bytes (the amount 142are used to encrypt an variable number of bytes (the amount
141does not have to be an exact multiple of 8). 143does not have to be an exact multiple of 8).
142The purpose of the latter two is to simulate stream ciphers, 144The purpose of the latter two is to simulate stream ciphers and,
143and therefore, they need the parameter 145therefore, they need the parameter
144.Fa num , 146.Fa num ,
145which is a pointer to an integer where the current offset in 147which is a pointer to an integer where the current offset in
146.Fa ivec 148.Fa ivec
@@ -151,7 +153,7 @@ is initialized.
151.Pp 153.Pp
152.Fn BF_cbc_encrypt 154.Fn BF_cbc_encrypt
153is the Cipher Block Chaining function for Blowfish. 155is the Cipher Block Chaining function for Blowfish.
154It encrypts or decrypts the 64 bits chunks of 156It encrypts or decrypts the 64-bit chunks of
155.Fa in 157.Fa in
156using the key 158using the key
157.Fa schedule , 159.Fa schedule ,
@@ -164,10 +166,10 @@ or decryption
164.Pq Dv BF_DECRYPT 166.Pq Dv BF_DECRYPT
165shall be performed. 167shall be performed.
166.Fa ivec 168.Fa ivec
167must point at an 8 byte long initialization vector. 169must point at an 8-byte long initialization vector.
168.Pp 170.Pp
169.Fn BF_cfb64_encrypt 171.Fn BF_cfb64_encrypt
170is the CFB mode for Blowfish with 64 bit feedback. 172is the CFB mode for Blowfish with 64-bit feedback.
171It encrypts or decrypts the bytes in 173It encrypts or decrypts the bytes in
172.Fa in 174.Fa in
173using the key 175using the key
@@ -182,12 +184,12 @@ or decryption
182shall be performed. 184shall be performed.
183.Fa ivec 185.Fa ivec
184must point at an 186must point at an
1858 byte long initialization vector. 1878-byte long initialization vector.
186.Fa num 188.Fa num
187must point at an integer which must be initially zero. 189must point at an integer which must be initially zero.
188.Pp 190.Pp
189.Fn BF_ofb64_encrypt 191.Fn BF_ofb64_encrypt
190is the OFB mode for Blowfish with 64 bit feedback. 192is the OFB mode for Blowfish with 64-bit feedback.
191It uses the same parameters as 193It uses the same parameters as
192.Fn BF_cfb64_encrypt , 194.Fn BF_cfb64_encrypt ,
193which must be initialized the same way. 195which must be initialized the same way.
@@ -200,18 +202,13 @@ They encrypt/decrypt the first 64 bits of the vector pointed by
200.Fa data , 202.Fa data ,
201using the key 203using the key
202.Fa key . 204.Fa key .
203These functions should not be used unless you implement 'modes' of Blowfish. 205These functions should not be used unless implementing `modes' of Blowfish.
204The alternative is to use 206The alternative is to use
205.Fn BF_ecb_encrypt . 207.Fn BF_ecb_encrypt .
206If you still want to use these functions, you should be aware 208Be aware that these functions take each 32-bit chunk in host-byte order,
207that they take each 32-bit chunk in host-byte order,
208which is little-endian on little-endian platforms 209which is little-endian on little-endian platforms
209and big-endian on big-endian ones. 210and big-endian on big-endian ones.
210.Sh RETURN VALUES 211.Sh RETURN VALUES
211None of the functions presented here return any value. 212None of the functions presented here return any value.
212.Sh NOTE
213Applications should use the higher level functions
214.Xr EVP_EncryptInit 3
215etc. instead of calling the blowfish functions directly.
216.Sh HISTORY 213.Sh HISTORY
217The Blowfish functions are available in all versions of SSLeay and OpenSSL. 214The Blowfish functions are available in all versions of SSLeay and OpenSSL.