From: Herbert Xu Subject: Re: [RFC PATCH 0/6] Add bulk skcipher requests to crypto API and dm-crypt Date: Mon, 23 Jan 2017 21:04:52 +0800 Message-ID: <20170123130452.GA17598@gondor.apana.org.au> References: <20170113104128.GA23497@gondor.apana.org.au> <20170113142959.GA24258@gondor.apana.org.au> <20170118044828.GB4460@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: linux-crypto@vger.kernel.org, dm-devel@redhat.com, Mike Snitzer , Milan Broz , Mikulas Patocka , Binoy Jayan To: Ondrej =?utf-8?B?TW9zbsOhxI1law==?= Return-path: Received: from helcar.hengli.com.au ([209.40.204.226]:60769 "EHLO helcar.apana.org.au" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750718AbdAWNFD (ORCPT ); Mon, 23 Jan 2017 08:05:03 -0500 Content-Disposition: inline In-Reply-To: Sender: linux-crypto-owner@vger.kernel.org List-ID: On Thu, Jan 19, 2017 at 03:21:37PM +0100, Ondrej Mosnáček wrote: > > Hm, I just looked at what the IPsec IV generation is actually doing > and it seems to me that it's basically a crypto template that just > somehow transforms the IV before it is passed to the child cipher... I > thought for a while that you were implying that there already is some > facility in the crypto API that allows submitting multiple messages + > some initial sequence number that is auto-incremented and IVs are > generated from the numbers. However, I could not find anything like > that in the code, so now I think what you meant was just that I should > somehow pull the actual IV generators into the crypto layer so that > the IVs can be generated inside the hardware. IPsec currently only deals with one packet at a time, but the point is that the IV generator handles everything transparently and the IV is actually part of the cipher text for the AEAD op. IOW it would be trivial to extend our current IPsec IV generators to handle multiple packets as the IVs are embedded with the cipher text. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt