18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci#ifndef ASM_X86_TWOFISH_H
38c2ecf20Sopenharmony_ci#define ASM_X86_TWOFISH_H
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci#include <linux/crypto.h>
68c2ecf20Sopenharmony_ci#include <crypto/twofish.h>
78c2ecf20Sopenharmony_ci#include <crypto/b128ops.h>
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci/* regular block cipher functions from twofish_x86_64 module */
108c2ecf20Sopenharmony_ciasmlinkage void twofish_enc_blk(const void *ctx, u8 *dst, const u8 *src);
118c2ecf20Sopenharmony_ciasmlinkage void twofish_dec_blk(const void *ctx, u8 *dst, const u8 *src);
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci/* 3-way parallel cipher functions */
148c2ecf20Sopenharmony_ciasmlinkage void __twofish_enc_blk_3way(const void *ctx, u8 *dst, const u8 *src,
158c2ecf20Sopenharmony_ci				       bool xor);
168c2ecf20Sopenharmony_ciasmlinkage void twofish_dec_blk_3way(const void *ctx, u8 *dst, const u8 *src);
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ci/* helpers from twofish_x86_64-3way module */
198c2ecf20Sopenharmony_ciextern void twofish_dec_blk_cbc_3way(const void *ctx, u8 *dst, const u8 *src);
208c2ecf20Sopenharmony_ciextern void twofish_enc_blk_ctr(const void *ctx, u8 *dst, const u8 *src,
218c2ecf20Sopenharmony_ci				le128 *iv);
228c2ecf20Sopenharmony_ciextern void twofish_enc_blk_ctr_3way(const void *ctx, u8 *dst, const u8 *src,
238c2ecf20Sopenharmony_ci				     le128 *iv);
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_ci#endif /* ASM_X86_TWOFISH_H */
26