From patchwork Thu Sep 8 16:27:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= X-Patchwork-Id: 667769 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sVV410yZGz9s3s for ; Fri, 9 Sep 2016 04:58:57 +1000 (AEST) Received: from localhost ([::1]:51346 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bi4XG-0003dE-3z for incoming@patchwork.ozlabs.org; Thu, 08 Sep 2016 14:58:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34301) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bi2Au-00012h-6l for qemu-devel@nongnu.org; Thu, 08 Sep 2016 12:27:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bi2As-00076z-8i for qemu-devel@nongnu.org; Thu, 08 Sep 2016 12:27:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33114) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bi2As-00076m-3g for qemu-devel@nongnu.org; Thu, 08 Sep 2016 12:27:38 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BEB71C030713 for ; Thu, 8 Sep 2016 16:27:37 +0000 (UTC) Received: from t530wlan.home.berrange.com.com (vpn1-7-226.ams2.redhat.com [10.36.7.226]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u88GRUvk005412; Thu, 8 Sep 2016 12:27:36 -0400 From: "Daniel P. Berrange" To: qemu-devel@nongnu.org Date: Thu, 8 Sep 2016 17:27:26 +0100 Message-Id: <1473352047-908-6-git-send-email-berrange@redhat.com> In-Reply-To: <1473352047-908-1-git-send-email-berrange@redhat.com> References: <1473352047-908-1-git-send-email-berrange@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 08 Sep 2016 16:27:37 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 5/6] crypto: increase default pbkdf2 time for luks to 2 seconds X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 Reviewed-by: Eric Blake --- 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',