Processing math: 100%

The Book of Gehn

I found 2 posts.


Difference of two squares

Tags: math

August 12, 2021


Fixed Nonce CTR Attack

Tags: cryptography, matasano, cryptonita, CTR, counter nonce, PRG, chi-square, undistinguishable

December 4, 2018

The Counter mode, or just CTR mode, turns a block cipher into a stream cipher.

More specifically, it builds a pseudo random generator (PRG) from a block cipher and then generates a random string using the PRG to encrypt/decrypt the payload performing a simple xor.

The idea is to initialize the PRG with a different seed each time but if this does not happen, all the plaintexts will be encrypted with the same pseudo random key stream – totally insecure.

– Spoiler Alert! –

Ready to break it?

- Martin Di Paola