cast6.h 694 B

12345678910111213141516171819202122232425262728
  1. #ifndef _CRYPTO_CAST6_H
  2. #define _CRYPTO_CAST6_H
  3. #include <linux/types.h>
  4. #include <linux/crypto.h>
  5. #define CAST6_BLOCK_SIZE 16
  6. #define CAST6_MIN_KEY_SIZE 16
  7. #define CAST6_MAX_KEY_SIZE 32
  8. struct cast6_ctx {
  9. u32 Km[12][4];
  10. u8 Kr[12][4];
  11. };
  12. int __cast6_setkey(struct cast6_ctx *ctx, const u8 *key,
  13. unsigned int keylen, u32 *flags);
  14. int cast6_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen);
  15. void __cast6_encrypt(struct cast6_ctx *ctx, u8 *dst, const u8 *src);
  16. void __cast6_decrypt(struct cast6_ctx *ctx, u8 *dst, const u8 *src);
  17. extern const u32 cast6_s1[256];
  18. extern const u32 cast6_s2[256];
  19. extern const u32 cast6_s3[256];
  20. extern const u32 cast6_s4[256];
  21. #endif