2
$\begingroup$

Assuming that I'm using fixed IV's for CBC mode and CTR mode. I know that in CBC, the blocks depend on the previous ones and on CTR they are all independent. Yet with the same key and fixed IV, the system wouldn't be secure in CTR and with fixed IV same plaintext would be converted to same ciphertext which causes another security issue. Even though I know these, I cannot decide which would be more secure when I use fixed IV's. Any help is appreciated.

$\endgroup$
4
  • 5
    $\begingroup$ I cannot decide - Nobody can decide it for you. Re-formulate you question, so that it can be answered here. For instance, you can ask I such approach vulnerable to the problem A? ... to the problem B? Only you can decide what problems and what risks are acceptable to you. $\endgroup$
    – mentallurg
    Commented Apr 8, 2021 at 2:09
  • 1
    $\begingroup$ Hello @mentallurg, thank you for your comment, yet I was studying for my network security exam coming up and I'm using the textbook Information Security Principles and Practice 2nd Edition by Mark Stamp and on chapter 3.6 Problems 31. problem is exactly like follows: "Suppose that Alice and Bob decide to always use the same IV instead of choosing IVs at random. If the same IV is always used, which is more secure, CBC or CTR mode?" So this is not a question I just made up on my own. $\endgroup$ Commented Apr 8, 2021 at 9:33
  • $\begingroup$ Hint: look at what a key stream is and how OTP's can be broken with key reuse. That should give you the answer. $\endgroup$
    – Maarten Bodewes
    Commented Apr 8, 2021 at 9:43
  • $\begingroup$ @MaartenBodewes, thank you. Gonna check that out! $\endgroup$ Commented Apr 8, 2021 at 9:48

1 Answer 1

2
$\begingroup$

If you reuse key&IV(nonce) in CTR mode you have almost no security. You get a two time pad. Xoring to messages, will eliminate the key stream and give you the XOR of the plain texts which usually gives you plenty of information. With multiple such cipher text it gets even easier.

If you reuse IV and key in CBC mode, it isn't good, but it isn't anywhere near as bad. You can't trivially decrypt messages, even if you know parts of the message or you know a lot about the distribution of messages (e.g they are English language). Having a predictable IV let alone a fixed one, allows you to mount a chosen plain text attack, which can verify guesses about any cipher text block. See: Why is CBC with predictable IV considered insecure against chosen-plaintext attack?

$\endgroup$
1
  • $\begingroup$ Thank you @Meir Maor, your answer truly helped me. $\endgroup$ Commented Apr 20, 2021 at 12:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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