12b49b906SJohannes Goetzfried #ifndef _CRYPTO_CAST6_H 22b49b906SJohannes Goetzfried #define _CRYPTO_CAST6_H 32b49b906SJohannes Goetzfried 42b49b906SJohannes Goetzfried #include <linux/types.h> 52b49b906SJohannes Goetzfried #include <linux/crypto.h> 62b49b906SJohannes Goetzfried 72b49b906SJohannes Goetzfried #define CAST6_BLOCK_SIZE 16 82b49b906SJohannes Goetzfried #define CAST6_MIN_KEY_SIZE 16 92b49b906SJohannes Goetzfried #define CAST6_MAX_KEY_SIZE 32 102b49b906SJohannes Goetzfried 112b49b906SJohannes Goetzfried struct cast6_ctx { 122b49b906SJohannes Goetzfried u32 Km[12][4]; 132b49b906SJohannes Goetzfried u8 Kr[12][4]; 142b49b906SJohannes Goetzfried }; 152b49b906SJohannes Goetzfried 162b49b906SJohannes Goetzfried int __cast6_setkey(struct cast6_ctx *ctx, const u8 *key, 172b49b906SJohannes Goetzfried unsigned int keylen, u32 *flags); 182b49b906SJohannes Goetzfried int cast6_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen); 192b49b906SJohannes Goetzfried 202b49b906SJohannes Goetzfried void __cast6_encrypt(struct cast6_ctx *ctx, u8 *dst, const u8 *src); 212b49b906SJohannes Goetzfried void __cast6_decrypt(struct cast6_ctx *ctx, u8 *dst, const u8 *src); 222b49b906SJohannes Goetzfried 232b49b906SJohannes Goetzfried #endif 24