blob: 65ce86cd2a1b37e57403231b3affd8e0bc213ca5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
/*
* $Id$
*
* CAST-128 in C
* Written by Steve Reid <sreid@sea-to-sky.net>
* 100% Public Domain - no warranty
* Released 1997.10.11
*/
#ifndef _CAST_H_INCLUDED
#define _CAST_H_INCLUDED
#define CAST_MIN_KEYSIZE 5
#define CAST_MAX_KEYSIZE 16
#define CAST_BLOCKSIZE 8
#define CAST_SMALL_KEY 10
#define CAST_SMALL_ROUNDS 12
#define CAST_FULL_ROUNDS 16
#include "crypto_types.h"
struct cast_key {
unsigned INT32 xkey[32]; /* Key, after expansion */
unsigned rounds; /* Number of rounds to use, 12 or 16 */
};
void cast_setkey(struct cast_key *key, unsigned INT8 *rawkey,
unsigned keybytes);
void cast_encrypt(struct cast_key *key, unsigned INT8 *inblock,
unsigned INT8 *outblock);
void cast_decrypt(struct cast_key *key, unsigned INT8 *inblock,
unsigned INT8* outblock);
#endif /* ifndef _CAST_H_INCLUDED */
|