Re: can CTR use blkcipher_walk_virt()?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2007-08-17 at 10:19 +0800, Herbert Xu wrote:
> Joy Latten <latten@xxxxxxxxxxxxxx> wrote:
> > I am in learning mode and have been looking into CTR.
> > Based on the fact that CTR does not require the plaintext to 
> > be a multiple of the blocksize nor is padding required,
> > should I use cipher.c routines (as xcbc does) instead
> > of blkcipher.c routines (as cbc does)?
> > (I've been referencing rfc 3686.)
> 
> CBC is the correct model to follow.  For our purposes you
> will only get multiples of blocks.  The only difference
> is that unlike CBC you can chop bits off the last block
> of plain text and the same bits will be chopped off in
> the cipher text.
> 
ok, that is good, I started out following CBC model and will continue. 

Just to make sure I understand correctly, 
our plaintext will be a multiple of the blocksize,
therefore it may be padded, right? 
Also, since it is a multiple, I don't have to worry about last
block of plaintext being less than blocksize and truncating 
the keystream or ciphertext, right?


Thanks.

Joy



> With CBC chopping off bits in either changes the other one
> entirely.
> 
> Cheers,
-
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux