aboutsummaryrefslogtreecommitdiffstats
path: root/fs/smbfs_common/arc4.h
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2021-09-08 23:59:26 -0500
committerSteve French <stfrench@microsoft.com>2021-09-08 23:59:26 -0500
commit23e91d8b7c5ae2bbd3a4582ec12c6a0cfcb19e85 (patch)
tree862d31c137eb91ea36fcef51ae830dfe9fb7c4cd /fs/smbfs_common/arc4.h
parentcifs: update FSCTL definitions (diff)
downloadlinux-dev-23e91d8b7c5ae2bbd3a4582ec12c6a0cfcb19e85.tar.xz
linux-dev-23e91d8b7c5ae2bbd3a4582ec12c6a0cfcb19e85.zip
cifs: rename cifs_common to smbfs_common
As we move to common code between client and server, we have been asked to make the names less confusing, and refer less to "cifs" and more to words which include "smb" instead to e.g. "smbfs" for the client (we already have "ksmbd" for the kernel server, and "smbd" for the user space Samba daemon). So to be more consistent in the naming of common code between client and server and reduce the risk of merge conflicts as more common code is added - rename "cifs_common" to "smbfs_common" (in future releases we also will rename the fs/cifs directory to fs/smbfs) Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smbfs_common/arc4.h')
-rw-r--r--fs/smbfs_common/arc4.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/fs/smbfs_common/arc4.h b/fs/smbfs_common/arc4.h
new file mode 100644
index 000000000000..12e71ec033a1
--- /dev/null
+++ b/fs/smbfs_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 */