All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 5/6] crypto: increase default pbkdf2 time for luks to 2 seconds
Date: Thu,  8 Sep 2016 17:27:26 +0100	[thread overview]
Message-ID: <1473352047-908-6-git-send-email-berrange@redhat.com> (raw)
In-Reply-To: <1473352047-908-1-git-send-email-berrange@redhat.com>

cryptsetup recently increased the default pbkdf2 time to 2 seconds
to partially mitigate improvements in hardware performance wrt
brute-forcing the pbkdf algorithm. This updates QEMU defaults to
match.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 crypto/block-luks.c | 2 +-
 qapi/crypto.json    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/crypto/block-luks.c b/crypto/block-luks.c
index 7d5893a..c843983 100644
--- a/crypto/block-luks.c
+++ b/crypto/block-luks.c
@@ -921,7 +921,7 @@ qcrypto_block_luks_create(QCryptoBlock *block,
 
     memcpy(&luks_opts, &options->u.luks, sizeof(luks_opts));
     if (!luks_opts.has_iter_time) {
-        luks_opts.iter_time = 1000;
+        luks_opts.iter_time = 2000;
     }
     if (!luks_opts.has_cipher_alg) {
         luks_opts.cipher_alg = QCRYPTO_CIPHER_ALG_AES_256;
diff --git a/qapi/crypto.json b/qapi/crypto.json
index 1527f4b..e7a2ba2 100644
--- a/qapi/crypto.json
+++ b/qapi/crypto.json
@@ -187,7 +187,7 @@
 #            Currently defaults to 'sha256'
 # @iter-time: #optional number of milliseconds to spend in
 #             PBKDF passphrase processing. Currently defaults
-#             to 1000. Since 2.8
+#             to 2000. Since 2.8
 # Since: 2.6
 ##
 { 'struct': 'QCryptoBlockCreateOptionsLUKS',
-- 
2.7.4

  parent reply	other threads:[~2016-09-08 16:27 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-08 16:27 [Qemu-devel] [PATCH 0/6] crypto: misc tweaks & improvements to pbkdf code Daniel P. Berrange
2016-09-08 16:27 ` [Qemu-devel] [PATCH 1/6] crypto: make PBKDF iterations configurable for LUKS format Daniel P. Berrange
2016-09-08 17:44   ` Eric Blake
2016-09-09  9:32     ` Daniel P. Berrange
2016-09-08 16:27 ` [Qemu-devel] [PATCH 2/6] crypto: clear out buffer after timing pbkdf algorithm Daniel P. Berrange
2016-09-08 17:47   ` Eric Blake
2016-09-09  9:35     ` Daniel P. Berrange
2016-09-08 16:27 ` [Qemu-devel] [PATCH 3/6] crypto: use correct derived key size when timing pbkdf Daniel P. Berrange
2016-09-08 17:51   ` Eric Blake
2016-09-08 16:27 ` [Qemu-devel] [PATCH 4/6] crypto: remove bogus /= 2 for pbkdf iterations Daniel P. Berrange
2016-09-08 17:52   ` Eric Blake
2016-09-08 16:27 ` Daniel P. Berrange [this message]
2016-09-08 17:53   ` [Qemu-devel] [PATCH 5/6] crypto: increase default pbkdf2 time for luks to 2 seconds Eric Blake
2016-09-08 16:27 ` [Qemu-devel] [PATCH 6/6] crypto: support more hash algorithms for pbkdf Daniel P. Berrange
2016-09-08 17:57   ` Eric Blake
2016-09-09  9:31     ` Daniel P. Berrange
2016-09-08 19:48 ` [Qemu-devel] [PATCH 0/6] crypto: misc tweaks & improvements to pbkdf code no-reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1473352047-908-6-git-send-email-berrange@redhat.com \
    --to=berrange@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.