From: Kamil Konieczny Subject: Re: Question about ahash export and import Date: Fri, 24 Nov 2017 14:35:04 +0100 Message-ID: References: <0e54df51-7b4c-a01e-2054-3cdf204a429e@c-s.fr> <20170927090802.GA1547@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: Gilad Ben-Yossef , Christophe LEROY , =?UTF-8?Q?Stephan_M=c3=bcller?= , "linux-crypto@vger.kernel.org" To: Herbert Xu Return-path: Received: from mailout1.w1.samsung.com ([210.118.77.11]:39652 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752681AbdKXNfO (ORCPT ); Fri, 24 Nov 2017 08:35:14 -0500 In-reply-to: <20170927090802.GA1547@gondor.apana.org.au> Content-language: en-US Sender: linux-crypto-owner@vger.kernel.org List-ID: On 27.09.2017 11:08, Herbert Xu wrote: > On Tue, Sep 26, 2017 at 01:09:05PM +0200, Kamil Konieczny wrote: >> >> Can import() be called without _any_ init(), for example >> after reboot of machine ? Is following scenario valid: > > Of course it can. import must restore the state of the request > to that at the time when export was called. > > import does not need to be called after init. init simply resets > the hash state for new update/final calls. > [...] I have more questions, this time about HMAC export/import. In doc, there is stated that key can be copied into context transformation. Should .export copy request context _and_ key used ? Or not ? When processing requests, can I assume the key in transformation is const until .final ? Is is possible to have okey derived from different key then ikey ? I think not. -- Best regards, Kamil Konieczny Samsung R&D Institute Poland