Академический Документы
Профессиональный Документы
Культура Документы
Ciphertext
C=EK(M)
Encryption Decryption
Key (K) Key (K')
Classifications
• Classification of cryptosystems
– Symmetric cryptosystems
– Asymmetric cryptosystems
Symmetric Cryptosystem
• The same key is used for both encryption and
decryption purposes
Ciphertext
C=EK(M)
Plaintext Encryption Decryption Plaintext
Message (M) Message (M)
Process E Process D
Key (K)
Symmetric Cryptosystem
• Examples of symmetric cryptosystem are Data
Encryption Standard (DES)
• Session key:
– Data encrypted with a one-time session
key.At the conclusion of the session the key
is destroyed
Key Distribution
• Permanent key:
– Used between entities for the purpose of
distributing session keys
• Protocol:
– Defines the detail formats of messages sent
from one entity to the another to accomplish
a job
Assymmetric Cryptosystem
• Different keys are used for encryption and
decryption purposes.
Ciphertext
C=EK(M)
Plaintext Encryption Decryption Plaintext
Message (M) Message (M)
Process E Process D
The ciphertext
characters are also
created one at a
time.
9.17
Stream Ciphers (continued…)
Example:
9.18
Block Ciphers:
9.19
Block Ciphers (continued…):
Block ciphers are currently better analyzed, and seem to have a broader
range of applications. Many current ciphers are block ciphers. Example: Data
Encryption Standard (DES), Advanced Encryption Standard (AES), and IDEA
all are block algorithms.
In a block cipher, a group of plaintext symbols of size m (m > 1) are
encrypted together creating a group of ciphertext of the same size. A single
key is used to encrypt the whole block even if the key is made of multiple
values.
Figure below shows the general idea of encryption and decryption in a
modern block cipher.
9.20
Block Ciphers (continued…):
Example
Plaintext blocks : Theonlyt hingweha vetofear isfearit selfXend (break the plaintext into 8-character block)
Ciphertext blocks : tylnoehT ahewgnih raefotev tiraefsi dneXfles (just reverse each plaintext block)
Ciphertext : tylnoehTahewgnihraefotevtiraefsidneXfles
9.21
Stream Ciphers
• A symbol of plaintext is immediately converted
into a symbol of ciphertext
• Advantages
– Speed of transformation
– Low error propagation
• Disadvantages
– Low diffusion
– Susceptible to malicious insertions and modifications
Block Ciphers
• A group of plaintext symbols are converted as a
block into a group of ciphertext symbols
• Advantages
– Diffusion
– Immunity to insertions
• Disadvantages
– Slowness of encryption
– Error propagation
General Types of Ciphers
• Substitution ciphers
– Letters of the plaintext messages are replaced
with other letters during the encryption
• Transposition ciphers
– The order of plaintext letters is rearranged
during encryption
General Types of Ciphers
• Product ciphers
– Combine two or more ciphers to enhance the
security of the cryptosystem
Trends
• Block size: larger block sizes mean greater
security
• Key Size: larger key size means greater
security
• Number of rounds: multiple rounds offer
increasing security
Traditional Substitution Symmetric- Key Ciphers
Monoalphabetic Ciphers
In monoalphabetic substitution, the relationship between a symbol in the
plaintext to a symbol in the ciphertext is always one-to-one.
That is, a character or symbol in the plaintext is always changed to the
same character or symbol in the ciphertext regardless of its position in the
text.
For example, if letter A in the plaintext is changed to letter D, every letter A
is changed to letter D.
Additive cipher, Caesar cipher, multiplicative cipher, affine cipher etc. are
some examples of monoalphabetic ciphers.
Example:
The following shows a plaintext and its corresponding ciphertext. The cipher is
probably monoalphabetic because both l’s (els) are encrypted as O’s.
4.27
Traditional Substitution Symmetric- Key Ciphers
Polyalphabetic Ciphers
In polyalphabetic substitution, each occurrence of a character may have a
different substitute.
The relationship between a character in the plaintext to a character in the
ciphertext is one-to-many.
For example, if letter “a” could be enciphered as “D” in the beginning of
the text, but as “N” at the middle.
Polyalphabetic ciphers have the advantage of hiding the letter frequency
of the undelying language. Eve cannot use the single-letter frequency
statistics to break the ciphertext.
Autokey cipher, playfair cipher, vigenere cipher, Hill cipher etc. are some
examples of polyalphabetic ciphers.
Example:
The following shows a plaintext and its corresponding ciphertext. The cipher
is polyalphabetic because each l (el) is encrypted by a different character.
The first l (el) is encrypted as N; the second as Z.
4.28
Substitution Cipher: Additive Cipher
The simplest monoalphabetic cipher is the additive cipher. This cipher is
sometimes called a shift cipher and sometimes a Caesar cipher, but the term
additive cipher better reveals its mathematical nature.
Assume that the plaintext consists of lowercase letters (a to z), and that the
ciphertext consists of uppercase letters (A to Z).
To be able to apply mathematical operations on the plaintext and ciphertext,
we assign numerical values to each letter as shown in the figure below.
Note:
Each character (uppercase or lowercase) is assigned an integer in Z 26. The
secret key between Alice and Bob is also an integer in Z 26.
For simplicity, lowercase characters are used as plaintext and uppercase
characters are used as ciphertext.
4.29
Substitution Cipher: Additive Cipher
When the cipher is additive, the plaintext, ciphertext, and key are integers in
Z26.
The encryption algorithm adds the key to the plaintext character; the
decryption algorithm subtracts the key from the ciphertext character. That is,
encryption and decryption are inverse of each other.
Figure below shows the process of additive cipher.
4.30
Substitution Cipher: Additive Cipher
Example:
Use the additive cipher with key = 15 to encrypt the message “hello”.
Solution
4.31
Substitution Cipher: Additive Cipher
Example:
Use the additive cipher with key = 15 to decrypt the message “WTAAD”.
Solution:
4.32
Transposition Ciphers
• Rearrangement of the letters or a message
Columnar transposition
Plaintext Ciphertext
W H Y D O welrnel
E S I T A hswatta
L W A Y S yiaihhn
R A I N I dtyneed
N T H E N oasinrs
E T H E R
L A N D S
Characteristics of good cipher
• Shannon characteristics
– The amount of secrecy should determine the amount
of labor appropriate for the encryption and
decryption
– The set of keys and encryption algorithm should be
free of complexity
– The implementation of the process should be as
simple as possible
Characteristics of good cipher
– Errors in encryption should not propagate and cause
corruption of further information in the message.
– Ciphertext size should not be larger than plaintext
• Confusion
– The change in ciphertext triggered by an alteration in
the plaintext should be unpredictable
Characteristics of good cipher
• Diffusion
– Change in the plaintext should affect many parts of
the ciphertext
• Other issues
– Perfect secrecy vs. Effective secrecy
– Redundancy of languages
– Unicity distance
Methods of attack
• Ciphertext-only attack
– The attacker gets a ciphertext and tries to find
the corresponding plaintext.
• Known-plaintext attack
– The attacker has some plaintext and its
matching ciphertext. The task is to find a key
corresponding to this match.
Methods of attack
• Chosen-plaintext attack
– Here, the attacker selects a plaintext and ciphers it
using the cryptotechinque he attacks. The plaintext
may be chosen to ease the task of key finding.