Building the Software

Home page


Gecko Architecture




Test Harnesses and Sample programs




Building the Software

About Gecko



If you are building for Windows and have Visual Studio, there isn’t much you need to do. The included projects contain all the #defines and complier flags already.

However, this is such a quick read, it may be worth while to go through the quick introduction to become familiar with some of the compile-time properties of the distribution.


#defines and compiler defines:

You must define at least one of these for your implementation to enable the corresponding mode.

The Gecko test harness enables all modes (so all are defined,) since all modes are tested.


Cipher Block Chaining (CBC)


Cipher Feedback (CFB)


Counter (CTR)


Electronic Codebook (ECB)


Output Feedback (OFB)


Propagating Cipher Block Chaining (PCBC)


You will also need to define at most one of:


256 bit key


192 bit key


128 bit key



Gecko defines GKO_SPEED_OVER_SIZE as follows:

#ifndef _SIZE




Defining SPEED_OVER_SIZE unrolls all the 16 byte loops that process input bytes resulting in ~100% speedups.

This unrolling of loops adds a little bit to the overall size, but the speed benefits are striking (at least on my compiler.)

You are certainly welcome to define this or not, independent of build: Release, Size, Debug, depending on your needs.


Compiler Intrinsics _rotl8()

Gecko uses the compiler intrinsic _rotl8() to rotate the bits in an 8 bit byte left. You must enable Compiler Intrinsics in your C compiler for _rotl8().
If your compiler does not have an intrinsic for _rotl8(), then you can use the C source code version I provide in the GKO_platform.c file.




Building the Individual Projects (non-Windows)


This distribution contains two solutions. A solution is simply a collection of related projects, and a project is really just a MAKEFILE within its own directory.

Lets look at once example: C:\Tomasello Software\Gecko Encryption\Gecko_Encryption\Gecko_test_128

Gecko_test_128 is the project that exercises Gecko (and AES,) in 128 bit mode.

To build Gecko_test_128, you would simply compile all the C source files in that directory, and include the headers from:
C:\Tomasello Software\Gecko Encryption\Gecko_Encryption\Includes

For example “stdint.h” is locates here.

And include gecko.c, aes.c, GKO_platform.c, Mersenne Twister.c, and test_helpers.c from:

C:\Tomasello Software\Gecko Encryption\Gecko_Encryption\Source


The tree structure looks like this:


So to build the project Gecko_test_128, you would pull in the dependencies from both Source and Includes.

All projects work exactly like this, and many even have fewer dependencies (no aes.c, Mersenne Twister.c, test_helpers.c, etc.)


That’s it.

If you have any problems building the code, or if I have omitted any steps, please let me know on my facebook page:

Discuss on Facebook: