^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) #ifndef _CRYPTO_CAST5_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) #define _CRYPTO_CAST5_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) #include <linux/types.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) #include <linux/crypto.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) #include <crypto/cast_common.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) #define CAST5_BLOCK_SIZE 8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #define CAST5_MIN_KEY_SIZE 5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #define CAST5_MAX_KEY_SIZE 16
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) struct cast5_ctx {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) u32 Km[16];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) u8 Kr[16];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) int rr; /* rr ? rounds = 12 : rounds = 16; (rfc 2144) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) int cast5_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) void __cast5_encrypt(struct cast5_ctx *ctx, u8 *dst, const u8 *src);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) void __cast5_decrypt(struct cast5_ctx *ctx, u8 *dst, const u8 *src);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) #endif