From: Herbert Xu Subject: Re: [PATCH 1/2] stream: Stream cipher wrapper Date: Sun, 11 Nov 2007 20:11:51 +0800 Message-ID: <20071111121151.GA14285@gondor.apana.org.au> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Linux Crypto To: Tan Swee Heng Return-path: Received: from rhun.apana.org.au ([64.62.148.172]:1592 "EHLO arnor.apana.org.au" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754149AbXKKML7 (ORCPT ); Sun, 11 Nov 2007 07:11:59 -0500 Content-Disposition: inline In-Reply-To: Sender: linux-crypto-owner@vger.kernel.org List-Id: linux-crypto.vger.kernel.org On Tue, Nov 06, 2007 at 07:37:20PM +0000, Tan Swee Heng wrote: > Added a "stream" template to support stream ciphers (eSTREAM > candidates in particular) within the CryptoAPI framework. Thanks for the patch. Having reviewed it and the specification of Salsa20 I think we can already support an Salsa20 implementation without the addition of this new interface. In fact, thanks the work Joy has done with CTR, the Salsa20 stream cipher can be expressed as ctr(salsa20,0,16,8) where salsa20 is the Salsa20 expansion function. So could you please update your patches so that it works under this framework? So your salsa20 simple cipher should be OK as it is minus the extra bits like setiv. Plus you should add a block cipher salsa20 algorithm that just invokes the above CTR algorithm and constructs the IV in the appropriate manner. Thanks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt