Hi,

On Sat, Jan 15, 2011 at 02:00:02PM +0100, Nikos Mavrogiannopoulos wrote:
> On 01/06/2011 07:16 PM, Phil Sutter wrote:
> > When trying to en-/decrypt a buffer using CBC in two steps by
> > passing a part from the buffer's start at first, and then the
> > remaining data in the second call, the second operation depends on
> > the first one in that it's IV depends on it's result. Insiders know
> > of course, that the IV of any CBC block to operate on is simply the
> > enciphered last block. So this patch is maybe most useful for
> > everyone else, altering the passed IV upon returning the results.
> 
> Why do you need that? This is really CBC specific and might make no
> sense in other modes (that might be added in the future). If the code
> this flag is supposed to target is CBC-specific anyway, wouldn't it be
> easier to just use the last block?

Well, isn't the whole IV-concept kind of CBC-specific? Of course, if the
continuative IV is _always_ the last block (whose size also may vary from
one cipher to the other), one could easily use that. But I suppose, this
is subject to change (not really, but there will probably be algorithms
which use the IV differently).

After all, this is basically just the cryptoapi's behaviour exposed. So
there is no calculation done in cryptodev at all, just the updated
cdata->async.iv written back to userspace.

Greetings, Phil
-- 
Viprinet GmbH
Mainzer Str. 43
55411 Bingen am Rhein
Germany

Zentrale:     +49-6721-49030-0
Durchwahl:    +49-6721-49030-134
Fax:          +49-6721-49030-209

phil.sut...@viprinet.com
http://www.viprinet.com

Sitz der Gesellschaft: Bingen am Rhein
Handelsregister: Amtsgericht Mainz HRB40380
Geschäftsführer: Simon Kissel


_______________________________________________
Cryptodev-linux-devel mailing list
Cryptodev-linux-devel@gna.org
https://mail.gna.org/listinfo/cryptodev-linux-devel

Reply via email to