Linux Audio

Check our new training course

Loading...
Note: File does not exist in v6.8.
 1/* SPDX-License-Identifier: GPL-2.0 */
 2/*
 3 * Common values for the Salsa20 algorithm
 4 */
 5
 6#ifndef _CRYPTO_SALSA20_H
 7#define _CRYPTO_SALSA20_H
 8
 9#include <linux/types.h>
10
11#define SALSA20_IV_SIZE		8
12#define SALSA20_MIN_KEY_SIZE	16
13#define SALSA20_MAX_KEY_SIZE	32
14#define SALSA20_BLOCK_SIZE	64
15
16struct crypto_skcipher;
17
18struct salsa20_ctx {
19	u32 initial_state[16];
20};
21
22void crypto_salsa20_init(u32 *state, const struct salsa20_ctx *ctx,
23			 const u8 *iv);
24int crypto_salsa20_setkey(struct crypto_skcipher *tfm, const u8 *key,
25			  unsigned int keysize);
26
27#endif /* _CRYPTO_SALSA20_H */