summaryrefslogtreecommitdiff
path: root/crypto/algapi.c
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2018-04-30 15:51:49 -0700
committerJaegeuk Kim <jaegeuk@kernel.org>2018-06-28 13:24:35 -0700
commit27a0e77380a3767929df1b4e563096f51b90a041 (patch)
treeb9d8fdbb6f65b13f23612ab4acbfffb1bad57196 /crypto/algapi.c
parentf68a71fa8f773c82ed70feb398d7b1ab8cca2dd3 (diff)
fscrypt: only derive the needed portion of the key
Currently the key derivation function in fscrypt uses the master key length as the amount of output key material to derive. This works, but it means we can waste time deriving more key material than is actually used, e.g. most commonly, deriving 64 bytes for directories which only take a 32-byte AES-256-CTS-CBC key. It also forces us to validate that the master key length is a multiple of AES_BLOCK_SIZE, which wouldn't otherwise be necessary. Fix it to only derive the needed length key. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'crypto/algapi.c')
0 files changed, 0 insertions, 0 deletions