gcc41: install mm_malloc.h
[dragonfly.git] / sys / crypto / cast128 / cast128.h
blobb43e5d4148a12b118be0f61e33e501093ffdece9
1 /* $FreeBSD: src/sys/crypto/cast128/cast128.h,v 1.1.2.3 2001/12/05 05:54:57 ume Exp $ */
2 /* $DragonFly: src/sys/crypto/cast128/cast128.h,v 1.3 2003/08/27 10:59:04 rob Exp $ */
3 /* $KAME: cast128.h,v 1.7 2001/11/27 09:47:32 sakane Exp $ */
5 /*
6 * heavily modified by Tomomi Suzuki <suzuki@grelot.elec.ryukoku.ac.jp>
7 */
8 /*
9 * The CAST-128 Encryption Algorithm (RFC 2144)
11 * original implementation <Hideo "Sir MaNMOS" Morisita>
12 * 1997/08/21
15 * Copyright (C) 1997 Hideo "Sir MANMOS" Morishita
16 * All rights reserved.
18 * Redistribution and use in source and binary forms, with or without
19 * modification, are permitted provided that the following conditions
20 * are met:
21 * 1. Redistributions of source code must retain the above copyright
22 * notice, this list of conditions and the following disclaimer.
23 * 2. Redistributions in binary form must reproduce the above copyright
24 * notice, this list of conditions and the following disclaimer in the
25 * documentation and/or other materials provided with the distribution.
27 * THIS SOFTWARE IS PROVIDED BY Hideo "Sir MaNMOS" Morishita ``AS IS'' AND
28 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30 * ARE DISCLAIMED. IN NO EVENT SHALL Hideo "Sir MaNMOS" Morishita BE LIABLE
31 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 * SUCH DAMAGE.
40 #ifndef RFC2144_CAST_128_H
41 #define RFC2144_CAST_128_H
43 #include <sys/param.h>
46 #define CAST128_ENCRYPT 1
47 #define CAST128_DECRYPT 0
50 extern void set_cast128_subkey (u_int32_t *, u_int8_t *, int);
51 extern void cast128_encrypt_round16 (u_int8_t *, const u_int8_t *,
52 u_int32_t *);
53 extern void cast128_decrypt_round16 (u_int8_t *, const u_int8_t *,
54 u_int32_t *);
55 extern void cast128_encrypt_round12 (u_int8_t *, const u_int8_t *,
56 u_int32_t *);
57 extern void cast128_decrypt_round12 (u_int8_t *, const u_int8_t *,
58 u_int32_t *);
59 #endif