15 Oct Symmetric-Key-Encryption-Algorithms
15 Oct Symmetric-Key-Encryption-Algorithms
Encryption
Algorithms
• Two categories of methods
– Stream cipher: algorithm operates on
individual bits (or bytes); one at a
time
– Block cipher: operates on fixed-
length groups of bits called blocks
Idea of a block
cipher
• Partition the text into relatively large (e.g.
128 bits) blocks and encode each block
separately.
• The encoding of each block generally
depends on at most one of the previous
blocks.
• The same “key” is used at each block.
• The Data Encryption Standard (DES) is an
example of a block cipher, where blocks of
64 bits are encrypted using a 56-bit key.
• many current ciphers are block ciphers
–
better analyzed
–
broader range of applications
Idea of a stream
•
cipher
stream ciphers process messages a bit or
byte at a time when en/decrypting
• The Vigenère cipher is an example of a
stream cipher.
• For each block, a different “key” is
generated.
• Block ciphers work a on block / word at a
time, which is some number of bits. All
of these bits have to be available before
the block can be processed.
• Stream ciphers work on a bit or byte of the
message at a time, hence process it as a
“stream”.
Only a few symmetric methods
are used today:
Data Encryption Standard
(DES)
• The Data Encryption Standard (DES) is a
symmetric-key block cipher published by the
National Institute of Standards and Technology
(NIST).
Data Encryption Standard (DES)
History
• DES is a block cipher, Encryption and
decryption with DES is shown
bellow.
DES STRUCTURE
• The encryption process is made of two
permutations (P-boxes), which we call
initial and final permutations, and sixteen
rounds.
Initial Permutation
•
IP
first step of the data computation
• IP reorders the input data bits
• even bits to LH half, odd bits to RH
half
• quite regular in structure (easy in
h/w)
• no cryptographic value
DES
description
• Block cipher: 64 bits at a time
• Initial permutation rearranges 64 bits
(no cryptographic effect)
• Encoding is in 16 rounds
• ENCRYPTION
Each block is subjected to 16 rounds of
substitutions and permutations
(transpositions).
Each round uses 48 bits from key called
the subkey.
Initial and final permutation appear to
be redundant.
• DECRYPTION
process as encryption but with subkeys applied
in reverseorder
One
•
Round
64 bits divided into left, right halves
• Right half goes through function f, mixed with
key
• Right half added to left half
• Halves swapped (except in last round)
• Expand right side from 32 to 48 bits (some
get reused)
• Add 48 bits of key (chosen by schedule)
• S-boxes: each set of 6 bits reduced to 4
• P-box permutes 32 bits
Strength of DES – Key
56-bit
Size
keys have 2 = 7.2 x 10 values
56 16