+ ecryptfs-add-define-values-for-cipher-codes-from-rfc2440-openpgp.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     ecryptfs: add #define values for cipher codes from RFC2440 (OpenPGP)

has been added to the -mm tree.  Its filename is

     ecryptfs-add-define-values-for-cipher-codes-from-rfc2440-openpgp.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: ecryptfs: add #define values for cipher codes from RFC2440 (OpenPGP)
From: Mike Halcrow <mhalcrow@xxxxxxxxxx>


Add #define values for cipher codes from RFC2440 (OpenPGP).

Signed-off-by: Michael Halcrow <mhalcrow@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 fs/ecryptfs/crypto.c          |   19 +++++++++----------
 fs/ecryptfs/ecryptfs_kernel.h |    9 +++++++++
 fs/ecryptfs/keystore.c        |    8 ++++----
 3 files changed, 22 insertions(+), 14 deletions(-)

diff -puN fs/ecryptfs/crypto.c~ecryptfs-add-define-values-for-cipher-codes-from-rfc2440-openpgp fs/ecryptfs/crypto.c
--- 25/fs/ecryptfs/crypto.c~ecryptfs-add-define-values-for-cipher-codes-from-rfc2440-openpgp	Tue Jun 20 17:37:39 2006
+++ 25-akpm/fs/ecryptfs/crypto.c	Tue Jun 20 17:37:39 2006
@@ -1023,18 +1023,17 @@ struct ecryptfs_cipher_code_str_map_elem
 
 /* Add support for additional ciphers by adding elements here. The
  * cipher_code is whatever OpenPGP applicatoins use to identify the
- * ciphers. */
-/* List in order of probability. */
+ * ciphers. List in order of probability. */
 static struct ecryptfs_cipher_code_str_map_elem
 ecryptfs_cipher_code_str_map[] = {
-	{"aes", 0x07}, /* AES-128 */
-	{"blowfish", 0x04},
-	{"des3_ede", 0x02},
-	{"cast5", 0x03},
-	{"twofish", 0x0a},
-	{"cast6", 0x0b},
-	{"aes", 0x08}, /* AES-192 */
-	{"aes", 0x09} /* AES-256 */
+	{"aes",RFC2440_CIPHER_AES_128 },
+	{"blowfish", RFC2440_CIPHER_BLOWFISH},
+	{"des3_ede", RFC2440_CIPHER_DES3_EDE},
+	{"cast5", RFC2440_CIPHER_CAST_5},
+	{"twofish", RFC2440_CIPHER_TWOFISH},
+	{"cast6", RFC2440_CIPHER_CAST_6},
+	{"aes", RFC2440_CIPHER_AES_192},
+	{"aes", RFC2440_CIPHER_AES_256}
 };
 
 /**
diff -puN fs/ecryptfs/ecryptfs_kernel.h~ecryptfs-add-define-values-for-cipher-codes-from-rfc2440-openpgp fs/ecryptfs/ecryptfs_kernel.h
--- 25/fs/ecryptfs/ecryptfs_kernel.h~ecryptfs-add-define-values-for-cipher-codes-from-rfc2440-openpgp	Tue Jun 20 17:37:39 2006
+++ 25-akpm/fs/ecryptfs/ecryptfs_kernel.h	Tue Jun 20 17:37:39 2006
@@ -53,6 +53,15 @@
 #define ECRYPTFS_DEFAULT_EXTENT_SIZE 4096
 #define ECRYPTFS_MINIMUM_HEADER_EXTENT_SIZE 8192
 
+#define RFC2440_CIPHER_DES3_EDE 0x02
+#define RFC2440_CIPHER_CAST_5 0x03
+#define RFC2440_CIPHER_BLOWFISH 0x04
+#define RFC2440_CIPHER_AES_128 0x07
+#define RFC2440_CIPHER_AES_192 0x08
+#define RFC2440_CIPHER_AES_256 0x09
+#define RFC2440_CIPHER_TWOFISH 0x0a
+#define RFC2440_CIPHER_CAST_6 0x0b
+
 #define ECRYPTFS_SET_FLAG(flag_bit_vector, flag) (flag_bit_vector |= (flag))
 #define ECRYPTFS_CLEAR_FLAG(flag_bit_vector, flag) (flag_bit_vector &= ~(flag))
 #define ECRYPTFS_CHECK_FLAG(flag_bit_vector, flag) (flag_bit_vector & (flag))
diff -puN fs/ecryptfs/keystore.c~ecryptfs-add-define-values-for-cipher-codes-from-rfc2440-openpgp fs/ecryptfs/keystore.c
--- 25/fs/ecryptfs/keystore.c~ecryptfs-add-define-values-for-cipher-codes-from-rfc2440-openpgp	Tue Jun 20 17:37:39 2006
+++ 25-akpm/fs/ecryptfs/keystore.c	Tue Jun 20 17:37:39 2006
@@ -247,7 +247,7 @@ parse_tag_3_packet(struct ecryptfs_crypt
 	/* A little extra work to differentiate among the AES key
 	 * sizes; see RFC2440 */
 	switch(data[(*packet_size)++]) {
-	case 0x08:
+	case RFC2440_CIPHER_AES_192:
 		crypt_stat->key_size_bits = 192;
 		break;
 	default:
@@ -931,15 +931,15 @@ encrypted_session_key_set:
 		goto out;
 	}
 	/* If it is AES, we need to get more specific. */
-	if (cipher_code == 0x07) {
+	if (cipher_code == RFC2440_CIPHER_AES_128){
 		switch (crypt_stat->key_size_bits) {
 		case 128:
 			break;
 		case 192:
-			cipher_code = 0x08;	/* AES-192 */
+			cipher_code = RFC2440_CIPHER_AES_192;
 			break;
 		case 256:
-			cipher_code = 0x09;	/* AES-256 */
+			cipher_code = RFC2440_CIPHER_AES_256;
 			break;
 		default:
 			rc = -EINVAL;
_

Patches currently in -mm which might be from mhalcrow@xxxxxxxxxx are

ecryptfs-fs-makefile-and-fs-kconfig.patch
ecryptfs-fs-makefile-and-fs-kconfig-remove-ecrypt_debug-from-fs-kconfig.patch
ecryptfs-documentation.patch
ecryptfs-makefile.patch
ecryptfs-main-module-functions.patch
ecryptfs-main-module-functions-uint16_t-u16.patch
ecryptfs-header-declarations.patch
ecryptfs-header-declarations-update.patch
ecryptfs-header-declarations-update-convert-signed-data-types-to-unsigned-data-types.patch
ecryptfs-header-declarations-remove-unnecessary-ifndefs.patch
ecryptfs-superblock-operations.patch
ecryptfs-dentry-operations.patch
ecryptfs-file-operations.patch
ecryptfs-file-operations-remove-null-==-syntax.patch
ecryptfs-file-operations-remove-extraneous-read-of-inode-size-from-header.patch
ecryptfs-file-operations-fix.patch
ecryptfs-file-operations-fix-premature-release-of-file_info-memory.patch
ecryptfs-inode-operations.patch
ecryptfs-mmap-operations.patch
mark-address_space_operations-const-vs-ecryptfs-mmap-operations.patch
ecryptfs-keystore.patch
ecryptfs-crypto-functions.patch
ecryptfs-debug-functions.patch
ecryptfs-alpha-build-fix.patch
ecryptfs-convert-assert-to-bug_on.patch
ecryptfs-remove-unnecessary-null-checks.patch
ecryptfs-rewrite-ecryptfs_fsync.patch
ecryptfs-overhaul-file-locking.patch
ecryptfs-dont-muck-with-the-existing-nameidata-structures.patch
ecryptfs-asm-scatterlisth-linux-scatterlisth.patch
ecryptfs-support-for-larger-maximum-key-size.patch
ecryptfs-add-codes-for-additional-ciphers.patch
ecryptfs-unencrypted-key-size-based-on-encrypted-key-size.patch
ecryptfs-packet-and-key-management-update-for-variable-key-size.patch
ecryptfs-add-ecryptfs_-prefix-to-mount-options-key-size-parameter.patch
ecryptfs-set-the-key-size-from-the-default-for-the-mount.patch
ecryptfs-check-for-weak-keys.patch
ecryptfs-add-define-values-for-cipher-codes-from-rfc2440-openpgp.patch
ecryptfs-convert-bits-to-bytes.patch
ecryptfs-more-elegant-aes-key-size-manipulation.patch
ecryptfs-more-elegant-aes-key-size-manipulation-tidy.patch
ecryptfs-more-intelligent-use-of-tfm-objects.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux