3 ms·
Wait, are symmetric ciphers guaranteed to cycle through the full space of block-sized numbers when applied to their output like that? I thought that was just "c
by SilasX 7y ago
Wait, are symmetric ciphers guaranteed to cycle through the full space of block-sized numbers when applied to their output like that? I thought that was just "close to" true?
- ghusbands 7y agoYes, it's bijective. For every input value, it provides a unique output that will decrypt back to that input. You might be misunderstanding the algorithm. We're only encrypting an incrementing number, not ever encrypting something that is already encrypted.
- SilasX 7y agoAh, okay. Thanks! Maybe I was thinking of hash functions, for which it's not guaranteed that every output has an (n-sized) pre-image? Edit: To clarify, I do now understand that you were proposing: random number X -> output encrypt(X), encrypt(X+1), encrypt(X+2), etc Which I had misinterpreted as: random number X -> output encrypt(X), encrypt(encrypt(X)), encrypt(encrypt(encrypt(X))) etc.
- HelloNurse 7y agoCounter mode means encrypting successive (all different) numbers, not the previous output. There is no issue with cycles.
- SilasX 7y agoYes, the original commenter replied to say that and I agreed to it. https://news.ycombinator.com/item?id=20962758 https://news.ycombinator.com/item?id=20962758