[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 4/7] crypto: use correct derived key size whe
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v2 4/7] crypto: use correct derived key size when timing pbkdf |
Date: |
Mon, 12 Sep 2016 10:41:48 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
On 09/12/2016 09:13 AM, Daniel P. Berrange wrote:
> Currently when timing the pbkdf algorithm a fixed key
> size of 32 bytes is used. This results in inaccurate
> timings for certain hashes depending on their digest
> size. For example when using sha1 with aes-256, this
> causes us to measure time for the master key digest
> doing 2 sha1 operations per iteration, instead of 1.
>
> Instead we should pass in the desired key size to the
> timing routine that matches the key size that will be
> used for real later.
>
> Signed-off-by: Daniel P. Berrange <address@hidden>
> ---
> crypto/block-luks.c | 2 ++
> crypto/pbkdf.c | 10 +++++++---
> include/crypto/pbkdf.h | 6 +++++-
> tests/test-crypto-pbkdf.c | 1 +
> 4 files changed, 15 insertions(+), 4 deletions(-)
>
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v2 0/7] crypto: misc tweaks & improvements to pbkdf code, Daniel P. Berrange, 2016/09/12
- [Qemu-devel] [PATCH v2 3/7] crypto: clear out buffer after timing pbkdf algorithm, Daniel P. Berrange, 2016/09/12
- [Qemu-devel] [PATCH v2 2/7] crypto: make PBKDF iterations configurable for LUKS format, Daniel P. Berrange, 2016/09/12
- [Qemu-devel] [PATCH v2 4/7] crypto: use correct derived key size when timing pbkdf, Daniel P. Berrange, 2016/09/12
- Re: [Qemu-devel] [PATCH v2 4/7] crypto: use correct derived key size when timing pbkdf,
Eric Blake <=
- [Qemu-devel] [PATCH v2 1/7] crypto: use uint64_t for pbkdf iteration count parameters, Daniel P. Berrange, 2016/09/12
- [Qemu-devel] [PATCH v2 5/7] crypto: remove bogus /= 2 for pbkdf iterations, Daniel P. Berrange, 2016/09/12
- [Qemu-devel] [PATCH v2 6/7] crypto: increase default pbkdf2 time for luks to 2 seconds, Daniel P. Berrange, 2016/09/12
- [Qemu-devel] [PATCH v2 7/7] crypto: support more hash algorithms for pbkdf, Daniel P. Berrange, 2016/09/12
- Re: [Qemu-devel] [PATCH v2 0/7] crypto: misc tweaks & improvements to pbkdf code, no-reply, 2016/09/12