Skip to content

crypto: misc tweaks & improvements to pbkdf code

Daniel P. Berrange qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest7 patches 6 repliesIn review
  2. v16 patches 9 repliesSuperseded

Changes in v2 from the cover letter

- Switch pbkdf APIs to use uint64_t for iteration count
- Fix detection of iteration count overflow (Eric)
- Misc typos (Eric)
- Use correct syntax for qapi 'since' annotation
- Use g_new instead of g_new0 (Eric)

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7crypto: use uint64_t for pbkdf iteration count parameterscrypto/block-luks.c crypto/pbkdf-gcrypt.c crypto/pbkdf-nettle.c +3 more+57 -401 reply
2/7crypto: make PBKDF iterations configurable for LUKS formatblock/crypto.c crypto/block-luks.c qapi/crypto.json+35 -12 replies
3/7crypto: clear out buffer after timing pbkdf algorithmcrypto/pbkdf.c+9 -41 reply
4/7crypto: use correct derived key size when timing pbkdfcrypto/block-luks.c crypto/pbkdf.c include/crypto/pbkdf.h +1 more+15 -41 reply
5/7crypto: remove bogus /= 2 for pbkdf iterationscrypto/block-luks.c+0 -40 replies
6/7crypto: increase default pbkdf2 time for luks to 2 secondscrypto/block-luks.c qapi/crypto.json+2 -20 replies
7/7crypto: support more hash algorithms for pbkdfcrypto/pbkdf-gcrypt.c crypto/pbkdf-nettle.c tests/test-crypto-pbkdf.c+117 -111 reply

Reviews trailers per patch

All 7 patches have a Reviewed-by or Acked-by.

PatchEric Blake
1/7R-b
2/7R-b
3/7R-b
4/7R-b
5/7R-b
6/7R-b
7/7R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [Qemu-devel] [PATCH v2 0/7] crypto: misc tweaks & improvements to pbkdf code

This is an update of

v1: https://lists.gnu.org/archive/html/qemu-devel/2016-09/msg01841.html

The core goal of this series was to make the pbkdf2 iteration time configurable. In doing so a number of other improvements were identified, and some updates done to match latest cryptsetup behaviour / recommendations.

Changed in v2:

- Switch pbkdf APIs to use uint64_t for iteration count
- Fix detection of iteration count overflow (Eric)
- Misc typos (Eric)
- Use correct syntax for qapi 'since' annotation
- Use g_new instead of g_new0 (Eric)

Daniel P. Berrange (7):
crypto: use uint64_t for pbkdf iteration count parameters
crypto: make PBKDF iterations configurable for LUKS format
crypto: clear out buffer after timing pbkdf algorithm
crypto: use correct derived key size when timing pbkdf
crypto: remove bogus /= 2 for pbkdf iterations
crypto: increase default pbkdf2 time for luks to 2 seconds
crypto: support more hash algorithms for pbkdf

 block/crypto.c            |  6 ++++
 crypto/block-luks.c       | 78 +++++++++++++++++++++++++++++++++--------------
 crypto/pbkdf-gcrypt.c     | 21 +++++++++++--
 crypto/pbkdf-nettle.c     | 71 ++++++++++++++++++++++++++++++++++++------
 crypto/pbkdf-stub.c       |  2 +-
 crypto/pbkdf.c            | 35 +++++++++++----------
 include/crypto/pbkdf.h    | 16 ++++++----
 qapi/crypto.json          |  6 +++-
 tests/test-crypto-pbkdf.c | 54 +++++++++++++++++++++++++++++++-
 9 files changed, 229 insertions(+), 60 deletions(-)
Signature · 1 line
2.7.4