xref: /kernel/linux/linux-5.10/include/crypto/cast5.h
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-5.10/include/crypto/
18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci#ifndef _CRYPTO_CAST5_H
38c2ecf20Sopenharmony_ci#define _CRYPTO_CAST5_H
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci#include <linux/types.h>
68c2ecf20Sopenharmony_ci#include <linux/crypto.h>
78c2ecf20Sopenharmony_ci#include <crypto/cast_common.h>
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci#define CAST5_BLOCK_SIZE 8
108c2ecf20Sopenharmony_ci#define CAST5_MIN_KEY_SIZE 5
118c2ecf20Sopenharmony_ci#define CAST5_MAX_KEY_SIZE 16
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_cistruct cast5_ctx {
148c2ecf20Sopenharmony_ci	u32 Km[16];
158c2ecf20Sopenharmony_ci	u8 Kr[16];
168c2ecf20Sopenharmony_ci	int rr;	/* rr ? rounds = 12 : rounds = 16; (rfc 2144) */
178c2ecf20Sopenharmony_ci};
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ciint cast5_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen);
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_civoid __cast5_encrypt(struct cast5_ctx *ctx, u8 *dst, const u8 *src);
228c2ecf20Sopenharmony_civoid __cast5_decrypt(struct cast5_ctx *ctx, u8 *dst, const u8 *src);
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ci#endif
25

Indexes created Thu Nov 07 10:32:03 CST 2024