The patch titled ecryptfs: unencrypted key size based on encrypted key size has been added to the -mm tree. Its filename is ecryptfs-unencrypted-key-size-based-on-encrypted-key-size.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: unencrypted key size based on encrypted key size From: Mike Halcrow <mhalcrow@xxxxxxxxxx> Set the unencrypted key size based on the encrypted key size. Code to handle the special case of AES-192; since the encrypted key size must be a multiple of the cipher block size, we have 32 bytes of encrypted key data, and we only take the first 24 bytes of the decrypted key data. Signed-off-by: Michael Halcrow <mhalcrow@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- fs/ecryptfs/keystore.c | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-) diff -puN fs/ecryptfs/keystore.c~ecryptfs-unencrypted-key-size-based-on-encrypted-key-size fs/ecryptfs/keystore.c --- 25/fs/ecryptfs/keystore.c~ecryptfs-unencrypted-key-size-based-on-encrypted-key-size Tue Jun 20 17:37:29 2006 +++ 25-akpm/fs/ecryptfs/keystore.c Tue Jun 20 17:37:29 2006 @@ -247,15 +247,12 @@ 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 0x07: - crypt_stat->key_size_bits = 128; - break; case 0x08: crypt_stat->key_size_bits = 192; break; - case 0x09: - crypt_stat->key_size_bits = 256; - break; + default: + crypt_stat->key_size_bits = + (*new_auth_tok)->session_key.encrypted_key_size << 3; } if (unlikely((*packet_size) > max_packet_size)) { ecryptfs_printk(KERN_ERR, "Packet size exceeds max\n"); _ 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