cast128.h revision 1.4.16.1 1 1.4.16.1 skrll /* $NetBSD: cast128.h,v 1.4.16.1 2004/08/03 10:44:45 skrll Exp $ */
2 1.4.16.1 skrll /* $OpenBSD: cast.h,v 1.2 2002/03/14 01:26:51 millert Exp $ */
3 1.1 thorpej
4 1.1 thorpej /*
5 1.4.16.1 skrll * CAST-128 in C
6 1.4.16.1 skrll * Written by Steve Reid <sreid (at) sea-to-sky.net>
7 1.4.16.1 skrll * 100% Public Domain - no warranty
8 1.4.16.1 skrll * Released 1997.10.11
9 1.1 thorpej */
10 1.1 thorpej
11 1.4.16.1 skrll #ifndef _CAST128_H_
12 1.4.16.1 skrll #define _CAST128_H_
13 1.1 thorpej
14 1.4.16.1 skrll typedef struct {
15 1.4.16.1 skrll u_int32_t xkey[32]; /* Key, after expansion */
16 1.4.16.1 skrll int rounds; /* Number of rounds to use, 12 or 16 */
17 1.4.16.1 skrll } cast128_key;
18 1.4.16.1 skrll
19 1.4.16.1 skrll void cast128_setkey(cast128_key *key, const u_int8_t *rawkey, int keybytes);
20 1.4.16.1 skrll void cast128_encrypt(const cast128_key *key, const u_int8_t *inblock,
21 1.4.16.1 skrll u_int8_t *outblock);
22 1.4.16.1 skrll void cast128_decrypt(const cast128_key *key, const u_int8_t *inblock,
23 1.4.16.1 skrll u_int8_t *outblock);
24 1.1 thorpej
25 1.4.16.1 skrll #endif /* _CAST128_H_ */
26