^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) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * Common values for blowfish algorithms
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) #ifndef _CRYPTO_BLOWFISH_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) #define _CRYPTO_BLOWFISH_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) #include <linux/types.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #include <linux/crypto.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #define BF_BLOCK_SIZE 8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #define BF_MIN_KEY_SIZE 4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) #define BF_MAX_KEY_SIZE 56
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) struct bf_ctx {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) u32 p[18];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) u32 s[1024];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) int blowfish_setkey(struct crypto_tfm *tfm, const u8 *key,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) unsigned int key_len);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) #endif