4 #include <linux/types.h>
8 /* Structure for an expanded Twofish key. s contains the key-dependent
9 * S-boxes composed with the MDS matrix; w contains the eight "whitening"
10 * subkeys, K[0] through K[7]. k holds the remaining, "round" subkeys. Note
11 * that k[i] corresponds to what the Twofish paper calls K[i+8]. */
13 u_int32_t s
[4][256], w
[8], k
[32];
16 typedef TWOFISH_context twofish_context
;
17 int twofish_set_key(twofish_context
*tf_ctx
, const u_int8_t
* in_key
, int key_len
);
18 int twofish_encrypt(twofish_context
*tf_ctx
, const u_int8_t
* in
, u_int8_t
* out
);
19 int twofish_decrypt(twofish_context
* tf_ctx
, const u_int8_t
* in
, u_int8_t
* out
);
20 #endif /* TWOFISH_H */