From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41293) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akpee-0007R1-5I for qemu-devel@nongnu.org; Tue, 29 Mar 2016 05:09:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1akpea-0003hc-Uj for qemu-devel@nongnu.org; Tue, 29 Mar 2016 05:09:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33624) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akpea-0003hW-Oy for qemu-devel@nongnu.org; Tue, 29 Mar 2016 05:09:36 -0400 Date: Tue, 29 Mar 2016 10:09:32 +0100 From: "Daniel P. Berrange" Message-ID: <20160329090932.GC29697@redhat.com> References: <1458233634-27709-1-git-send-email-berrange@redhat.com> <1458233634-27709-3-git-send-email-berrange@redhat.com> <56F359AD.8090502@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <56F359AD.8090502@cn.fujitsu.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PULL v3 02/13] crypto: add support for PBKDF2 algorithm Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wen Congyang Cc: Peter Maydell , qemu-devel@nongnu.org On Thu, Mar 24, 2016 at 11:06:21AM +0800, Wen Congyang wrote: > On 03/18/2016 12:53 AM, Daniel P. Berrange wrote: > > The LUKS data format includes use of PBKDF2 (Password-Based > > Key Derivation Function). The Nettle library can provide > > an implementation of this, but we don't want code directly > > depending on a specific crypto library backend. Introduce > > a new include/crypto/pbkdf.h header which defines a QEMU > > API for invoking PBKDK2. The initial implementations are > > backed by nettle & gcrypt, which are commonly available > > with distros shipping GNUTLS. > >=20 > > The test suite data is taken from the cryptsetup codebase > > under the LGPLv2.1+ license. This merely aims to verify > > that whatever backend we provide for this function in QEMU > > will comply with the spec. > >=20 > > Reviewed-by: Fam Zheng > > Reviewed-by: Eric Blake > > Signed-off-by: Daniel P. Berrange >=20 > I get the following building error: >=20 > CC crypto/pbkdf.o > CC crypto/pbkdf-nettle.o > CC crypto/ivgen.o > crypto/pbkdf-nettle.c:23:27: error: nettle/pbkdf2.h: No such file or di= rectory > crypto/pbkdf-nettle.c: In function =E2=80=98qcrypto_pbkdf2=E2=80=99: > crypto/pbkdf-nettle.c:46: warning: implicit declaration of function =E2= =80=98pbkdf2_hmac_sha1=E2=80=99 > crypto/pbkdf-nettle.c:46: warning: nested extern declaration of =E2=80=98= pbkdf2_hmac_sha1=E2=80=99 > crypto/pbkdf-nettle.c:53: warning: implicit declaration of function =E2= =80=98pbkdf2_hmac_sha256=E2=80=99 > crypto/pbkdf-nettle.c:53: warning: nested extern declaration of =E2=80=98= pbkdf2_hmac_sha256=E2=80=99 > make: *** [crypto/pbkdf-nettle.o] Error 1 > make: *** Waiting for unfinished jobs.... >=20 > rpm -qf /usr/include/nettle/ > libnettle-devel-2.4-8.1.2 >=20 > The nettle version is very old...... > The OS is SUSE 11 SP3. Ok, I work on a patch to make this conditional on nettle version. Regards, Daniel --=20 |: http://berrange.com -o- http://www.flickr.com/photos/dberrange= / :| |: http://libvirt.org -o- http://virt-manager.or= g :| |: http://autobuild.org -o- http://search.cpan.org/~danberr= / :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vn= c :|