Re: AES counter mode
Peter Gutmann <[email protected]> Sun, 02 Jun 2013 21:24:38 +1200
| Newsgroups | gmane.comp.encryption.cryptlib |
|---|---|
| Message-ID | <[email protected]> |
Kostantinos Koukopoulos <[email protected]> writes: >I'm looking to implement encryption and transmission of large datasets (in >the order of a couple of gigabytes) with the following requirements: > >a) the encryption of each block shouldn't depend on the completed encryption >and transmission of other blocks (i.e. parallel encryption) > >b) encryption and transmission may be stopped and it should be possible to >resume the encryption using as small a saved state as possible (e.g. the key, >the IV/nonce and the sequence of previously encrypted blocks). > >If I'm not mistaken AES CTR mode would be suitable for this task. Is it >possible with cryptlib? I haven't found any information about AES CTR and >cryptlib so far. > >Is there perhaps some other way that I could implement (a) and (b) that would >be possible and/or straightforward with cryptlib? Implementing counter mode is pretty simple when you've got ECB mode, you just encrypt the counter in ECB mode and XOR with the data. However, it's very, very easy to get counter mode wrong, which means a simple XOR is all anyone needs in order to recover the encrypted data. AES-CTR is the logical successor to RC4 in terms of both functionality and ease-of-misuse, so you have to be extremely careful to get it right. I wouldn't use it myself because it's too easy to get wrong. You can do the same as you require with CBC, provided you stop and start at a 16-byte boundary. Peter. _______________________________________________ Cryptlib mailing list [email protected] via Mail: [email protected] Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/ http://news.gmane.org/gmane.comp.encryption.cryptlib Posts from non-subscribed addresses are blocked to prevent spam, please subscribe in order to post messages.