You are on page 1of 53

Advanced Encryption

Standard
1.One time initialization
1.1 Key expansion
1.2 Plain Text block initialization
2. Process in each round
2.1 S-Box substitution
2.2 Rotate
2.3 Mix columns
2.4 Add round key
1.1Key Expansion
AES key expansion
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16

1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16

W4 W4 W4 W4
W0 W1 W2 W3 0 1 2 3
Key expansion for words w[4] till w[43]
Key Expansion Algorithm
Every added word w[i] depends on w[i-1] &
w[i-4].
for (i=4; i<44; i++)
{
temp= w[i-1] ;
if (i mod 4==0)
temp=substitute(rotate(temp))XORconstant[i/4];
W[i]=w[i-4]XOR temp;
}
1.2 Conversion of 16 byte plain text
block into state array
B1 B2 B3 B4 B5 B6 B7 B8 B9 B10 B11 B12 B13 B14 B15 B16

B1 B5 B9 B13
B2 B6 B10 B14
B3 B7 B11 B15
B4 B8 B12 B16
Changing plaintext to state

7.9
K0 K4 K8 K12 B1 B5 B9 B13
K1 K5 K9 K13 B2 B6 B10 B14
K2 K6 K10 K14 B3 B7 B11 B15
K3 K7 K11 K15 B4 B8 B12 B16

INITIALIZATION COMPLETE…….
2 Structure of Each Round

7.11
2.1 Sub-bytes transformation

7.12
7.13
Example 7.2

Figure 7.7 shows how a state is transformed using the SubBytes


transformation. The figure also shows that the InvSubBytes
transformation creates the original one. Note that if the two bytes
have the same values, their transformation is also the same.

Figure 7.7 SubBytes transformation for Example 7.2

7.14
2.2 Rotation/Permutation

ShiftRows
In the encryption, the transformation is called ShiftRows.

Figure 7.9 ShiftRows transformation

7.15
7.2.2 Continue
Example 7.4

Figure 7.10 shows how a state is transformed using ShiftRows


transformation.

Figure 7.10 ShiftRows transformation in Example 7.4

7.16
2.3 Mix Columns

The Mix Columns transformation operates at the column


level; it transforms each column of the state to a new
column.

MixColumns transformation

7.17
Mix Columns Operation
b1 b5 b9 b13 2 3 1 1
b2 b6 b10 b14 1 2 3 1
b3 b7 b11 b15 1 1 2 3
b4 b8 b12 b16 3 1 1 2

B1 B5 B9 B13
B2 B6 B10 B14
B3 B7 B11 B15
B4 B8 B12 B16
Mix Columns Operation
b1 b5 b9 b13 2 3 1 1
b2 b6 b10 b14 1 2 3 1
b3 b7 b11 b15 1 1 2 3
b4 b8 b12 b16 3 1 1 2

B1=(b1*2)XOR(b2*3)XOR(b3*1)XOR(b4*1)
B2=(b1*1)XOR(b2*2)XOR(b3*3)XOR(b4*1)
B3=(b1*1)XOR(b2*1)XOR(b3*2)XOR(b4*3)
B4=(b1*3)XOR(b2*1)XOR(b3*1)XOR(b4*2)
7.2.3 Continue
Example 7.5
Figure 7.14 shows how a state is transformed using the
MixColumns transformation. The figure also shows that the
InvMixColumns transformation creates the original one.

Figure 7.14 The MixColumns transformation in Example 7.5

7.20
2.4 Add Round Key

Add Round Key proceeds one column at a time.


Add Round Key adds a round key word with each
state column matrix; the operation in Add
RoundKey is matrix addition.

7.21
Key For Round
one

B1 B5 B9 B13 K0 K4 K8 K12
B2 B6 B10 B14 K1 K5 K9 K13
B3 B7 B11 B15 K2 K6 K10 K14
B4 B8 B12 B16 K3 K7 K11 K15

W[4] W[5] W[6] W[7]


• For round 1 (K1- W4,W5,W6,W7)
• For round 2 (K2- W8,W9,W10,W11)
• For round 3 (K3- W12,W13,W14,W15)
• For round 4 (K4- W16,W17,W18,W19)
• For round 5 (K5- W20,W21,W22,W23)
• For round 6 (K6- W24,W25,W26,W27)
• For round 7 (K7- W28,W29,W30,W31)
• For round 8 (K8- W32,W33,W34,W35)
• For round 9 (K9- W36,W37,W38,W39)
• For round 10 (K10- W40,W41,W42,W43)
Public-Key Cryptography
Authentication using
Public-Key System

26
HASH FUNCTIONS & DIGITAL
SIGNATURES
1. Message Authentication & Hash Functions
2. Hash Algorithms
3. Digital Signatures & Authentication Protocols.
1.Message Authentication & Hash Functions

a) Authentication Requirements
b) Authentication Functions
c) MAC
d) Hash Functions
e) Security of Hash Functions
a. Authentication Requirements
Message authentication is concerned with:
• protecting the integrity of a message
• validating identity of originator
• non-repudiation of origin (dispute resolution)
Authentication Requirements contd…
•Disclosure: Release of message contents
•Traffic analysis: Discovery of the pattern of traffic between parties
•Masquerade: Insertion of messages into the network from a
fraudulent source
•Content modification: Modification of the contents of a message
•Sequence modification: Modification to a sequence of messages
between parties
•Timing modification: Delay or replay of messages
•Source repudiation: Denial of transmission of message by source
•Destination repudiation: Denial of receipt of message by destination

31
b. Authentication Functions
• Message Encryption
• MAC
• Hash Functions
MESSAGE INTEGRITY

• How to achieve integrity in normal paper document ?


• By putting the fingerprint/signature of the owner of
the document at the bottom of the document.

BKM/SIT
Message and Message Digest
• The electronic equivalent of the document is the
Message.
• The electronic equivalent of fingerprint is
Message digest.
• A Hash Function is used to get the Message
Digest from the Message.

BKM/SIT
How to check Integrity using a
Message digest???

Received
Message
Difference
• The document and fingerprint can’t be separated from each other.
• But, the message and message digest are two separate
entities(with some mathematical/logical connection) and can be
sent separately.

Note
The message digest needs to be safe from change.

BKM/SIT
Message Authentication

 Message/Modification Detection
Code(MDC)
 Message Authentication Code(MAC)
Modification Detection Code (MDC)

• A modification detection code (MDC) is a message digest


that can prove the integrity of the message: that message
has not been changed.
• If Alice wants to send a message to Bob, she creates a
message digest, MDC, and sends both the message and the
MDC to Bob.
• Bob can create a new MDC from the received message and
compare the received MDC and the new MDC.
• If they are the same, the message has not been changed.

BKM/SIT
Message Detection Code
MESSAGE AUTHENTICATION

• A message digest does not authenticate the sender of


the message.
• The digest created by a cryptographic hash function
is normally called a modification detection code
(MDC).
• To provide message authentication, Alice needs to
provide proof that it is Alice sending the message
and not an impostor.
• What we need for message authentication is a
message authentication code (MAC).
BKM/SIT
c. Message Authentication Code (MAC)
• generated by a MAC function C that creates a
small fixed-sized block
– depending on both message M and a shared
secret key K, MAC=CK(M)
– MAC is appended to the message M
• receiver performs same computation on
message and checks it matches the MAC
• provides assurance that message is unaltered
and comes from sender
Message Authentication Code
MAC Properties
• a MAC is a cryptographic checksum
MAC = CK(M)
– condenses a variable-length message M
– using a secret key K
– to a fixed-sized authenticator
Requirements for MACs
• taking into account the types of attacks
• need the MAC to satisfy the following:
1. knowing a message and MAC, is infeasible to
find another message with same MAC
2. MACs should be uniformly distributed
3. MAC should depend equally on all bits of the
message
HASH FUNCTIONS & DIGITAL
SIGNATURES
1. Message Authentication & Hash Functions
2. Hash Algorithms
3. Digital Signatures & Authentication Protocols.
1.Message Authentication & Hash Functions

a) Authentication Requirements
b) Authentication Functions
c) MAC
d) Hash Functions
e) Security of Hash Functions
a. Authentication Requirements
Message authentication is concerned with:
• protecting the integrity of a message
• validating identity of originator
• non-repudiation of origin (dispute resolution)
Authentication Requirements contd…
•Disclosure: Release of message contents
•Traffic analysis: Discovery of the pattern of traffic between parties
•Masquerade: Insertion of messages into the network from a
fraudulent source
•Content modification: Modification of the contents of a message
•Sequence modification: Modification to a sequence of messages
between parties
•Timing modification: Delay or replay of messages
•Source repudiation: Denial of transmission of message by source
•Destination repudiation: Denial of receipt of message by destination

50
b. Authentication Functions
• Message Encryption
• MAC
• Hash Functions
Cryptographic Hash
functions..
MD5
SHA-512
Whirlpool
Iterated Hash Function
 Merkle-Damgard Scheme
Padded message

Original message
(1)Paddin (2)Append
g Length
Data to
be
Hashed
(3)Divide the i/p
into 512 bit blocks.
Each block is the
data to be hashed
Single 512-
bit block
Four (32-bit) (4)Initialize
Chaining variables chaining Reg ‘abcd’ (5)Process
variables each
a,b,c,d block
Constant
‘t’

You might also like