serpent.h 673 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Common values for serpent algorithms
  3. */
  4. #ifndef _CRYPTO_SERPENT_H
  5. #define _CRYPTO_SERPENT_H
  6. #include <linux/types.h>
  7. #include <linux/crypto.h>
  8. #define SERPENT_MIN_KEY_SIZE 0
  9. #define SERPENT_MAX_KEY_SIZE 32
  10. #define SERPENT_EXPKEY_WORDS 132
  11. #define SERPENT_BLOCK_SIZE 16
  12. struct serpent_ctx {
  13. u32 expkey[SERPENT_EXPKEY_WORDS];
  14. };
  15. int __serpent_setkey(struct serpent_ctx *ctx, const u8 *key,
  16. unsigned int keylen);
  17. int serpent_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen);
  18. void __serpent_encrypt(struct serpent_ctx *ctx, u8 *dst, const u8 *src);
  19. void __serpent_decrypt(struct serpent_ctx *ctx, u8 *dst, const u8 *src);
  20. #endif