ISS Notes Unit-2
ISS Notes Unit-2
Technology, Jaipur
Presented By:
Satish Kumar Alaria
Department of CSE/IT
Subject: Information Security System
Block v/s Stream Ciphers
Block size
Key size
N umber of rounds
Subkey generation algorithm
Round function
Fast software en/decryption
Ease of analysis
Feistel Cipher Decryption
Data Encryption Standard (DES)
IP(675a6967 5e5a6b5a) =
(ffb2194d 004df6fb)
DES Round Structure
uses two 32-bit L & R halves
as for any Feistel cipher can describe as:
Li = Ri–1
Ri = Li–1 F(Ri–1, Ki)
F takes 32-bit R half and 48-bit subkey:
expands R to 48-bits using perm E
adds to subkey using XOR
passes through 8 S-boxes to get 32-bit result
finally permutes using 32-bit perm P
DES Round Structure
Substitution Boxes S
Have eight S-boxes which map 6 to 4 bits
Each S-box is actually 4 little 4 bit boxes
outer bits 1 & 6 (row bits) select one row of 4
inner bits 2-5 (col bits) are substituted
result is 8 lots of 4 bits, or 32 bits
Row selection depends on both data & key
feature known as autoclaving (autokeying)
Example:
S(18 09 12 3d 11 17 38
39) = 5fd25e03
DES Key Schedule
Designed to be:
resistant
against known attacks
speed and code compactness on many CPUs
design simplicity
Data block of 4 columns of 4 bytes is state
Key is expanded to array of words
Has 9/11/13 rounds in which state undergoes:
byte substitution (1 S-box used on every byte)
shift rows (permute bytes between groups/columns)
mix columns (subs using matrix multipy of groups)
add round key (XOR state with key material)
view as alternating XOR key & scramble data bytes
Initial XOR key material & incomplete last round
With fast XOR & table lookup implementation
Byte Substitution
7 Size AES can encrypt 128 bits of plain text. DES can encrypt 64 bits of plain text.
Derived AES derives from Square cipher. DES derives from Lucifer cipher.
8
from
Desiged By AES was designed by Vincent Rijmen and DES was designed by IBM.
9
Joan Daemen.
Known No known attack. Brute-force, Linear crypt-analysis and
10 attacks Differential crypt-analysis.
Multiple Encryption & DES
Cleara replacement for DES was
needed
theoretical
attacks that can break it
demonstrated exhaustive key search
attacks
AES is a new cipher alternative
Prior to this alternative was to use
multiple encryption with DES
implementations
Triple-DES is the chosen form
Double-DES?
Could use 2 DES encrypts on each block
C = EK2(EK1(P))
Issue of reduction to single stage
And have “meet-in-the-middle” attack
works whenever use a cipher twice
since X = EK1(P) = DK2(C)
Ci = Pi XOR Oi
Oi = DESK1(Oi-1)
O-1 = IV
Uses: stream encryption on noisy channels
Output FeedBack (OFB)
Advantages and Limitations of OFB
Bit errors do not propagate
More vulnerable to message stream
modification
A variation of a Vernam cipher
hence must never reuse the same sequence (key+IV)
68
Overview
DES algorithm has been a popular secret key encryption
algorithm and is used in many commercial and financial
applications. However, its key size is too small by current
standards and its entire 56 bit key space can be searched
in approximately 22 hours
IDEA is a block cipher designed by Xuejia Lai and James
L. Massey in 1991
It is a minor revision of an earlier cipher, PES (Proposed
Encryption Standard)
IDEA was originally called IPES (Improved PES) and was
developed to replace DES
It entirely avoids the use of any lookup tables or S-boxes
IDEA was used as the symmetric cipher in early versions
of the Pretty Good Privacy cryptosystem
69
70
Detailed description of IDEA
71
Key generation
73
Encryption of the key sub-blocks
The key sub-blocks used for the encryption and
the decryption in the individual rounds are
shown in Table 1
74
Encryption
the first four 16-bit key sub-
blocks are combined with two of
the 16-bit plaintext blocks using
addition modulo 216, and with the
other two plaintext blocks using
multiplication modulo 216 + 1
At the end of the first encryption
round four 16-bit values are
produced which are used as input
to the second encryption round
The process is repeated in each
of the subsequent 7 encryption
rounds
The four 16-bit values produced
at the end of the 8th encryption
round are combined with the last
four of the 52 key sub-blocks
using addition modulo 216 and
multiplication modulo 216 + 1 to
form the resulting four 16-bit
ciphertext blocks
78
Decryption
The computational process used for
decryption of the ciphertext is essentially
the same as that used for encryption
The only difference is that each of the 52
16-bit key sub-blocks used for decryption is
the inverse of the key sub-block used
during encryption
In addition, the key sub-blocks must be
used in the reverse order during decryption
in order to reverse the encryption process
79
Modes of operation
IDEA supports all modes of operation such as:
ElectronicCode Book (ECB) mode
Cipher Block Chaining (CBC)
Cipher Feedback (CFB)
Output Feedback (OFB) modes
For plaintext exceeding this fixed size, the
simplest approach is to partition the plaintext
into blocks of equal length and encrypt each
separately. This method is named Electronic
Code Book (ECB) mode. However, Electronic
Code Book is not a good system to use with
small block sizes (for example, smaller than 40
bits)
80
Applications of IDEA
Smart cards
Conclusion
Key-dependent permutations
Simple to code
Differential Attack
After 4 rounds a differential attack is no better than a
brute force attack
Weak Keys
S-box collisions
blowfish algorithm has yet to be cracked as the key size is
high, requires 2448 combinations
Future Concerns
Simplifications
Fewer and Smaller S-boxes
Fewer Iterations
Twofish
AES Finalist
More Operations
RC 5 Algorithm
Symbol Operation
Two’s complement
addition of words
+
where addition is
modulo
Word Size P Q
(bits) (Hexadecimal) (Hexadecimal)
16 b7e1 9e37
32 b7e15163 9e3779b9
b7e151628aed2 9e3779b97f4a7c
64
a6b 15
for i=b-1 to 0
L[i/u] = (L[u/i] <<< 8) + K[i]
Step-3: Initializing sub-key S.
Sub-key S of size t=2(r+1) is initialized using magic constants P and Q.
S[0] = P
for i = 1 to 2(r+1)-1
S[i] = S[i-1] + Q)
Step-4: Sub-key mixing.
The RC5 encryption algorithm uses Sub key S. L is merely, a temporary array
formed on the basis of user entered secret key.
Mix in user’s secret key with S and L.
Step-5: Encryption.
We divide the input plain text block into two registers A and B each of size w bits.
After undergoing the encryption process the result of A and B together forms the
cipher text block.
RC5 Encryption Algorithm:
THANKS