The Hardware Side of Cryptography

13 October 2008

LOKI91 in Hardware

Filed under: logic gate — Tags: , , , , , , — edipermadi @ 9:20 am

LOKI91 is a variant of LOKI block cipher. This cipher was designed in response to the attacks on its predecessor which is LOKI89. LOKI block cipher was developed by Australian cryptographers which are Lawrie Brown, Josef Pieprzyk, and Jennifer Seberry. The design of this block cipher was intended as an alternative of DES (Data Encryption Standard) replacement.

LOKI91 Expansion Permutation

LOKI91 uses  32 to 48 bit expansion/permutation on each iteration. The 32-bit half block of data passes expansion/permutation before being substituted. The substitution is summarized below:

Afterwards, each 12-bit of permutation/expansion result then connected to substitution phase.

LOKI91 SBOX

The LOKI91 SBOX transforms 12-bit input into 8-bit out. The output is determined by the row and column selection, characterized by:

The r parameter is taken and concatenated from 2 leftmost input and 2-rightmost input. Instead of having arithmetical view of multiplication by 17, it is also possible to describe the process in logical view. The process is started by mapping each combination of input r to the result of multiplication by 17 followed by bitwise XOR by 0xff. Mathematically speaking, that process is characterized by equation, and depicted as a truth table below:

Then Simplified to:

The table above than analyzed bit by bit, by expressing each bit of output as a function of input bits. The analysis is completed by using Karnaugh-Map and summarized as follow:

The Boolean equation above represents bit inverting and copying that implemented as follow.

LOKI91 uses extensive Galois Field computation on its SBOX. Its SBOX has 12-bit input and 8-bit output. The internal process is consisted of operations that includes exponentiation along GF(28). The exponent number and polynomial modulo are designed to be scheduled. The schedule is shown below.

If we analyze the relationship between each input and output using Karnaugh-Map, there are equations that represent each bit of output as a function of all input. Those equations are listed below.

The equation above is representable as a circuit below:

In physical interpretation, the exponentiation process is consisted of squaring and multiplication while multiplication is cocsisted of addition and multiplication by two. However, squaring is a special case of multiplication where both number are the same.

Since LOKI91 uses scheduled polynomial modulo, therefore it is important to extend the basic of multiplication by two such that it open to different types of polynomial. At last, the output of scheduling schematic is connected to the basic circuit of multiplication by two to obtain scheduled multiplication by two.

The above circuit then extended gradually to construct scheduled multiplication circuit then exponentiation circuit. In addition, i verivied that circuit against 16 test vectors. The results are test1, test2, test3, test4, test5, test6, test7, test8, test9, test10, test11, test12, test13, test14, test15, test16.

The multiplication along scheduled polynomial Pr is implemented as circuit below.

The exponentiation can be described as a set of squaring and multiplication, depicted by equation below.

The process above is summarized as a block diagram below:

The rest of SBOX implementation will be discussed soon.

LOKI91 32-bit PBOX permutation

At last, the output of substitution process then concatenated and permutated. the permutation is characterized below:

LOKI91 Key Scheduling
LOKI91 uses simple key scheduling scheme. LOKI91 has 16 iterations, therefore it requires 16 subkeys. The process of generating subkeys is mereley rotation and swap. In short, it is also possible to define subkey as bit by bit mapping.

If cipher key defined as follow:

Then subkey each subkey is defined as follow:

To be continue…

2 Comments »

  1. this looks interesting…
    tapi aku nggak ngerti maksudnaa..
    T_T

    Comment by andyan — 5 December 2008 @ 4:52 pm

    • Sorry kalo bahasanya mubeng2 gak jelas. inti posting ini tentang rancang bangun sandi LOKI91 menggunakan discrete logic gate. Crypto Engineering / Embedded Cryptography ntu menarik. Mungkin mas belum terbiasa dengan bahasa dan sense-nya aja.

      Just keep learning aja … ^_^.

      Comment by edipermadi — 5 December 2008 @ 5:08 pm


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: