From: Herbert Xu Subject: Re: [PATCH 16/18] crypto: talitos - do hw_context DMA mapping outside the requests Date: Thu, 22 Feb 2018 19:47:41 +0800 Message-ID: <20180222114741.GA27631@gondor.apana.org.au> References: <2338eb8d-a26a-9722-d667-5a9785b32977@c-s.fr> <630c313c-5eca-224d-a5ac-fb3f2783573a@c-s.fr> <20180220103436.GA20571@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: "linux-kernel@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , "David S. Miller" , "linux-crypto@vger.kernel.org" To: Horia =?utf-8?Q?Geant=C4=83?= Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane.org@lists.ozlabs.org Sender: "Linuxppc-dev" List-Id: linux-crypto.vger.kernel.org On Tue, Feb 20, 2018 at 11:32:25AM +0000, Horia Geantă wrote: > > If final/finup is optional, how is the final hash supposed to be retrieved? Sometimes the computation ends with a partial hash, that's what export is for. Also it is completely legal to abandon the hash state entirely. > According to documentation, these are the accepted flows (with the option to > export/import a partial hash b/w update and final/finup): > > .init() -> .update() -> .final() > ^ | | > '----' '---> HASH > > .init() -> .update() -> .finup() > ^ | | > '----' '---> HASH > > .digest() > | > '---------------> HASH The documentation is simply incomplete in this regard. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt