From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60400) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abHL2-0002Nq-G2 for qemu-devel@nongnu.org; Wed, 02 Mar 2016 19:41:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1abHL1-0003qA-He for qemu-devel@nongnu.org; Wed, 02 Mar 2016 19:41:56 -0500 References: <1456747261-22032-1-git-send-email-berrange@redhat.com> <1456747261-22032-5-git-send-email-berrange@redhat.com> From: Eric Blake Message-ID: <56D7884C.1010201@redhat.com> Date: Wed, 2 Mar 2016 17:41:48 -0700 MIME-Version: 1.0 In-Reply-To: <1456747261-22032-5-git-send-email-berrange@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="PbRiVVPkeEVgk7Wevmqvr6bmeA8cH7dJW" Subject: Re: [Qemu-devel] [PATCH v4 04/26] crypto: add support for anti-forensic split algorithm List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , qemu-devel@nongnu.org Cc: Fam Zheng , qemu-block@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --PbRiVVPkeEVgk7Wevmqvr6bmeA8cH7dJW Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 02/29/2016 05:00 AM, Daniel P. Berrange wrote: > The LUKS format specifies an anti-forensic split algorithm which > is used to artificially expand the size of the key material on > disk. This is an implementation of that algorithm. >=20 > Signed-off-by: Daniel P. Berrange > --- > +static void qcrypto_afsplit_xor(size_t blocklen, > + const uint8_t *in1, > + const uint8_t *in2, > + uint8_t *out) > +{ > + size_t i; > + for (i =3D 0; i < blocklen; i++) { > + out[i] =3D in1[i] ^ in2[i]; > + } > +} I hope the compiler can optimize this into vectored operation. But no need to change your code. Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --PbRiVVPkeEVgk7Wevmqvr6bmeA8cH7dJW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJW14hMAAoJEKeha0olJ0NqXykH/2Igm12hMQKLAguglmQrwK7w WI62XYBmmUHIBeLBNA0mstQaNoBOo3teT0nS+oGLPtud61nLII+B8lMAZuj7VQqq J1Uc6agVhtmnCHY3fZf6BOfHBrQ58p3pnv5VvUtZrMzo7zgP9lPrVfVryNbSMRux 99l/P8yJ43aPE+25NR1hpse/qpruYi0UhcIzAAb04eMFADJVzLE10C7S/cuApKms ni9vAoRmf/qA7Sr2GTfKHF/B28bEUG5l0LLjGsVVkwnqM92rbm0ntk4aZVJb76aE 41zBe5WaRa13Fk/RGMNnSRLsyoJcct/Zch8B8vLQaML5qfkNj4wahSLTm8yHc/Q= =G1Kk -----END PGP SIGNATURE----- --PbRiVVPkeEVgk7Wevmqvr6bmeA8cH7dJW--