Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > EOR file coders
2008-02-22 04:42
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....
 
2008-02-22 21:29
tlr

Registered: Sep 2003
Posts: 1790
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.
2008-02-22 22:45
The Shadow

Registered: Oct 2007
Posts: 304
Is there any known technique of scrambling which would be impossible to break?
2008-02-22 23:34
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.
2008-02-23 02:27
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.
2008-02-23 08:38
tlr

Registered: Sep 2003
Posts: 1790
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.
2008-02-24 13:37
tlr

Registered: Sep 2003
Posts: 1790
I got inspired and hacked this up yesterday: Crack me!

Try to find the password. :)

2008-02-24 17:27
Ymgve

Registered: May 2002
Posts: 84
Got it :) I wonder if this is the first time that algorithm has been done on the C64.
2008-02-24 17:39
tlr

Registered: Sep 2003
Posts: 1790
I would think that this is the first, but you never know... :)
2008-02-25 07:58
AlexC

Registered: Jan 2008
Posts: 299
Quote: I would think that this is the first, but you never know... :)


I didn't have time to really look at it but peeking at decryption loop I can confirm that I've never seen it on c64 - at least not in protection code.
2008-02-25 12:22
tlr

Registered: Sep 2003
Posts: 1790
I posted the answer now.
The encryption algorithm implemented is AES-128 (ECB).
Previous - 1 | 2 | 3 | 4 | 5 | 6 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Alakran_64
Hydrogen/Glance
leonofsgr/Singular C..
Andy/AEG
Martin Piper
Rico/Pretzel Logic
BANDIT/BANDIT-COOL-S..
Smasher/F4CG
Scrap/Genesis Project
Guests online: 113
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 The Demo Coder  (9.6)
6 Edge of Disgrace  (9.6)
7 What Is The Matrix 2  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.7)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 X-Mas Demo 2024  (9.5)
7 Dawnfall V1.1  (9.5)
8 Rainbow Connection  (9.5)
9 Onscreen 5k  (9.5)
10 Morph  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Crackers
1 Mr. Z  (9.9)
2 Antitrack  (9.8)
3 OTD  (9.8)
4 Fungus  (9.8)
5 S!R  (9.8)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.352 sec.