Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _CRYPTO_CAST5_H
0003 #define _CRYPTO_CAST5_H
0004 
0005 #include <linux/types.h>
0006 #include <linux/crypto.h>
0007 #include <crypto/cast_common.h>
0008 
0009 #define CAST5_BLOCK_SIZE 8
0010 #define CAST5_MIN_KEY_SIZE 5
0011 #define CAST5_MAX_KEY_SIZE 16
0012 
0013 struct cast5_ctx {
0014     u32 Km[16];
0015     u8 Kr[16];
0016     int rr; /* rr ? rounds = 12 : rounds = 16; (rfc 2144) */
0017 };
0018 
0019 int cast5_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen);
0020 
0021 void __cast5_encrypt(struct cast5_ctx *ctx, u8 *dst, const u8 *src);
0022 void __cast5_decrypt(struct cast5_ctx *ctx, u8 *dst, const u8 *src);
0023 
0024 #endif