From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932125AbeBVLr6 (ORCPT ); Thu, 22 Feb 2018 06:47:58 -0500 Received: from orcrist.hmeau.com ([104.223.48.154]:56576 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753673AbeBVLr5 (ORCPT ); Thu, 22 Feb 2018 06:47:57 -0500 Date: Thu, 22 Feb 2018 19:47:41 +0800 From: Herbert Xu To: Horia =?utf-8?Q?Geant=C4=83?= Cc: Christophe LEROY , "David S. Miller" , "linux-crypto@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" Subject: Re: [PATCH 16/18] crypto: talitos - do hw_context DMA mapping outside the requests 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-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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