blf.h revision 2
2N/A/* $OpenBSD: blf.h,v 1.6 2002/02/16 21:27:17 millert Exp $ */ 2N/A * Blowfish - a fast block cipher designed by Bruce Schneier 2N/A * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de> 2N/A * All rights reserved. 2N/A * Redistribution and use in source and binary forms, with or without 2N/A * modification, are permitted provided that the following conditions 2N/A * 1. Redistributions of source code must retain the above copyright 2N/A * notice, this list of conditions and the following disclaimer. 2N/A * 2. Redistributions in binary form must reproduce the above copyright 2N/A * notice, this list of conditions and the following disclaimer in the 2N/A * documentation and/or other materials provided with the distribution. 2N/A * 3. All advertising materials mentioning features or use of this software 2N/A * must display the following acknowledgement: 2N/A * This product includes software developed by Niels Provos. 2N/A * 4. The name of the author may not be used to endorse or promote products 2N/A * derived from this software without specific prior written permission. 2N/A * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 2N/A * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 2N/A * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 2N/A * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 2N/A * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 2N/A * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2N/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2N/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2N/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 2N/A * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2N/A/* Schneier specifies a maximum key length of 56 bytes. 2N/A * This ensures that every key bit affects every cipher 2N/A * bit. However, the subkeys can hold up to 72 bytes. 2N/A * Warning: For normal blowfish encryption only 56 bytes 2N/A * of the key affect all cipherbits. 2N/A/* Blowfish context */ 2N/A/* Raw access to customized Blowfish 2N/A * Blowfish_initstate( state ) 2N/A * Blowfish_expand0state( state, key, keylen ) 2N/A/* Standard Blowfish */ 2N/A/* Converts uint8_t to uint32_t */