0
$\begingroup$

I'm trying to implement impossible differential cryptanalysis on IDEA cipher based on the Miss in the middle attack on IDEA and Khufu paper.

I'm trying to implement the attack on 3.5-Round IDEA and I stummpled with the initial pair generation step because they suggest generating $2^{32}$ pairs, which would normally be executed on a mainframe but I'm trying to implement it on my laptop(8GB RAM).

I'm confused with the generation part so are there any papers talking about the pairs and if they are indeed normally executed on a Mainframe or not, and in what mode they are ciphered(EBC, CBC, or any other mode), and when dealing with a large number of pairs like these are they generally stored in txt files or in a database and if there is a preferred initial key to encrypt with if you're trying the attack for the first time?

$\endgroup$

2 Answers 2

1
$\begingroup$

Here is a paper talking about implementing impossible differential cryptanalysis in a parallel fashion.

https://link.springer.com/chapter/10.1007/978-3-030-35869-3_9

enter image description here

Differential and linear cryptanalysis are normally defined on ECB mode, with the cipher specified as a pseudorandom permutation under a fixed unknown key, but given they're known-plaintext attacks they do work on some other modes.

$\endgroup$
7
  • $\begingroup$ No I was asking for execution specifics other than the characteristic input difference that we need the pairs to have. Can you point me to the reference for the usage of ECB mode? $\endgroup$
    – siba36
    Jun 13, 2022 at 13:32
  • $\begingroup$ what do you mean execution specifics? $\endgroup$
    – kodlu
    Jun 13, 2022 at 14:27
  • $\begingroup$ @siba36 Why does someone need a mainframe? $2^{32}$ ECB mode is quite achievable with modern CPUs. Did you benchmark your platform? $\endgroup$
    – kelalaka
    Jun 13, 2022 at 14:50
  • $\begingroup$ @siba36 my computer can reach 2^35 AES encryption in one day using software $\endgroup$
    – kelalaka
    Jun 13, 2022 at 19:54
  • $\begingroup$ by execution specifics I meant like what the common way to store the pair is it in text fle or in a database because I've tried adding the pairs to a text file and when I reached 700 million pair in that file I couldn't open it anymore in normal text editors and my java program took forever to read it and didn't finish , so is it better to store it in a database? $\endgroup$
    – siba36
    Jun 19, 2022 at 18:59
0
$\begingroup$

I'm trying to implement the attack on 3.5-Round IDEA and I stumbled with the initial pair generation step because they suggest generating $2^{32}$ pairs, which would normally be executed on a mainframe but I'm trying to implement it on my laptop (8GB RAM).

We know out of the top of our head that $2^{32}$ is 4 billion (32 bit computers can directly address 4 GiB, although usually only 2 GiB is available per application). That means you'll have to store things on disk, or more preferably a very fast SSD. If you want to address that then I would recommend binary tables and memory mapping, not streaming. Of course, the time it takes to perform lookups may still be too large. You might be able to add a smaller table in memory to perform a "pre-lookup" e.g. using a smaller hash over values or initial bytes.

I'm confused with the generation part so are there any papers talking about the pairs and if they are indeed normally executed on a Mainframe or not

Well, mainframe, generally you'd assume fast memory access for an attack to be practical (or at least closer to practical). So the memory needs to be there.

and in what mode they are ciphered

Attacks on the block cipher themselves are not using any mode, they use the block cipher directly. You'd use the most performant code possible, i.e. without all kinds of wrapping to implement modes and whatnot. If you just want to try stuff out then you can use a single ECB block without padding or even a single CBC block without padding and an all-zero IV (as the IV is XOR'ed with the first plaintext block in CBC mode, so you would just get the block encrypt again).

are they generally stored in txt files or in a database

No, you'd use a map in memory (RAM) or possibly on SSD, preferably one with fast access. Laptops would not be perfect for this as the SSD's are generally not that fast w.r.t random access, and they generally don't have any posiblity to store a second SSD.

and if there is a preferred initial key to encrypt with if you're trying the attack for the first time?

No, not unless you already know that the key structure has influence on the attack of course.

$\endgroup$

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.