0% found this document useful (0 votes)
11 views33 pages

Chapter01 Part 02 Updated

The document discusses the symmetric cipher model, detailing its components such as plaintext, ciphertext, encryption and decryption algorithms, and secret keys. It covers various encryption techniques including substitution and transposition methods, along with cryptanalysis and attacks on cryptosystems. Additionally, it highlights the importance of secure key management and the concept of unconditional security in encryption schemes.

Uploaded by

houndclegane869
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views33 pages

Chapter01 Part 02 Updated

The document discusses the symmetric cipher model, detailing its components such as plaintext, ciphertext, encryption and decryption algorithms, and secret keys. It covers various encryption techniques including substitution and transposition methods, along with cryptanalysis and attacks on cryptosystems. Additionally, it highlights the importance of secure key management and the concept of unconditional security in encryption schemes.

Uploaded by

houndclegane869
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 33

Topic: Symmetric Cipher Model, Substitution

- techniques, Transposition techniques,


Steganography
Symmetric Cipher Model
 A symmetric encryption scheme has five ingredients:

 Plaintext: original message to be encrypted.


 Ciphertext: the encrypted message.
 Encryption algorithm: The encryption algorithm performs various
substitutions and transformations on the plaintext.
 Decryption algorithm: This is essentially the encryption algorithm
run in reverse. It takes the ciphertext and the secret key and
produces the original plaintext.
 Secret key: A secret key is the piece of information or parameter
that is used to encrypt and decrypt messages in a symmetric, or
secret-key, encryption.
Simplified Model of Symmetric encryption
There are two requirements for secure use of symmetric
encryption:

 a strong encryption algorithm.

 a secret key known only to sender / receiver.


Model of Conventional Cryptosystem
Symmetric Encryption
Mathematically:
Y = EK(X) or Y=
E(K, X) X = DK(Y) or X=
D(K, Y)

• X = plaintext
• Y = ciphertext
• K = secret key
• E = encryption algorithm
• D = decryption algorithm
• Both E and D are known to
public
Cryptography
Cryptographic systems are characterized along three independent dimensions:

 The type of operations used for transforming plaintext to ciphertext.

 The number of keys used.

 The way in which the plaintext is processed.


Cryptanalysis
Cryptanalytic attacks rely on the nature of the algorithm plus perhaps some
knowledge of the general characteristics of the plaintext or even some sample
plaintext–ciphertext pairs. This type of attack exploits the characteristics of the
algorithm to attempt to deduce a specific plaintext or to deduce the key being
used.

Kirchhoff's principle: the adversary knows all details about a cryptosystem


except the secret key.
Two general approaches:
• brute-force attack
• non-brute-force attack (cryptanalytic attack)
Brute-force attack:
The attacker tries every possible key on a piece of ciphertext until an
intelligible translation into plaintext is obtained. On average, half of all possible
keys must be tried to achieve success.
Cryptanalytic Attacks
Unconditional Security
• An encryption scheme is unconditionally secure if the ciphertext generated
by the scheme does not contain enough information to determine uniquely
the corres-ponding plaintext, no matter how much ciphertext is available.
• Therefore, all that the users of an encryption algorithm can strive for is an
algorithm that meets one or both of the following criteria:
(1)The cost of breaking the cipher exceeds the value of the encrypted
information.
(2)The time required to break the cipher exceeds the useful lifetime of
the information.
• An encryption scheme is said to be computationally secure if either of the
foregoing two criteria are met.
Basic Terminology
• plaintext - the original message
• ciphertext - the coded message
• cipher - algorithm for transforming plaintext to ciphertext
• key - info used in cipher known only to sender/receiver
• encipher (encrypt) - converting plaintext to ciphertext
• decipher (decrypt) - recovering ciphertext from plaintext
• cryptography - study of encryption principles/methods

• cryptanalysis (codebreaking) - the study of principles/ methods of


deciphering ciphertext without knowing key
• cryptology - the field of both cryptography and cryptanalysis
Cryptosystem
A cryptosystem is a five-tuple (P,C,E,D), where the following are satisfied:
1. p is a finite set of possible plaintexts.
2. C is a finite set of possible ciphertexts.
3. K, the key space, is a finite set of possible keys
EK (encryption rule),

DK(decryption rule).
Each EK: P->C and DK: C->P are functions
such that , DK(EK(x)) = x.
The two basic building blocks of all encryption techniques are :
1. Substitution techniques: A substitution technique is one in which
the letters of plaintext are replaced by other letters or by numbers
or symbols. If the plaintext is viewed as a sequence of bits, then
substitution involves replacing plaintext bit patterns with
ciphertext bit patterns.
Different types of Substitution techniques are:
1. Caesar Cipher
2. Monoalphabetic Ciphers
3. Playfair Cipher
4. Hill Cipher
5. Polyalphabetic Ciphers
6. One-Time Pad
Caesar Cipher
The Caesar Cipher technique is one of the earliest and simplest method of
encryption technique. It’s simply a type of substitution cipher, i.e., each letter
of a given text is replaced by a letter some fixed number of positions down
the alphabet. The method is apparently named after Julius Caesar, who
apparently used it to communicate with his officials.
 Example, key=3
plaintext: hello how are you
ciphertext: KHOOR KRZ DUH BRX
Caesar Cipher
 can define transformation as:
a b c d e f g h i j k l m n o p q r s t u v w x y z
D E F G H I J K L M N O P Q R S T U V W X Y Z A B
C
 mathematically
a b c d e f g h i j kgive
l meach letter a
number
0 1 2 3 4 5
n o p q
6 7 8 9 10 11 12
r s t u v w x y
13 14 15 16 17 18 19 20 21 22 23Z 24 25

 then have Caesar cipher as:


C = E(p) = (p + k) mod (26)
p = D(C) = (C – k) mod (26)
Monoalphabetic Ciphers
• Better than Caeser Cipher
• For each character of alphabet, assign different-abrupt concerned character
• Example:
a b c d e f g h i j k l m n o p q r s t u v w x y z
Z Y X W V U T S R Q P O N M L K J I H G F E D C B A

• Monoalphabetic ciphers are easy to break because they reflect the frequency data
of the original alphabet.
• A countermeasure is to provide multiple substitutes, known as homophones, for a
single letter. If two letters considered for substitutes it is called as digrams.
•For Example: A-
Plaintext: goodmorning
Ciphertext:
TLLWNLIMRMT
Playfair Cipher
• The best-known multiple-letter encryption cipher is the Playfair, which
treats diagrams in the plaintext as single units and translates these units
into ciphertext diagrams.
• The Playfair algorithm is based on the use of a 5 * 5 matrix of letters
constructed using a keyword.
 For Example,
Keyword: security

(monarchy)
Plaintext: pattern
• In this case, the keyword is security. The matrix is constructed by filling in
the letters of the keyword (minus duplicates) from left to right and from top
to bottom, and then filling in the remainder of the matrix with the remaining
S E C U R
I/J T Y A B
D F G H K Plaintext is encrypted two letters at a time, according
L M N O P to the following rules: BALLOON=> BA LX L0 ON
Q V W X Z

1) Repeating plaintext letters that are in the same pair are separated with a filler
letter, such as x, so that pattern would be treated as pa tx te rn.
2) Two plaintext letters that fall in the same row of the matrix are each replaced
by the letter to the right, with the first element of the row circularly following
the last. For example, op is encrypted as PL.
3) Two plaintext letters that fall in the same column are each replaced by the
letter beneath, with the top element of the column circularly following the
last. For example, mv is encrypted as VE.
4) Otherwise, each plaintext letter in a pair is replaced by the letter that lies in
its own row and the column occupied by the other plaintext letter. Thus, pa
becomes OB.
Plaintext: pa tx te rn
Ciphertext: OB VA FT CP

 The Playfair cipher is


a great advance over
simple
monoalphabetic
ciphers.

 For one thing, whereas there are only 26 letters, there are 26 * 26 = 676
diagrams, so that identification of individual diagrams is more difficult.
Hill Cipher
• This encryption algorithm takes m successive plaintext letters and substitutes
for them m ciphertext letters.
• The substitution is determined by m linear equations in which each character
is assigned a numerical value.
a b c d e f g h i j k l m n o p q r s t u v w x y z
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

In general terms , the hill system can be expressed as,


C=E(P,K)=PKmod26
P=D(C,K)=C𝐾−1mod26
Example

1 2
2
Plaintext: abcd
Keyword: 35 1
𝑘−1 3 −1
2 −1 5 3
=
P=D(C,K)=C𝐾−1mod2
=

6 5 𝑎c − 𝑏𝑑 5
C=E(P,K)=PKmod26
1 3 1 2 2
0 −1 mod26
C= 2 mod26 21 8 5
3 5 2
P=
3
0
5 2
P= 1
C=
21 mod26 2 3
0
mod26

P= 2 1
C=
8
5
C=fcvi 3
P=abcd
Polyalphabetic Ciphers
• Another way to improve on the simple monoalphabetic technique is to use different
monoalphabetic substitutions as one proceeds through the plaintext message.
• The general name for this approach is polyalphabetic substitution cipher.
• All these techniques have the following features in common:

1. A set of related monoalphabetic substitution rules is used.


2. A key determines which particular rule is chosen for a given transformation.
𝐶𝑖ሶ 𝑃𝑖 + 𝑘𝑖 mod
=
For Example, mod26
key: deceptivewearediscoveredsav 𝑚

𝑃𝑖ሶ
𝐶𝑖 − 𝑘𝑖
plaintext: wearediscoveredsaveyourself
=
ciphertext: ZICVTWQNGKZEIIGASXSTSLVVWLA mod26
mod 𝑚
One-Time Pad (Vernam cipher)
ANKYODKYUREPFJBYOJDSPLREYIUNOFDOIUERFPLUYTS

We now show two different decryptions using two different keys:

ciphertext: ANKYODKYUREPFJBYOJDSPLREYIUNOFDOIUERFPLUYTS
key: pxlmvmsydofuyrvzwc tnlebnecvgdupahfzzlmnyih
plaintext: mr mustard with the candlestick in the hall

ciphertext:
ANKYODKYUREPFJBYOJDSPLREYIUNOFDOIUERFPLUYT
S
key: mfugpmiydgaxgoufhklllmhsqdqogtewbqfgyovuhwt
plaintext: miss scarlet with the knife in the library
• In theory, we need look no further for a cipher. The one-time pad
offers complete security but, in practice, has two fundamental difficulties:
1.There is the practical problem of making large
quantities of random heavilykeys. usedAnysystem might millions
of random characters on a regular require basis.
characters in this volume is a significant task.
Supplying truly random
2.Even more daunting is the problem of key distribution and
protection. For every message to be sent, a key
is needed by both sender and receiver. Thus, a mammoth
distribution problem
key exists. of
• Because of these difficulties, the one-time pad is of limited utility and
is useful primarily for low-bandwidth channels requiringequal
very high security.
• The one-time pad is the only cryptosystem that exhibits what is referred to as
perfect secrecy. length
Transposition Techniques
 A very different kind of mapping is achieved by performing some sort of
permutation on the plaintext letters. This technique is referred to as a
transposition cipher.
 The simplest such cipher is the rail fence technique, in which the plaintext is
written down as a sequence of diagonals and then read off as a sequence of
rows.
For Example,
Plaintext: meet me after the toga party
rail fence of depth: 2
mematrhtgpry
etefeteoaat

The encrypted
message is:
A more complex scheme is to write the message in a rectangle, row by row, and
read the message off, column by column, but permute the order of the columns.
The order of the columns then becomes the key to the algorithm.

Key: 4312567
Plaintext: a t t a c k p
os t ponE
dun t I l T
wo amx y z

Ciphertext: TTNAAPTMTSUOAODWCOIXKNLYPETZ
The transposition cipher can be made significantly more secure by performing
more than one stage of transposition. The result is a more complex permutation
that is not easily reconstructed. Thus, if the foregoing message is reencrypted
using the same algorithm,
Key: 4312567
Plaintext t t n a a p t
: mt s uo a o
dwc o i x k
n l ype t z

Output: NSCYAUOPTTWLTMDNAOIEPAXTTOKZ
• To visualize the result of this double transposition, designate the letters in the
original plaintext message by the numbers designating their position. Thus,
with 28 letters in the message, the original sequence of letters is,
01 02 03 04 05 06 07 08 09 10 11 12 13 14
15 16 17 18 19 20 21 22 23 24 25 26 27 28
• After the first transposition we have,
03 10 17 24 04 11 18 25 02 09 16 23 01 08
15 22 05 12 19 26 06 13 20 27 07 14 21 28
• which has a somewhat regular structure. But after the second transposition,
we have,
17 09 05 27 24 16 12 07 10 02 22 20 03 25
15 13 04 23 19 14 11 01 26 21 18 08 06 28
• This is a much less structured permutation and is much more difficult to
cryptanalyze.
Steganograph
y
 A plaintext message may be hidden in one of two ways. The methods of
steganography conceal the existence of the message, whereas the methods
of cryptography render the message unintelligible to outsiders by various
transformations of the text.

Various other techniques have been used historically; some examples are the
following :
Character marking: Selected letters of printed or typewritten text are
overwritten in pencil. The marks are ordinarily not visible unless the paper is
held at an angle to bright light.
Invisible ink: A number of substances can be used for writing but leave no
visible trace until heat or some chemical is applied to the paper.
Pin punctures: Small pin punctures on selected letters are ordinarily not
visible unless the paper is held up in front of a light.
Typewriter correction ribbon: Used between lines typed with a black ribbon,
the results of typing with the correction tape are visible only under a strong
light.

• Steganography has a number of drawbacks when compared to encryption. It


requires a lot of overhead to hide a relatively few bits of information,
although using a scheme like that proposed in the preceding paragraph may
make it more effective.
• Also, once the system is discovered, it becomes virtually worthless. This
problem, too, can be overcome if the insertion method depends on some sort
of key.
• Alternatively, a message can be first encrypted and then hidden using
steganography.
• The advantage of steganography is that it can be employed by parties
who have something to lose should the fact of their secret
communication (not necessarily the content) be discovered.
• Encryption flags traffic as important or secret or may identify the sender
or receiver as someone with something to hide.

THANK YOU

You might also like