blowfish.h (74106) | blowfish.h (91754) |
---|---|
1/* 2 * Blowfish - a fast block cipher designed by Bruce Schneier 3 * 4 * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 15 unchanged lines hidden (view full) --- 24 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 25 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 * | 1/* 2 * Blowfish - a fast block cipher designed by Bruce Schneier 3 * 4 * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 15 unchanged lines hidden (view full) --- 24 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 25 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 * |
32 * $FreeBSD: head/secure/lib/libcrypt/blowfish.h 74106 2001-03-11 16:05:43Z markm $ | 32 * $FreeBSD: head/secure/lib/libcrypt/blowfish.h 91754 2002-03-06 17:18:09Z markm $ |
33 */ 34 35/* 36 * FreeBSD implementation by Paul Herman <pherman@frenchfries.net> 37 */ 38 39#ifndef _BLF_H_ 40#define _BLF_H_ --- 15 unchanged lines hidden (view full) --- 56} blf_ctx; 57 58/* Raw access to customized Blowfish 59 * blf_key is just: 60 * Blowfish_initstate( state ) 61 * Blowfish_expand0state( state, key, keylen ) 62 */ 63 | 33 */ 34 35/* 36 * FreeBSD implementation by Paul Herman <pherman@frenchfries.net> 37 */ 38 39#ifndef _BLF_H_ 40#define _BLF_H_ --- 15 unchanged lines hidden (view full) --- 56} blf_ctx; 57 58/* Raw access to customized Blowfish 59 * blf_key is just: 60 * Blowfish_initstate( state ) 61 * Blowfish_expand0state( state, key, keylen ) 62 */ 63 |
64void Blowfish_encipher __P((blf_ctx *, u_int32_t *, u_int32_t *)); 65void Blowfish_decipher __P((blf_ctx *, u_int32_t *, u_int32_t *)); 66void Blowfish_initstate __P((blf_ctx *)); 67void Blowfish_expand0state __P((blf_ctx *, const u_int8_t *, u_int16_t)); | 64void Blowfish_encipher(blf_ctx *, u_int32_t *, u_int32_t *); 65void Blowfish_decipher(blf_ctx *, u_int32_t *, u_int32_t *); 66void Blowfish_initstate(blf_ctx *); 67void Blowfish_expand0state(blf_ctx *, const u_int8_t *, u_int16_t); |
68void Blowfish_expandstate | 68void Blowfish_expandstate |
69 __P((blf_ctx *, const u_int8_t *, u_int16_t, const u_int8_t *, u_int16_t)); | 69 (blf_ctx *, const u_int8_t *, u_int16_t, const u_int8_t *, u_int16_t); |
70 71/* Standard Blowfish */ 72 | 70 71/* Standard Blowfish */ 72 |
73void blf_key __P((blf_ctx *, const u_int8_t *, u_int16_t)); 74void blf_enc __P((blf_ctx *, u_int32_t *, u_int16_t)); 75void blf_dec __P((blf_ctx *, u_int32_t *, u_int16_t)); | 73void blf_key(blf_ctx *, const u_int8_t *, u_int16_t); 74void blf_enc(blf_ctx *, u_int32_t *, u_int16_t); 75void blf_dec(blf_ctx *, u_int32_t *, u_int16_t); |
76 | 76 |
77void blf_ecb_encrypt __P((blf_ctx *, u_int8_t *, u_int32_t)); 78void blf_ecb_decrypt __P((blf_ctx *, u_int8_t *, u_int32_t)); | 77void blf_ecb_encrypt(blf_ctx *, u_int8_t *, u_int32_t); 78void blf_ecb_decrypt(blf_ctx *, u_int8_t *, u_int32_t); |
79 | 79 |
80void blf_cbc_encrypt __P((blf_ctx *, u_int8_t *, u_int8_t *, u_int32_t)); 81void blf_cbc_decrypt __P((blf_ctx *, u_int8_t *, u_int8_t *, u_int32_t)); | 80void blf_cbc_encrypt(blf_ctx *, u_int8_t *, u_int8_t *, u_int32_t); 81void blf_cbc_decrypt(blf_ctx *, u_int8_t *, u_int8_t *, u_int32_t); |
82 83/* Converts u_int8_t to u_int32_t */ | 82 83/* Converts u_int8_t to u_int32_t */ |
84u_int32_t Blowfish_stream2word __P((const u_int8_t *, u_int16_t , u_int16_t *)); | 84u_int32_t Blowfish_stream2word(const u_int8_t *, u_int16_t , u_int16_t *); |
85 86#endif | 85 86#endif |