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