programming / C++ / sailing / nerd stuff
© 2005-01-01 / Mario Konrad
Tool for handling of redshirt encrypted files.


Redshirt is a pseudo encryption which is used in the game Uplink™ to store savegames. If you like to hack a savegame (to gain more money, etc.) you’ll have to decrypt the file, edit, and encrypt it. There is a tool available on the internet but only in binary and only for Windows™ patforms. This is the reason I wrote this little tool, to have an open source tool that works on other platforms as well.


There are to ways to use the tool in general:

$ cat savegame.usr | redshirt -d > savegame.dec
$ cat savegame.dec | redshirst -e > savegame.usr

or the variant with specified filenames:

$ redshirt -d savegame.usr savegame.dec
$ redshirt -e savegame.dec savegame.usr

The options are:


All source code provided by this chapter is distributed under the terms of the GPL.

Use it on your own risk.


Since there is a source-only distribution, the installation means to compile it. Copy the binary whereever you like (preferrably within the search path). I have compiled the tool with GCC 3.2.2 under Linux and Cygwin. It is written in C++, so I think it is compilable with any C++ compiler, the Makefile however is meant to be used with GNU make (no support for VC++, sorry).

Unpack the archive and change into the created directory:

$ tar -xzf redshirt-src.tgz
$ cd redshirt

Build the binary:

$ make

Copy the binary to a location of your choice:

$ cp redshirt $HOME/bin

Update: Paul Vgenderen

Paul was so kind to send me another implementation, more efficient from a computers point of view. Using the provided build procedure a very small binary will be created. This is indeed an interesting approach to decrease the size of a binary, thanks Paul!

Download: redshirt.c


$ gcc -S -Wall -ansi -pedantic -Os -finline-functions -falign-functions -falign-jumps -falign-loops \
    -freorder-blocks -march=pentiumpro redshirt.c -o - | grep -v 'redshirt.c' | grep -v '.ident' \
    | grep -v '.note.GNU-stack' >redshirt.s
$ gcc -o redshirt redshirt.s
$ strip -R .note.ABI-tag -R .bss -R .comment redshirt

Please note: the argument `-march=pentiumpro`` may change in your case, depending on the CPU you have.

Installation (copy the file to a location of your choice):

$ cp redshirt $HOME/bin


$ redshirt -d savegame.usr > savegame.dec
$ redshirt -e savegame.dec > savegame.usr

The options are: