The Hardware Side of Cryptography

28 February 2008

Universal Finite Field Multiplication on Logic Gates

Filed under: encryption, logic gate — Tags: , , , , — edipermadi @ 6:56 am

Today i spent 3 hours sitting in the front of computer just to draw and test this circuit. This circuit is about implementing 8-bit universal finite field multiplication on discrete logic gates. This picture generalized my previous post about “How to implement AES (Rijndael) finite field multiplication on logic gates”. Here, the circuit works general, you way also implement part of “official” rijndael cipher (especially mix column) using this circuit. But you may also alter mix column process of “Official Rijndael Cipher” and create your own “unofficial” Rijndael Cipher. This is Nice and Fun! if any of you could draw me the PCB layout of this, i’ll appreciate much.

To open full-sized picture, just click on the picture (warning : large picture!)

You can freely use and redistribute this picture under the term of GNU Public License v3.0.

PROOFING AND BENCHMARK

Lets proof the circuit. The way is simple, just compare theoretical result and practical result. For the picture, lets define “1” as RED and “0” as BLUE and then color the wire bit by bit. Note that most significant bit located leftmost and least significant bit located rightmost.

Now, we are going to calculate (0xc5 x 0x67) mod (0x1b).

A = 0xc5 = 11000101
B = 0x67 = 01100111
N = 0x1b = 00011011

0xc5 = 11000101 = (0x80 + 0x40 + 0x04 + 0x01)
0xc5 x 0x67 = (0x67 x 0x80) + (0x67 x 0x40) + (0x67 x 0x04) + (0x67 x 0x01)

0x67 x 0x01 = 01100111 = 0x67
0x67 x 0x02 = 11001110 = 0xce
0x67 x 0x04 = 10011100 ^ 00011011 = 10000111 = 0x87
0x67 x 0x08 = 00001110 ^ 00011011 = 00010101 = 0x15
0x67 x 0x10 = 00101010 = 0x2a
0x67 x 0x20 = 01010100 = 0x54
0x67 x 0x40 = 10101000 = 0xa8
0x67 x 0x80 = 01010000 ^ 00011011 = 01001011 = 0x4b

0xc5 x 0x67 = (0x67 x 0x80) + (0x67 x 0x40) + (0x67 x 0x04) + (0x67 x 0x01)
0xc5 x 0x67 = 01001011 ^ 10101000 ^ 10000111 ^ 01100111 = 00000011 = 0x03

And now have a look at this picture below. I shows us 0x03 too. Isn’t it nice ha🙂 . If you want to see full-sized picture, just click on it.

You can freely use and redistribute this picture under the term of GNU Public License v3.0.

RELATED STUFF

Download:
Download picture source

References:
Rijndael
Advanced Encryption Standard
Finite Field

Simulator:
AES (Rijndael) Simulator

1 Comment »

  1. See the wikipedia entry: Zech’s logarithm and its
    reference to an algorithm of Lam & McKay

    Comment by john mckay — 26 August 2009 @ 11:50 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: