linux/fs/crypto
Eric Biggers 590f497d08 fscrypt: separate key lookup from key derivation
Refactor the confusingly-named function 'validate_user_key()' into a new
function 'find_and_derive_key()' which first finds the keyring key, then
does the key derivation.  Among other benefits this avoids the strange
behavior we had previously where if key derivation failed for some
reason, then we would fall back to the alternate key prefix.  Now, we'll
only fall back to the alternate key prefix if a valid key isn't found.

This patch also improves the warning messages that are logged when the
keyring key's payload is invalid.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-05-20 16:21:05 -04:00
..
bio.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
crypto.c fscrypt: use a common logging function 2018-05-20 16:21:05 -04:00
fname.c fscrypt: use a common logging function 2018-05-20 16:21:05 -04:00
fscrypt_private.h fscrypt: use a common logging function 2018-05-20 16:21:05 -04:00
hooks.c fscrypt: use a common logging function 2018-05-20 16:21:05 -04:00
Kconfig fscrypt: add support for AES-128-CBC 2017-06-23 20:05:07 -04:00
keyinfo.c fscrypt: separate key lookup from key derivation 2018-05-20 16:21:05 -04:00
Makefile fscrypt: new helper function - fscrypt_file_open() 2017-10-18 19:52:37 -04:00
policy.c fscrypt: lots of cleanups, mostly courtesy by Eric Biggers 2017-11-14 11:35:15 -08:00