1
$\begingroup$

I got specific problem with my functions in $128$-bit block cipher. One round of encryption is like that:

$input$ $\rightarrow$ $F(k_{i},input)$ $\rightarrow$ reverse block $\rightarrow$ $F(k_{i+1},reversed \ block)^{-1}$ $\rightarrow$ $output$

Every function got a specific $128$-bit key, but keys do not change some properties of that function. $F^{-1}$ means that we are looking for such input to function $F(k_{i+1})$ that will give us such a reversed block.

The first problem is with numbers divisible by $2$. Every input block in the function of form 000...0001... also will give us the same first zeros and one. For example:

000001...0111101...

go into:

000001...1111001...

and 0001011... go into 0001111..., but with a different key, it can be 0001000... and so on.

All the rest of the block depends on the key and there is no known way to guess it without the key. It also means that block 000...0001 always gives the same block 000...0001 and a block of only zeros goes into the same block. It also means that every block with $1$ as the first bit will also go into a block with $1$ as the first bit. I think it can be solved, by XORing with some key before every round, let's ignore that problem for now.

The second problem is that every $input + 2^{n}\cdot l$ will give an output block with the same first $n$ bits in such function.

Can you find a way to attack it? The main idea is to avoid problems by reversing blocks and then looking for such input to function, which will give us such a reversed block - it destroys patterns that we have in that function. Let's say we want to encrypt block 000...0001. We know what block will give us the first function (exactly the same, by definition), but without the key of the second function, we can't tell which number is giving 1000...000 block in that next function $F^{-1}$. We can only tell that such block will definitely have the bit 1 at the beginning (because in function $F$ all blocks with 1 at the beginning always gives output with 1 at the beginning).

$\endgroup$
0

Your Answer

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

Browse other questions tagged or ask your own question.