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. With CBC chopping off bits in either changes the other one entirely. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - 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