moved alg-serpent and alg-twofish scenarios to gcrypt-ikev1
[strongswan.git] / src / libstrongswan / plugins / twofish / twofish.h
1 #ifndef TWOFISH_H
2 #define TWOFISH_H
3 #ifdef __KERNEL__
4 #include <linux/types.h>
5 #else
6 #include <sys/types.h>
7 #endif
8
9 /* Structure for an expanded Twofish key. s contains the key-dependent
10 * S-boxes composed with the MDS matrix; w contains the eight "whitening"
11 * subkeys, K[0] through K[7]. k holds the remaining, "round" subkeys. Note
12 * that k[i] corresponds to what the Twofish paper calls K[i+8].
13 */
14 struct twofish_context {
15 u_int32_t s[4][256], w[8], k[32];
16 };
17
18 typedef struct twofish_context twofish_context;
19
20 int twofish_set_key(twofish_context *tf_ctx, const u_int8_t * in_key, int key_len);
21 int twofish_encrypt(twofish_context *tf_ctx, const u_int8_t * in, u_int8_t * out);
22 int twofish_decrypt(twofish_context * tf_ctx, const u_int8_t * in, u_int8_t * out);
23
24 #endif /* TWOFISH_H */