Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * Common values for serpent algorithms
0004  */
0005 
0006 #ifndef _CRYPTO_SERPENT_H
0007 #define _CRYPTO_SERPENT_H
0008 
0009 #include <linux/types.h>
0010 #include <linux/crypto.h>
0011 
0012 #define SERPENT_MIN_KEY_SIZE          0
0013 #define SERPENT_MAX_KEY_SIZE         32
0014 #define SERPENT_EXPKEY_WORDS        132
0015 #define SERPENT_BLOCK_SIZE       16
0016 
0017 struct serpent_ctx {
0018     u32 expkey[SERPENT_EXPKEY_WORDS];
0019 };
0020 
0021 int __serpent_setkey(struct serpent_ctx *ctx, const u8 *key,
0022              unsigned int keylen);
0023 int serpent_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen);
0024 
0025 void __serpent_encrypt(const void *ctx, u8 *dst, const u8 *src);
0026 void __serpent_decrypt(const void *ctx, u8 *dst, const u8 *src);
0027 
0028 #endif