2019-02-08 13:50:08 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
|
|
/*
|
|
|
|
* Common values for ARC4 Cipher Algorithm
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _CRYPTO_ARC4_H
|
|
|
|
#define _CRYPTO_ARC4_H
|
|
|
|
|
2019-06-12 16:19:53 +00:00
|
|
|
#include <linux/types.h>
|
|
|
|
|
2019-02-08 13:50:08 +00:00
|
|
|
#define ARC4_MIN_KEY_SIZE 1
|
|
|
|
#define ARC4_MAX_KEY_SIZE 256
|
|
|
|
#define ARC4_BLOCK_SIZE 1
|
|
|
|
|
2019-06-12 16:19:53 +00:00
|
|
|
struct arc4_ctx {
|
|
|
|
u32 S[256];
|
|
|
|
u32 x, y;
|
|
|
|
};
|
|
|
|
|
|
|
|
int arc4_setkey(struct arc4_ctx *ctx, const u8 *in_key, unsigned int key_len);
|
|
|
|
void arc4_crypt(struct arc4_ctx *ctx, u8 *out, const u8 *in, unsigned int len);
|
|
|
|
|
2019-02-08 13:50:08 +00:00
|
|
|
#endif /* _CRYPTO_ARC4_H */
|