Home
Name Modified Size InfoDownloads / Week
RPM 2014-05-28
challenge 2014-01-07
README 2014-06-12 5.5 kB
xxteac-0.93.tar.gz 2014-05-28 125.5 kB
Totals: 4 Items   131.0 kB 0
xxteac v0.93 release notes:

Hi folks,

This program utilizes the "Corrected Block TEA" (also known as XXTEA)
encryption algorithm by Roger Needham and David Wheeler, published in 1998.
I have slightly modified the cipher to be able to use arbitary length
(powers of 2) key sizes.
There may be bugs and I am grateful if you report them to me.
Thank you in advance!

To compile and install this program (xxteac), try one
of the following methods:


Download and unzip the xxteac package:
---------------------------------------
0)

tar xzf xxteac-0.93.tar.gz
(In Linux, type "tar -zxvf xxteac-0.93.tar.gz")

Then go to the installation directory, type:
cd xxteac-0.93

INSTALLATION METHODS:
---------------------
---------------------
(I) STANDARD INSTALLATION:
--------------------------
(Use this method if you want to install the source tarball and your build tools are up to date).

In the installation directory, type:

./configure
make
make install

If you get an error message, try manual installation, as decribed below.


(II) MANUAL INSTALLATION:
-------------------------
Compile the source code manually. (Use this method if step 1 above failed).

cd xxteac-0.93   (go to the installation directory if you are not there already...)
cd src           (go to the source directory)

Compile the source code, type:
gcc -O3 -Wall xxteac.c -o xxteac

(NOTE: To next step requires you to become root user)

mkdir -p /usr/local/bin
cp -f ./xxteac /usr/local/bin  (Replace "/usr/local/bin" with a target directory
where you want to install the executable).

Optionally, take a copy of the manual "xxteac.1":

cd ../man
mkdir -p /usr/local/man/man1
cp -f xxteac.1 /usr/local/man/man1

That should be all.
(Maybe you want to add "/usr/local/man" to your MANPATH if it's not
already there... (Maybe /usr/local/share/man too?)

export MANPATH=$MANPATH:/usr/local/man:/usr/local/share/man

If you don't use GCC, then just compile and link xxteac.c with
your favorite tools. I have no experience how it works though.

(III) RPM INSTALLATION:
-----------------------
You don't need to compile the xxteac source code at all, it is pre-compiled
in the sub-directory https://sourceforge.net/projects/xxteac/files/RPM/
If you have a 64-bit Linux system, Download the file xxteac-0.93-3.x86_64.rpm
and install it (as root) by typing "rpm -Uvh xxteac-0.93-3.x86_64.rpm".
This will install xxteac program and the manual automatically.

If you are not satisfied with the program, you can easily remove it from the
system by typing "rpm -e xxteac".

-------------------------------------------------------------------------------


USING XXTEAC:
-------------------

To use xxteac, you need a 1024 byte password file.
The size may be bigger than that but not smaller.
It can be any binary file, I used an encrypted JPG picture
to test encryption and decryption of files with xxteac.
Here is how I made my password file for testing:

I took two binary files, both at least one Kilobyte (1024 bytes) in size.
These were actually JPG pictures, but it won't matter what kind of files they
are, as long as they are big enough (1024 bytes or more). See that I actually
remove the jpg-headers (using the "dd" command) out of the pictures before
using them. This is because there is some non-random data in those headers
and I want to get rid of it first.

Then I encrypted the first modified JPG picture (photo1.foo) using the second
modified JPG picture (photo2.foo) as a key file, like this:

First remove headers from both pictures:
dd if=photo1.jpg of=photo1.foo skip=1
dd if=photo2.jpg of=photo2.foo skip=1
Then encrypt the first modified picture with the second one.
xxteac photo1.foo -enc -file photo2.foo -o encrypted.foo

This created an encrypted file (ecrypted.foo) from which I then extracted the
first 1024 bytes to be my test key, like this:

dd if=encrypted.foo of=key.1024 bs=1024 count=1

And finally clean up:
rm photo1.jpg photo2.jpg photo1.foo photo2.foo encrypted.foo

That's right! You should delete all those files and only save the
"key.1024" file (and give it a better, non-suspicious name also), so maybe
you want to shoot some random photos which are not important and which you
can delete after creating the key - if you create it like this!

So, this method created a key file called "key.1024" which I used to test xxteac.
I don't recommend using this method however - I leave it to you
how to create a good password file. Just remember that it is
a secret file for authorized eyes only. It should be as random as possible.
You need this file to decrypt your previously encrypted files too,
so don't loose it. (Maybe use more than two files to create that password
file? Hmmm...)

Maybe just download it from the /dev/random or /dev/urandom ?
dd if=/dev/random of=key.1024 bs=1024 count=1

The choise is yours.

As a summary, here is how to encrypt a file using xxteac:
Assuming you want to encrypt a file called "secret.txt"
using a password file called "key.1024", type
xxteac secret.txt -enc -file key.1024 -o secret.enc
This creates an encrypted file called "secret.enc" and you
can decrypt it by typing:
xxteac secret.enc -dec -file key.1024 -o secret2.txt

See man(1) xxteac also, type:
man 1 xxteac

If you use this program, you agree that you do so at your own risk.
Please see the included General Public License in the file "COPYING"
for more information. Thank you!

  - Niko Kiiskinen


PS.
If you have any questions about this program or
if you want to report a bug, my email address
is nkiiskin[at]yahoo[dot]com
Source: README, updated 2014-06-12