The Hardware Side of Cryptography

18 February 2008

AES finite field multiplication on Logic Gates

Filed under: encryption, logic gate — Tags: , , , , , — edipermadi @ 5:13 am

Have you ever think about doing AES (Rijndael) finite field multiplication in hardware instead of software. If that so, you got the same question as me. I was wondering how to do AES (Rijndael) finite field multiplication on Logic Gates. After long path way through google. Finally, i found an idea on how to solve this problem. It was just circular left shift by one and conditional XOR by certain constant. Sounds nice and fun.

My previous was about implementing finite field mltiplication bt two, but here i expanded it into full 8 bit by 8 bit finite field multiplication for AES (Rijndael). Hopefully, if you are the one that questioning about how to implement galois field or finite field multiplication of AES (Rijndael) algorithm on hardware (especially logic gates), you will find this picture satisfy and answer your question. All of this picture is only to show you how to do C = (A x B) mod N. where N here is x8 + x4 + x3 + x1 + 1 or simply 0x1b. Just for that simple equation, we gone through this complicated path🙂 .

If you mad enough, you can expand this picture to universal finite field multiplication, not only for AES, but for any finite field multiplication. Thats gonna be cool. If you got it, you can easily implement RSA encryption using logic gates. Isn’t that mad enough🙂 .

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

Note : I just expanded this picture from my previous post about galois field.


To proof that my circuit work well, lets compare theoretical and real result. If they are the same, means the circuit is OK. For picture, lets define “1” as RED and “0” as BLUE.

For theoretical part, Lets do this :

(0x8c x 0x57) mod 0x1b = … ?
0x8c = 10001100 = (0x80 + 0x08 + 0x04)
0x57 = 01010111

(0x8c x 0x57) = (0x57 x 0x04) + (0x57 x 0x08) + (0x57 x 0x80)

Lets go further step by Step

(0x57 x 0x01) = 0x57
(0x57 x 0x02) = 10101110 = 0xae
(0x57 x 0x04) = 01011100 ^ 00011011 = 01000111 = 0x47
(0x57 x 0x08) = 10001110 = 0x8e
(0x57 x 0x10) = 00011100 ^ 00011011 = 00000111 = 0x07
(0x57 x 0x20) = 00001110 = 0x0e
(0x57 x 0x40) = 00011100 = 0x1b
(0x57 x 0x80) = 00111000 = 0x38

Previously, we stated that:
(0x8c x 0x57) = (0x57 x 0x80) + (0x57 x 0x08) + (0x57 x 0x04)


(0x8c x 0x57) = 0x47 ^ 0x8e ^ 0x38 = 0xf1

Testing Screenshot:

Finally, check the picture. It is shows 0xf1 as well. Nice!!! now i can proof that my circuit work properly😉 .


Download picture source

Advanced Encryption Standard
Finite Field

AES (Rijndael) Simulator


  1. […] and it seems that I’ve met my friend Galois field arethmitic again in the AES-algorithm. This blogpost shows a nice and tidy combinatorial implementation of multiplication in GF(8) with GPL3-licence. 10 […]

    Pingback by Hello world « Asynchronous adventures — 20 May 2009 @ 8:07 pm

    • couldn’t we also use logarithms and table lookups??

      Comment by anuj — 17 May 2011 @ 6:41 pm

  2. 241826
    express paltalk com
    farmers only gay
    dudley girls
    how to use chatroulette


    Comment by Alealokato — 27 November 2014 @ 4:37 pm

  3. garcvsреперские женские костюмы купить
    юбка длинная теплая с запахом
    вечернее платье с юбкой тюльпан
    где можно купить свадебное платье в тамбвской области
    платье на новый год купить в новосибирске
    mwecxhюбки для бального детского платья
    фото выпускниц мини юбки
    юбка при щироких бедрах
    толстовка женская сша фото
    купить свадебное платье магнитогорске
    fgymuoфутболки известных брендов женские
    женская толстовка со штанами
    модные молоджные женские толстовки
    заказать платье из интернет иагазина
    вяжем платье из листьев
    swcyleстильная женская зимняя одежда ульяновск цены
    джинсовые жилетки мини юбки
    история юбки тюльпан подробно
    платье kloe noche mio
    где купить платье на выпускной в детском с
    tnfmhvюбки диана оптом для женшин

    Comment by Alealokato — 15 January 2015 @ 2:59 am

RSS feed for comments on this post. TrackBack URI

Leave a Reply

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

You are commenting using your 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

%d bloggers like this: