summaryrefslogtreecommitdiff
path: root/fs/smb/common/arc4.h
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2023-05-22 04:46:30 +0300
committerSteve French <stfrench@microsoft.com>2023-05-25 00:29:21 +0300
commit38c8a9a52082579090e34c033d439ed2cd1a462d (patch)
treeca6c3bf5b2b912f32735c1aa0a045cd21a47a205 /fs/smb/common/arc4.h
parentcb8b02fd6343228966324528adf920bfb8b8e681 (diff)
downloadlinux-38c8a9a52082579090e34c033d439ed2cd1a462d.tar.xz
smb: move client and server files to common directory fs/smb
Move CIFS/SMB3 related client and server files (cifs.ko and ksmbd.ko and helper modules) to new fs/smb subdirectory: fs/cifs --> fs/smb/client fs/ksmbd --> fs/smb/server fs/smbfs_common --> fs/smb/common Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Acked-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smb/common/arc4.h')
-rw-r--r--fs/smb/common/arc4.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/fs/smb/common/arc4.h b/fs/smb/common/arc4.h
new file mode 100644
index 000000000000..12e71ec033a1
--- /dev/null
+++ b/fs/smb/common/arc4.h
@@ -0,0 +1,23 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Common values for ARC4 Cipher Algorithm
+ */
+
+#ifndef _CRYPTO_ARC4_H
+#define _CRYPTO_ARC4_H
+
+#include <linux/types.h>
+
+#define ARC4_MIN_KEY_SIZE 1
+#define ARC4_MAX_KEY_SIZE 256
+#define ARC4_BLOCK_SIZE 1
+
+struct arc4_ctx {
+ u32 S[256];
+ u32 x, y;
+};
+
+int cifs_arc4_setkey(struct arc4_ctx *ctx, const u8 *in_key, unsigned int key_len);
+void cifs_arc4_crypt(struct arc4_ctx *ctx, u8 *out, const u8 *in, unsigned int len);
+
+#endif /* _CRYPTO_ARC4_H */