diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2016-05-20 17:43:44 +0100 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2016-07-04 10:46:59 +0100 |
commit | 8b7cdba386d55ecee2caa26973c1d6c31822e801 (patch) | |
tree | efac27c8a317697f3310a402e14fd5a40fd9490d /crypto/aes.c | |
parent | 96b39d8327883094f52b0a3d3f25dba83d6d1d63 (diff) |
crypto: fix handling of iv generator hash defaults
When opening an existing LUKS volume, if the iv generator is
essiv, then the iv hash algorithm is mandatory to provide. We
must report an error if it is omitted in the cipher mode spec,
not silently default to hash 0 (md5). If the iv generator is
not essiv, then we explicitly ignore any iv hash algorithm,
rather than report an error, for compatibility with dm-crypt.
When creating a new LUKS volume, if the iv generator is essiv
and no iv hsah algorithm is provided, we should default to
using the sha256 hash.
Reported-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'crypto/aes.c')
0 files changed, 0 insertions, 0 deletions