Sie sind auf Seite 1von 22

Mini AES

TINGKAT II TEKNIK RANCANG BANGUN


2013-2014
Outline
Introduction
MathematicalBackground
Structure
Encryption
KeySchedule
Decryption

Example
Introduction
JustliketheDES,theAESisexpectedtodrawmuchattentionfrom
cryptographersandcryptanalystsalikewithinthespaceofthetimefrom
nowuntilthenextfewdecades.
MiniAEShasalltheparameterssignificantlyreducedwhileatthesame
timepreservingitsoriginalstructure.
Itismeanttobeapurelyeducationalcipherandisnotconsideredsecure
foractualapplications.
Thepurposeissuchthatonceundergraduatestudentsandamateur
cryptanaystshavegraspedthebasicprinciplesbehindhowMiniAES
works,itwillbeeasyforthemtomoveontotherealAES.
MiniAEShasacomponent,NibbleSub,whichoperatesonanibble(4bits)
atatime.
Mathematical Background
TheFiniteField
Additionin
Multiplicationin
The Finite Field
ThenibbleofMiniAEScanbethoughtofaselementsinthefinite
field.
Finitefieldshavethespecialpropertythatoperationonthefield
elementsalwayscausetheresulttobealsointhefield.
Consideranibblewhere.
Thisnibblecanberepresentedasapolynomialwithbinary
coefficientsi.ehavingvaluesintheset
Addition in
Elementsofisrepresentedaspolynomialswithcoefficientsinthen
additionoftwosuchelementsissimplyadditionofthecoefficientsof
thetwopolynomials.
Sincethecoefficientshavevaluesin,thentheadditionofthe
coefficientsisjustmoduloadditionorexclusiveORdenotedbythe
symbol
Thesymbolsandareusedinterchangeablytodenoteadditionoftwo
elementsin.
Multiplication in
Multiplicationoftwoelementsofcanbedonebysimplymultiplying
thetwopolynomials.
Inordertoensurethattheresultofthemultiplicationisstillwithin
thefield,itmustbereducedbydivisionwithanirreducible
polynomialofdegree,theremainderofwhichwillbetakenasthe
finalresult.
Therearemanysuchirreduciblepolynomials,butforMiniAES,itis
chosentobe:
Structure
InordertoencryptmessagewithMIniAES,theoriginalinput
message,calledtheplaintextisbrokenupintoblocksofbitseach.
Atanyonetime,onlyoneplaintextblockisencryptedwithMiniAES
intociphertext,afterwhichthenextplaintextblockisencryptedand
theprocessrepeatsuntilallofplaintextblockshavebeenencrypted.
MiniAESencryptionisdonewithasecretkeyofbits.
Structure

EncryptingAPlaintextMessageWithMiniAES
Encryption
MiniAESComponents
NibbleSub,
ShiftRow,
MixColumn,
KeyAddition,
Mini AES Components
Theinputplaintextblockofbits,isrepresentedasamatrixofrows
andcolumnsofbits(anibble).
NibbleSub,

NibbleSubisasimpleoperationthatsubstituteseachinputnibblewith
anoutputnibbleaccordingtoasubstitutiontable(SBox).
ShiftRow,

ShiftRowrotateseachrowoftheinputblocktotheleftbydifferent
nibbleamounts.
Thefirstrowisunchangedwhilethesecondrowisrotatedleftby
onenibble.
MixColumn,

MixColumntakeseachcolumnoftheinputblockandmultipliesitwith
aconstantmatrixtoobtainanewoutputcolumn.
KeyAddition,

KeyAddition causes each bit of the input block to be exclusive-Ored with the
corresponding bit of the round key, to obtain the -bit output block
The round key is derived from the secret key, by using the key schedule.
Mini AES Encryption
The application of the four components NibbleSub, ShiftRow, MixColumn and KeyAddition in
sequence constitutes one round.
The full Mini AES encryption consists of two such rounds, with the exclusion of MixColumn
from the last round and the inclusion of an extra KeyAddition prior to the first round.
Hence, Mini AES encryption can be denoted by:
Key Schedule
InMiniAES,thebitsecretkeyis
passedthroughakeyscheduleto
produceonebitroundkey,tobe
usedpriortofirstround,andabit
roundkey,,foruseineachround
ofMiniAES.
MiniAESencryptionisdefinedto
haverounds,hencethreeround
keys,andaregenerated.
Notethatineachround,round
constantsareused,whereand
Decryption
In order to get back the original plaintext, the reverse process of encryption must be performed on the
ciphertext.
Noting that decryption is the inverse of encryption, then
Example
Supposethattheinputbitplaintextblockis

Andthesecretkeyis

So,thefinalciphertextis

Letsverifythisresult.
Exercise
1.

2.

~Thank You~

K0 = 0001 1000 1010 1110
K1 = 0000 1000 0010 1100
K2 = 0111 1111 1101 0001

Das könnte Ihnen auch gefallen