Professional Documents
Culture Documents
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
7.14
2.2 Rotation/Permutation
ShiftRows
In the encryption, the transformation is called ShiftRows.
7.15
7.2.2 Continue
Example 7.4
7.16
2.3 Mix Columns
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.
7.20
2.4 Add Round Key
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
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
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)
BKM/SIT
Message Detection Code
MESSAGE AUTHENTICATION
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’