| |
The Shadow
Registered: Oct 2007 Posts: 304 |
EOR file coders
Someone once told me that it is impossible to open a file which was coded with an EOR coder. With todays machines, is there any conceivable way that an EOR coded file can be placed into a PC and descrambled? |
|
... 48 posts hidden. Click here to view all posts.... |
| |
tlr
Registered: Sep 2003 Posts: 1762 |
Quote: The good file coders I remember use an 8 byte system (The length of the password). If say someone were to 8 byte EOR code a file and remove the decoder, is there any possible way that a PC could crack it?
Yes, probably. Especially if the file is in the normal ordering except for EOR:ing with a sequence of 8 bytes repeated.
De-Coder cracks those by assuming certain statistics of a particular byte value occuring.
I calculated those statistics from several thousands of files.
The length of the key is determined by an incidence check.
Key finding takes only ~15 seconds on a c64. :)
The algorithm used by J-Coder V1.0 and Encoder V1.0 is harder to break. It only does substitution per byte but in a fairly complex way.
Maybe someone with more insight into crypt analysis can break it?
@Marauder: yes, non alphabetic text works too. There is a disc of examples in the release you can try. A few have ctrl-chars in the password.
|
| |
AlexC
Registered: Jan 2008 Posts: 297 |
Quote: The good file coders I remember use an 8 byte system (The length of the password). If say someone were to 8 byte EOR code a file and remove the decoder, is there any possible way that a PC could crack it?
This is actually one of most basic and simple attacks on ciphers. Take a look here for some info: http://en.wikipedia.org/wiki/XOR_cipher |
| |
tlr
Registered: Sep 2003 Posts: 1762 |
Quote: This is actually one of most basic and simple attacks on ciphers. Take a look here for some info: http://en.wikipedia.org/wiki/XOR_cipher
Knowing the length of the key helps a bit.
As the data is byte oriented it's probably easiest to treat this as a Vigenère of length 8.
You then solve this as 8 independent XOR-ciphers starting at bytes 0-7, with the spacing of 8 bytes between each value.
|
| |
The Shadow
Registered: Oct 2007 Posts: 304 |
Is there any known technique of scrambling which would be impossible to break? |
| |
Quetzal
Registered: Jul 2002 Posts: 71 |
Quote: Is there any known technique of scrambling which would be impossible to break?
I've toyed with the idea of converting to 6502 the 6805 version of Twofish found here: http://www.schneier.com/twofish-download.html
This would be more along the lines of what you are seeking, and AFAIK it is still an unbreakable cipher.
|
| |
Ymgve
Registered: May 2002 Posts: 84 |
The strength of the encryption relies of the length of the keyword, but also on the algorithm if the plaintext is guessable. Especially XOR/EOR algorithms are vulnerable to a known plaintext attack - if you know the final program is getting allocated to 0801, there's a pretty big chance the first bytes will contain the BASIC line for SYS [some number]. Which increases the chance of recovering the key exponentially. |
| |
tlr
Registered: Sep 2003 Posts: 1762 |
Quote: The strength of the encryption relies of the length of the keyword, but also on the algorithm if the plaintext is guessable. Especially XOR/EOR algorithms are vulnerable to a known plaintext attack - if you know the final program is getting allocated to 0801, there's a pretty big chance the first bytes will contain the BASIC line for SYS [some number]. Which increases the chance of recovering the key exponentially.
I built individual statistics for the SYS line in my first attempts but it turned out too short to make useful statistics.
If you are using some kind of heuristics (or manual work) it can probably be useful.
What I do is analyze the statistics of the first and last 512 bytes of the file.
This was chosen on the assumption that one of those will contain a chunk of 6502 code. (usually a decruncher)
This turned out quite effective!
Adding special handling of the SYS line doesn't seem to gain enough to make it worth it.
|
| |
tlr
Registered: Sep 2003 Posts: 1762 |
I got inspired and hacked this up yesterday: Crack me!
Try to find the password. :)
|
| |
Ymgve
Registered: May 2002 Posts: 84 |
Got it :) I wonder if this is the first time that algorithm has been done on the C64. |
| |
tlr
Registered: Sep 2003 Posts: 1762 |
I would think that this is the first, but you never know... :)
|
Previous - 1 | 2 | 3 | 4 | 5 | 6 - Next |