0001
0002 #ifndef _CRYPTO_CAST6_H
0003 #define _CRYPTO_CAST6_H
0004
0005 #include <linux/types.h>
0006 #include <linux/crypto.h>
0007 #include <crypto/cast_common.h>
0008
0009 #define CAST6_BLOCK_SIZE 16
0010 #define CAST6_MIN_KEY_SIZE 16
0011 #define CAST6_MAX_KEY_SIZE 32
0012
0013 struct cast6_ctx {
0014 u32 Km[12][4];
0015 u8 Kr[12][4];
0016 };
0017
0018 int __cast6_setkey(struct cast6_ctx *ctx, const u8 *key, unsigned int keylen);
0019 int cast6_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen);
0020
0021 void __cast6_encrypt(const void *ctx, u8 *dst, const u8 *src);
0022 void __cast6_decrypt(const void *ctx, u8 *dst, const u8 *src);
0023
0024 #endif