Feistel Cipher Question

All you did was describe the Luby-Rackoff construction. That's not "reducing the problem", you're just implying that no one has solved it because they didn't understand it.

Furthermore, two known ciphertext/plaintext pairs is not that much. To top it all off, differential cryptanalysis isn't even a known plaintext attack!

What have you tried so far? Your post and replies have literally just been describing what a feistel network is in different phrasing each time.

Tell you what, set your thing up on a random server and allow us to encrypt arbitrary ciphertexts. Why, you ask? Aren't the two pairs you have provided enough?

Not even close. DIFFERENTIAL CRYPTANALYSIS is a CHOSEN plaintext attack. You're thinking of LINEAR CRYPTANALYSIS, which is a KNOWN plaintext attack.

Also, the king tutorial (if you mention it as a source, take the 5 seconds to link it, dude)

This isn't a CTF contest. Please provide a high level (= pseudocode = readable natural language description) overview of your key derivation method and the PRF/round function you use, as well as any mixing/padding/subs you use; I'm not going to learn Haskell to answer a question on cryptanalysis.

Furthermore, your key derivation function appears (at first glance) to simply be

x^2 mod n

Last I checked, solving the discrete log problem in 128 bits takes about 0 seconds to find your secret key given any of the subkeys.

Now, onto actual differential cryptanalysis: Literally impossible with what you gave us.

We need two chosen plaintexts that have a very low hamming difference. And we need a lot of these pairs. Diff-crypt is a statistical attack. Funny how giving us two random plaintexts doesn't do much for us.

Here's a writeup on substitution-permutation differential cryptanalysis by a very very good ctf team

/r/crypto Thread Parent