This website is not maintained anymore. If you want to keep track of me or my projects (or hire me) check www.conveniencefactory.com or follow me @conveniencedev

Ruwebit
HARDWARE REVIEWS, DIY PROJECTS, IN-DEPTH ARTICLES
Start DIY projectsReviewsHow-to'sNewsAutomotiveAbout the websiteArchive | Most popularLast updatedTags Sitemap
downloadsencryptionlinuxpocketpcwindows
Maxor, an encryption tool: now also on PocketPC!
Download article as PDF
By Maurice on February 4, 2001 (update on March 10, 2002) popularity:
Maxor is a tool to encrypt and decrypt files in a fast but relative secure way. Versions have been released for DOS, Linux, Windows and even WindowsCE. To gain trust, the sourcecode of the engine can also be downloaded! Its simplicity is its strength...
MASE Software Engineering

The first paragraphs are a bit technical, but don't let that scare you off: you can skip them and go directly to the download section.

Features

Just a grab of Maxor's features, technical details can be found in the next paragraph:

Fibonacci Keystepping. This feature makes it a bit more complicated for a potential cracker to decrypt an encrypted file. This is done by reusing the key according to the Fibonacci algorithm.

eXtended Key Hiding. In earlier versions the key could be revealed when encrypting a file with many 0-characters or spaces. With the 'eXtended Key Hiding' feature this is solved.

Overwriting. Maxor overwrites the file that has to be encrypted. This means that no (temporary) copy is made. This increases the security, because deleted file can be undeleted. Overwritten files cannot (that's if they're not
cached, and it depends on the operating system). This way you don't have to shred files manually.

Freeware and sourcecode. The console version is freeware and the sourcecode is included. The Windows and WindowsCE versions are freeware until further notice.

Multiplatform. Versions for all these platforms are available for download: Linux, DOS, Windows, WindowsCEHow does it work, technically?

"One must not rely upon the obscurity of an algorithm" - Kerckhoffs criterion. So explaining the technical details of Maxor may not undermine it's safety.

As I mentioned before, Maxor is a tool to encrypt and decrypt files in a fast but relative secure way. It's a two-way algorithm, this means that it uses the same algorithm for encryption as it uses for decryption. The algorithm works according to the XOR
principle:

Say you have this file:

abc


And you want to encrypt it with this key:

xyz


Then the XOR algorithm does this:

f XOR k f XOR k = e
============================
a XOR x 97 XOR 120 = 25
b XOR y 98 XOR 121 = 27
c XOR z 99 XOR 122 = 25

f=file, k=key, e=encrypted file

... and it saves the result as characters: chr (25), chr (27), chr (25). The decryption works just the same:

f XOR k = e
===============
25 XOR 120 = 97
27 XOR 121 = 98
25 XOR 122 = 99

f=file, k=key, e=encrypted file

Fibonacci Key Stepping
If the file to encrypt is longer than the key, then of course the key has to be reused. For example:

file: abcdefghijklmnopqrstuvwxyz
key : xyzxyzxyzxyzxyzxyzxyzxyzxy


Maxor uses a smarter algorithm (Fibonacci Key Stepping) for reusing the key, to mislead potential crackers. The key will be reversed every time it's used, except when the amount of uses equals a Fibonacci number. More information can be destilled from
the soureccode.

Fibonacci numbers? Well, see if you can find the pattern yourself: 1, 2, 3, 5, 8, 13, 21 ... . The key 'xyz' will look like this:

xyzxyzxyzzxyzxyxyzzxyzxy



Key Hiding
In earlier releases of Maxor it was possible that the key of an encrypted file was revealed, when the file existed of some sequential 0-characters.

That's because 0 XOR n equals n, thus:

file: \0 \0 \0 \0 \0 \0
key: S E C R E T
xor: S E C R E T


This means the key will be exist in readable form in the encrypted file. That's not exactly what we want...

The solution for this is just to do no encryption on the 0-characters in a file:

file: \0 \0 \0 \0 \0 \0
key: S E C R E T
xor: \0 \0 \0 \0 \0 \0


In this case the key will be kept secret and only some 0-characters of the encrypted file are revealed.

At first sight this seems to be a good solution, but it just doesn't work like this. Decryption failed at a substantial number of tests I performed, because the encrypted file contained 0-characters as an xor result.

That's because n xor n = 0, thus for example:

f xor k = e
===============
10 xor 10 = 0
0 xor 32 = 32 -> keyhiding -> 0
0 xor 45 = 45 -> keyhiding -> 0
99 xor 99 = 0

f=file, k=key, e=encrypted file

In this example the encrypted file consists of two 0-characters. Decryption fails because the program cannot differentiate between a 0 as Key Hiding result or a 0 as a 'n xor n' result. Are you still with me? I hope so.

I fixed this by also performing Key Hiding for 'n xor n'. Thus, the example above will be changed into:


f xor k = e
===============
10 xor 10 = 0 -> keyhiding -> 10
0 xor 32 = 32 -> keyhiding -> 0
0 xor 45 = 45 -> keyhiding -> 0
99 xor 99 = 0 -> keyhiding -> 99

f=file, k=key, e=encrypted file

Some pieces of the encrypted file are thus revealed as a trade-off for keeping the key secret.


What went wrong with the 1.1 release?
In the 1.1 release a first attempt was made to hide keys better. However, this release didn't work correctly...

Before the 1.1 release, in encrypted files, keys could be readable in reversed-case when the file to encrypt contained spaces. For example, the key 'My Key' could be readable as 'mY kEY'. As many textfile do contain spaces :), eXtended Key Hiding was needed to be implemented.

With eXtended Key Hiding Maxor does not encrypt spaces, so keys would not be revealed in reversed-case. In code this is done by the simple check 'iVal == 32' and then skipping encryption. Unfortunately, there are situations that 'a xor b = 32', so decryption would fail...

Example:
string #32 #97
key #64 #65

Encryption
1) #32, skip due to eXtended Key Hiding, so stays #32
2) #97 xor #65 = #32

Encrypted string now is #32 #32

Decryption
string #32 #32
key #64 #65
1) #32, skip due to eXtended Key Hiding, so stays #32
2) #32, skip due to eXtended Key Hiding, so stays #32

Decrypted string still is #32 #32

A solution for this problem is to check if 'a xor b == 32' and also skip encryption for this character. In code this is done by the relative simple check '(iVal ^ key) == 32)'.

This solution has been implemented in release 1.2.Downloads

Linux, DOS and Windows versions
Maxor console v1.2 (Maxor binaries for DOS, for Linux and sourcecode)
Maxor for Windows v1.2 (Win95/98/ME/NT/2K)

Maxor v1.21 for WindowsCE devices
For arm/mips/sh3/sh4 CPU based PalmSize/Handheld/PocketPC devices

For older releases, see the Ruwebit archive

MaxorCE x86 releases on demand.Screengrabs

Maxor Console for DOS

Maxor Console for DOS

Maxor Console for Linux

Maxor Console for Linux

WinMaxor, the Windows95/98/ME/NT/2K/XP version

WinMaxor, the Windows95/98/ME/NT/2K/XP version

MaxorCE for Handheld/PC's

MaxorCE for Handheld PC's

MaxorCE for Palmtop/PC's

MaxorCE for Palmsize PC's

MaxorCE for Pocket PC's

MaxorCE for Pocket PC'sHow to install?

Sourecode
Download the sourcecode zip-file from the previous page.
The sourcecode can be compiled by running 'make' under Linux or with DJGPP under DOS/Windows. It uses the gcc compiler.

Linux
Download the Linux distribution tar.gz-file from the previous page.
Run tar -zxvf filename.tar.gz
Put the maxor executable for example in your /usr/bin directory.

DOS
Download the DOS distribution zip-file from the previous page.
Unzip it and put the maxor.exe file somewhere in your DOS-path.

Windows

Download the Windows distribution zip-file from the previous page.
Unzip it and put it for example in \Program files\Maxor
Make a shortcut where needed
(There's no installation program available at this time)

Windows CE
Download the Windows distribution zip-file from the previous page.
Unzip it and transfer it to your WindowsCE machine
Make a shortcut where needed
(There's no installation program available at this time)Version history

Maxor Engine / Maxor Console
0.1b First beta-version in MS Visual Studio 6 (way overkill)
0.2b More universal code, so it can be compiled under Linux
0.21b Code slightly optimized, traded MS VS6 for DJGPP and TextPad
0.22b Binary opening of file changed to be Ansi/Posix compatible
0.23b Improved errorhandling
0.30b Implemented Fibonacci Key Stepping
0.31b Implemented buffering (20010115)
0.32b Removed check if char < 0 and removed bReverseKey-bug. Strange that it worked before :-)
0.40b 20010504 Key hiding feature added, not compatible with files encrypted by former versions of Maxor. In former versions the key could be 'given' away when a file that was to be encrypted, contained null-characters (#0).
0.41b 20010507 ACCESS_VIOLATION under Linux and DOS solved: was a malloc/free related bug.
1.0 20010609 Version synced to 1.0 (is equal to 0.41b) and increased buffer
1.1 20010703 Key Hiding Feature extended, not compatible with files encrypted by former versions of Maxor. In former versions the key could be readable in uppercase or lowercase when a file was encrypted that contained spaces (#32)
1.2 20010712 Key Hiding Feature bug fixed. Sorry for any inconvenience caused.

WinMaxor
0.1b 20010204 First beta-version of WinMaxor
0.2b 20010207 Fixed slow working due to too small buffersize, fixed error and result dialogs (modal)
1.0 20010609 Implementation with engine 1.0
1.1 20010703 Implementation with engine 1.1
1.2 20010712 Implementation with engine 1.2

MaxorCE
0.1b 20010204 First beta-version of MaxorCE
0.2b 20010207 Fixed slow working due to too small buffersize, fixed error and result dialogs (modal)
1.0 20010609 Implementation with engine 1.0
1.1 20010703 Implementation with engine 1.1
1.2 20010712 Implementation with engine 1.2

Last update notes

2001/07/12: Version 1.2 is not compatible with earlier versions. It's recommended to use version 1.2 or later because of the new 'eXtended Key Hiding' feature.

2001/11/28: Maxor depends on the CE version of MFC (Microsoft Foundation Class). On most handhelds and palmpsize/pocket PC's the needed MFC DLL already has been installed. But in some cases it's necessary to copy the needed DLL to the /windows directory on your device.

The Handheld/PC version of Maxor needs mfcce20.dll, the PalmSize/PC versions needs mfcce201.dll. Please check here (http) or here (ftp)

2002/03/10 MaxorCE 1.21 released for PalmSize, Handheld and PocketPC devices.
Copyright © 1999-2010 by Maurice de Bijl. This article was published on 2001-02-04, the last update was done on 2002-03-10 in downloads  encryption  linux  pocketpc  windows

Was this article useful to you? Please help me by using the toolbar below to tweet the article, give it an eKudo or add it to Hyves, Facebook, Delicous, Digg or another site. Thanks!

Download article as PDF

POPULAR TAGS
Show all tags
SEARCH KEYWORD
FOLLOW ME
Twitter