1 /* SPDX-License-Identifier: GPL-2.0 */ << 2 /* 1 /* 3 * Common values for serpent algorithms 2 * Common values for serpent algorithms 4 */ 3 */ 5 4 6 #ifndef _CRYPTO_SERPENT_H 5 #ifndef _CRYPTO_SERPENT_H 7 #define _CRYPTO_SERPENT_H 6 #define _CRYPTO_SERPENT_H 8 7 9 #include <linux/types.h> 8 #include <linux/types.h> 10 #include <linux/crypto.h> 9 #include <linux/crypto.h> 11 10 12 #define SERPENT_MIN_KEY_SIZE 0 11 #define SERPENT_MIN_KEY_SIZE 0 13 #define SERPENT_MAX_KEY_SIZE 32 12 #define SERPENT_MAX_KEY_SIZE 32 14 #define SERPENT_EXPKEY_WORDS 132 13 #define SERPENT_EXPKEY_WORDS 132 15 #define SERPENT_BLOCK_SIZE 16 14 #define SERPENT_BLOCK_SIZE 16 16 15 17 struct serpent_ctx { 16 struct serpent_ctx { 18 u32 expkey[SERPENT_EXPKEY_WORDS]; 17 u32 expkey[SERPENT_EXPKEY_WORDS]; 19 }; 18 }; 20 19 21 int __serpent_setkey(struct serpent_ctx *ctx, 20 int __serpent_setkey(struct serpent_ctx *ctx, const u8 *key, 22 unsigned int keylen); 21 unsigned int keylen); 23 int serpent_setkey(struct crypto_tfm *tfm, con 22 int serpent_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen); 24 23 25 void __serpent_encrypt(const void *ctx, u8 *ds !! 24 void __serpent_encrypt(struct serpent_ctx *ctx, u8 *dst, const u8 *src); 26 void __serpent_decrypt(const void *ctx, u8 *ds !! 25 void __serpent_decrypt(struct serpent_ctx *ctx, u8 *dst, const u8 *src); 27 26 28 #endif 27 #endif 29 28
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.