diff options
author | Andrey Markovytch <andreym@codeaurora.org> | 2015-07-08 11:24:29 +0300 |
---|---|---|
committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 21:24:07 -0700 |
commit | 8928f8683bcd0236f5653963deee3bc225fb2206 (patch) | |
tree | d41d250d59f85899ad1778344b3ee3be75054eac /fs/ecryptfs/debug.c | |
parent | 584531e72e48d4ef1403eaac82fa85be2135f5c7 (diff) |
PFK: fixed issue where key in TZ was not set properly
When key is set in ICE via TZ, HLOS should send two parts, SALT and
the KEY itself according to AES standards. KEY was used for both parts.
Change-Id: I453dea289b01bdf49352d5209255966052f5dc1b
Signed-off-by: Andrey Markovytch <andreym@codeaurora.org>
Diffstat (limited to 'fs/ecryptfs/debug.c')
-rw-r--r-- | fs/ecryptfs/debug.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/ecryptfs/debug.c b/fs/ecryptfs/debug.c index 3d2bdf546ec6..1276764f3716 100644 --- a/fs/ecryptfs/debug.c +++ b/fs/ecryptfs/debug.c @@ -119,3 +119,16 @@ void ecryptfs_dump_hex(char *data, int bytes) printk("\n"); } +void ecryptfs_dump_salt_hex(char *data, int key_size, char *cipher) +{ + size_t salt_size = ecryptfs_get_salt_size_for_cipher(cipher); + + if (0 == salt_size) + return; + + if (!ecryptfs_check_space_for_salt(key_size, salt_size)) + return; + + ecryptfs_printk(KERN_DEBUG, "Decrypted session salt key:\n"); + ecryptfs_dump_hex(data + key_size, salt_size); +} |