PDA

View Full Version : Decoding TwoFish Encryption


sailor__eda
June 4th, 2004, 00:53
I have a problem that I've been working on for a little while and I wanted to know what you guys thought about this.

I know TF128 is pretty difficult to crack by brute strength but my problem is slightly different.

I want to know if it is possible to retreive the key if you knew what a portion of the file looked like. To elaborate further, assume I have a tf encrypted file A.tf
If I know what the first 100 bytes of file A are i.e unencrypted, then does this make it easier to obtain the keys? (Aside from allowing me to use a smaller portion of the file to do a brute strength attack on)

Just curious.

Sailor_EDA

SheepShagger
June 4th, 2004, 11:39
What you're referring to is called "Known plaintext attack" and good (a.k.a. strong) cryptographic systems are/should be immune to it.

To answer your question:

From a practical point of view, it doesn't.
From a theoretical one, it may (as in very unlikely, but who knows). You've several blocks of ciphertext and its corresponding plaintext (6 or 12 depending on the blocksize used by the TF implementation) which is slightly better than a ciphertext only attack


If you can find a way to derive any information about the key using this attack, then you can claim to have broken Twofish and you will be famous

From Wikipedia (http://en.wikipedia.org/wiki/Known-plaintext_attack):

The known-plaintext attack is a cryptanalytic attack in which the attacker has samples of both the plaintext and its encrypted version (ciphertext) and is at liberty to make use of them to reveal further secret information; typically this is the secret key.

At Bletchley Park in World War II, strenuous efforts were made to use, and even force the Germans to produce messages with, known plaintext. The known plaintexts were called "cribs", and schemes to force the Germans to produce them were called "gardening".


If you search the board for known plaintext you'll find more info like http://www.woodmann.net/forum/showthread.php?t=4141

Hope this helps.

sailor__eda
June 6th, 2004, 01:54
Thanks for the response. That was pretty informative.

Sailor_EDA