Tag Info

New answers tagged

3

That is the general idea of it yes. Some modes of operation (eg CTR) work in such a way that only known values are ever encrypted, forming a stream of pseudo-random data that is then combined with the plaintext by a keyless reversible operation (often xor) to form the ciphertext. Other modes (eg CBC) directly encrypt secret (ie plaintext) values, meaning ...


2

I'm not sure if your understanding is correct. However, to explain it a bit to be sure you’re on the right track… Some mode of operation only use an encryption function because it is used to generate something to XOR with the plaintext. There is no point decrypt the generated bytes. To decrypt the ciphertext, you just need the same stream of bytes.


2

The CTR part of CCM is basically the last for loop in the _ctrMode function: for (i=0; i<l; i+=4) { ctr[3]++; enc = prf.encrypt(ctr); data[i] ^= enc[0]; data[i+1] ^= enc[1]; data[i+2] ^= enc[2]; data[i+3] ^= enc[3]; } i.e. CTR is simply: encrypt a counter block with a block cipher, xor the encrypted block into the data, ...


0

Note: This is not (yet) a full answer, but I'm posting this anyway in the hope that I or someone else might be able to complete it later. Please don't upvote this yet. If you can fill in the gaps in the vague proof sketch below, please do so; if you post it as a separate answer, you'll have my vote. It's pretty trivial to show that, if AES-CBC is secure ...



Top 50 recent answers are included