Can CFB mode of block cipher be used as a commutative encryption?

Is it possible to use CFB mode of AES block cipher to create commutative encryption?

With CTR it is possible but not secure.

  • 1
    $\begingroup$ Can you define the required security properties of a commutative cipher that you are looking for? $\endgroup$ – mikeazo Jul 22 '15 at 11:47
  • $\begingroup$ that the order of encryption and decryption keys doesn't matter. So Ek(Ej(P))=Ej(Ek(P)) $\endgroup$ – user1563721 Jul 22 '15 at 12:00
  • 3
    $\begingroup$ That tells me what commutative means, not what security properties you are looking for. $\endgroup$ – mikeazo Jul 22 '15 at 12:04

No, because CFB isn't commutative.

You can see this by looking at the decryption of double-CFB encrypted ciphertext. Even assuming a constant IV (so single-use keys), if you decrypt in the wrong order it cannot work, since the ciphertext is used as input into the block cipher and will differ from what was used with that key when encrypting.

The exception, of course, is single block messages, where CFB effectively reduces to CTR and has similar commutativity and (in)security, with the latter depending on how it is used.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.