Unit1 _CSS 1 up
Unit1 _CSS 1 up
• Outcome
• Understand system security goals and concepts, classical encryption
techniques and acquire Fundamental knowledge on the concepts of
modular arithmetic and number theory.
What is Security
• Freedom from risk or danger; safety.
• Freedom from doubt, anxiety, or fear;
• confidence.
5
Why do we need security?
• Protect vital information while still allowing access to those
who need it
• Trade secrets, medical records, etc.
6
COMPUTER SECURITY CONCEPTS
A Definition of Computer Security
Confidentiality
Authentication re
cu
Se
Integrity
Avalaibility
Non-Repudiation
8
Confidentiality
:
• Goal: Keep the contents of communication or data on storage secret
• Example: Alice and Bob want their communications to be secret from Eve
• Example of attack threatening to confidentiality is traffic analysis
Data confidentiality:
Privacy
Alice Bob
9
Integrity
• Contends of the message should not be modified until it
reaches to the authorized person
• Data Integrity
• System Integrity
11
Authentication
• It is assurance of parties that they are authentic user in the
communication network
• Peer Authentication
• Data origin Authentication
2. Security mechanisms
3. Security services
Aspects of Security
Securityattack: Any action that compromises the security of
information owned by an organization.
Securitymechanism: A process that is designed to detect,
prevent, or recover from a security attack.
Securityservice: A processing or communication service that
enhances the security of the data processing systems and the
information transfers of an organization. The services are
intended to counter security attacks, and they make use of one
or more security mechanisms to provide the service.
• Threat
a) Any circumstance or event with the potential to harm
an information system through unauthorized access,
destruction, disclosure, modification of data, and/or
denial of service. Threats arise from human actions
and natural events.
b) A potential for violation of security, which exists when
there is a circumstance, capability, action, or event
Threat and that could breaks security and cause harm. That is, a
threat is a possible danger that might exploit a
Attack vulnerability ( Susceptibility to injury or attack or
weakness).
• Attack
a) Network security attacks are unauthorized actions
against private, corporate or governmental IT assets in
order to destroy them, modify them or steal sensitive
data.
b) An violation on system security that derives from an
intelligent threat; that is, an intelligent act that is a
deliberate attempt to evade security services and
violate the security policy of a system.
Security Attacks
Security attacks are classifieds into two:
1. Passive attacks
2. Active attacks.
Attacker needs to have physical control of the media or Attacker merely needs to observe the communication
network. in the media or network.
Types of active attacks are Masquerade, session replay, Types of passive attacks are the Release of a message,
denial of service, distributed denial of service. traffic analysis.
It is difficult to prevent network from active attack. Passive attacks can be prevented.
Types Security Attacks
The three goals of security can be threatened by security attacks.
21
Passive Attacks
Passive attacks are in the nature of eavesdropping on, or monitoring of, transmissions.
Two types of passive attacks are the release of message contents and traffic analysis.
• Security services and mechanisms are closely related because a mechanism or combination
of mechanisms are used to provide a service.
Security Services
• Security service means a processing or communication service that is provided by a system
to give a specific kind of protection to system resources.
In the case of a single message, its function of the authentication service is to assure the
recipient that the message is from the source that it claims to be from.
In the case of an ongoing interaction, such as the connection of a terminal to a host, two
aspects are involved.
First,
at the time of connection initiation, the service assures that the two entities are
authentic, that is, that each is the entity that it claims to be.
Second, the service must assure that the connection is not interfered with in such a way that
a third party can masquerade as one of the two legitimate parties for the purposes of
unauthorized transmission or reception.
Authentication Services
• Two specific authentication services are defined
Peer entity authentication
Data origin authentication
Peer entity authentication: Provides for the corroboration of the identity of a peer
entities involved in communication. It is used for providing authentication at the time
of connection establishment and during the process of data transmission.
Data origin authentication: Provides for the corroboration of the
source of a data unit.
It does not provide protection against the duplication or modification of data units.
This type of service supports applications like electronic mail, where there are no
prior interactions between the communicating entities.
Access Control
The prevention of unauthorized use of a resource.
Access control is the ability to limit and control the access to host systems
To achieve this, each entity trying to gain access must first be
identified, or authenticated, so that access rights can be tailored to the
individual.
Data Confidentiality
Confidentiality is the protection of transmitted data from passive attacks.
• Types of confidentiality:
Connection Confidentiality: The protection of all user data on a connection.
Connectionless Confidentiality: The protection of all user data in a single data block
Selective-Field Confidentiality: The confidentiality of selected fields within the user data
on a connection or in a single data block.
Traffic-Flow Confidentiality:The protection of the information that might be
derived from observation of traffic flows.
Data Integrity
The assurance that data received are exactly as sent by an authorized entity (i.e., contain no
modification, insertion, deletion, or replay).
• Types of integrity
Connection Integrity with Recovery: Provides for the integrity of all user data on a connection and
detects any modification, insertion, deletion, or replay of any data within an entire data sequence, with
recovery attempted.
Connection Integrity without Recovery As above, but provides only detection without recovery.
Selective-Field Connection Integrity Provides for the integrity of selected fields within the user data of
a data block transferred over a connection and takes the form of determination of whether the selected
fields have been modified, inserted, deleted, or replayed.
Data Integrity……
The stego-image (i.e., after the hiding process) The image extracted from the stego-image
Classical Encryption
Techniques
Some Basic Terminology
An original message is known as the plaintext.
The coded message is called the ciphertext.
Plaintext: This is the original intelligible message or data that is fed into the algorithm as input.
Encryption algorithm: The encryption algorithm performs various substitutions and transformations on the plaintext.
Secret key: The secret key is also input to the encryption algorithm. The key is a value independent of the plaintext
and of the algorithm. The algorithm will produce a different output depending on the specific key being used at the
time. The exact substitutions and transformations performed by the algorithm depend on the key.
Ciphertext: This is the scrambled message produced as output. It depends on the plaintext and the secret key. For a
given message, two different keys will produce two different cipher texts. The ciphertext is an apparently random
stream of data and, as it stands, is unintelligible.
Decryption algorithm: This is essentially the encryption algorithm run in reverse. It takes the ciphertext and the secret
key and produces the original plaintext.
Simplified Model of Symmetric Encryption
Requirements
•There are two requirements for secure use of conventional encryption:
Sender and receiver must have obtained copies of the secret key in a secure
fashion and must keep the key secure
Model of Symmetric Encryption
Model of Symmetric Encryption…..
• The essential elements of a symmetric encryption scheme, in the Figure.
A source produces a message in plaintext, X = [X1,X2……..XM]. The elements of are
letters in some finite alphabet. Traditionally, the alphabet usually consisted of the 26
capital letters. Nowadays, the binary alphabet {0, 1} is typically used.
For encryption, a key of the form K = [K1,K2….KJ]is generated. If the key is generated at
the message source, then it must also be provided to the destination by means of
some secure channel.
Alternatively,
a third party could generate the key and securely deliver it to both
source and destination.
Model of Symmetric Encryption…..
With the message and the encryption key as input, the encryption algorithm forms the ciphertext
• Y=[Y1,Y2….YN].
• This notation indicates that is produced by using encryption algorithm E as a function of the
plaintext X, with the specific function determined by the value of the key K
• The intended receiver, in possession of the key, is able to invert the transformation: X=D(K,Y)
An opponent, observing Y but not having access to K or X , may attempt to recover X or K or both X
and K. It is assumed that the opponent knows the encryption (E) and decryption (D) algorithms. If
the opponent is interested in only this particular message, then the focus of the effort is to recover
X by generating a plaintext estimate X .
Often, however, the opponent is interested in being able to read future messages as well, in which
Dimensions of Cryptography
• Cryptographic systems are characterized along three independent
dimensions:
1. The type of operations used for transforming plaintext to ciphertext.
1. Substitution
2. Transposition
2. The number of keys used.
1. Symmetric,
2. Asymmetric or public-key encryption.
3. The way in which the plaintext is processed.
1. Block Cipher
2. Stream Cipher
Approaches for Attacking ----
Cryptanalysis
• There are two general approaches to attacking a conventional encryption
scheme:
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.
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.
Cryptanalysis Attacks
• As cryptography is the science and art of creating secret codes,
cryptanalysis is the science and art of breaking those codes.
Cryptanalysis attacks
Ciphertext-Only Attack
Ciphertext-only attack
Brute force
Statistical attack
Pattern attack
16.62
By letter By frequency
Letter Frequency Letter Frequency
a 0.08167 e 0.12702
b 0.01492 t 0.09056
c 0.02782 a 0.08167
d 0.04253 o 0.07507
e 0.12702 i 0.06966
f 0.02228 n 0.06749
g 0.02015 s 0.06327
h 0.06094 h 0.06094
i 0.06966 r 0.05987
j 0.00153 d 0.04253
k 0.00772 l 0.04025
l 0.04025 c 0.02782
m 0.02406 u 0.02758
n 0.06749 m 0.02406
o 0.07507 w 0.02360
p 0.01929 f 0.02228
q 0.00095 g 0.02015
r 0.05987 y 0.01974
s 0.06327 p 0.01929
t 0.09056 b 0.01492
u 0.02758 v 0.00978
v 0.00978 k 0.00772
w 0.02360 j 0.00153
x 0.00150 x 0.00150
y 0.01974 q 0.00095 16.63
z 0.00074 z 0.00074
Known-Plaintext Attack
3.64
Chosen-Plaintext Attack
3.65
Chosen-Ciphertext Attack
Chosen-ciphertext attack
Categories of Traditional Ciphers
•The two basic building blocks of all encryption
techniques are substitution and transposition.
1. Substitution Cipher-Replace one symbol with another
2. Transposition Cipher -Reorders Symbols
Substitution Cipher
• Mono-alphabetic Substitution
• The relationship between symbols in plain text to a symbols In cipher text
is always one to one
68
Mono-
alphabetic
Substitution
69
Additive Cipher / Shift Cipher
/ Caesar Cipher
The earliest known, and the simplest, use of a substitution cipher was by Julius Caesar.
The Caesar cipher involves replacing each letter of the alphabet with the letter standing three places
further down the alphabet. For example,
Process of Caesar Cipher
In order to encrypt a plaintext letter, the sender positions the sliding ruler underneath the first set of plaintext
letters and slides it to LEFT by the number of positions of the secret shift(here 3).
The plaintext letter is then encrypted to the ciphertext letter on the sliding ruler underneath. The result of this
process is depicted in the following illustration for an agreed shift of three positions.
Then the algorithm can be expressed as follows. For each plaintext letter p, substitute the ciphertext
letter C=E(3,p)=(p+3) mod 26
A shift may be of any amount, so that the general Caesar algorithm is
C = E(k, p) = (p + k) mod 26
where k takes on a value in the range 1 to 25. The decryption algorithm is simply
p = D(k, C) = (C - k) mod 26
Drawbacks of Caesar cipher
• If it is known that a given ciphertext is a Caesar cipher, then a brute-force cryptanalysis is
easily performed: simply try all the 25 possible keys. Figure shows the results of applying
this strategy to the example ciphertext. In this case, the plaintext leaps out as occupying the
third line.
• Three important characteristics of this problem enabled us to use a brute force cryptanalysis:
Encryption Decryption
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
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
75
o EXAMPLE
• Plaintext = apple
• Key = 5
• Ciphertext=?
• Ciphertext = FUUPJ
76
Ciphertext=PHHW PH is given and plaintext
needs to be found using the decryption algorithm
but no key is given.
• Key not given we have to calculate it & get the plaintext for which we need to check it with all 26 keys available set of
keys with us ( A= 0 to Z= 25) till a meaningful message is obtained.
• Decryption:
• With Key 0
• Plaintext = PHHW PH , which is not meaningful so take next key
• for Key 1, Plaintext= nffu nf , which is again not meaningful so take next key
• for Key 3,Plaintext = meet me , which makes some meaning
• So Plaintext = MEET ME with Key = 3
Example:
• To encrypt the message " NOTSECURE" with Key = 07
• So, Ciphertext is "UVAZLJBYL"
Multiplicative Cipher
Key
Key
Alice k Bob
K
Encryption Decryption
Plaintext
P T
C=(P*K1) mod P=(C+K2) mod
26 26
Ciphertext
Encryption C
Bob
Plaintext
P C=(P*K-1) mod P=(C-K2) mod
26 26
Decryption
Key Key
k1 K2 81
Example: Affine Cipher
o EXAMPLE
• plaintext = hello
• Key pair = (7,2)
• Ciphertext=?
82
Monoalphabetic Ciphers
Monoalphabetic cipher is a substitution cipher in which for a given key, the cipher alphabet
for each plain alphabet is fixed throughout the encryption process.
With only 25 possible keys, the Caesar cipher is far from secure. A dramatic increase in the
key space can be achieved by allowing an arbitrary substitution. Before proceeding, we
define the term permutation.
A permutation of a finite set of elements S is an ordered sequence of all the elements of S,
• As a first step, the relative frequency of the letters can be determined and compared to a
standard frequency distribution for English, such as is shown in Figure. If the message were
long enough, this technique alone might be sufficient, but because this is a relatively short
message, we cannot expect an exact match.
• A powerful tool is to look at the frequency of two-letter combinations, known as digrams
Monoalphabetic ciphers are easy to break because they reflect the
frequency data of the original alphabet.
Poly-alphabetic substitution cipher
• Each occurrence of a character may have different substitution
• The relationship between symbols in plain text to a symbols In
cipher text is always one to many
• AutoKey Cipher
• Playfair Cipher
• Vigenere Cipher
88
Autokey cipher
• In this cipher the key is a stream of subkeys,in which each sub key is use
to encrypt the corresponding character in the plaintext
• The first sub key is predetermined value secretly agreed upon by Alice
and Bob.
89
Autokey cipher Example
1. If the two letter in the pair are located in same row of the key, then The
corresponding encrypted character for each letter is the next letter to the
right in the same row, with the first element of the row
circularly following the last. For example, ba is
encrypted as AL.
92
playfair cipher
2.
If two letter in the pair are in the same column of the
key ,the corresponding encrypted character for each letter
is the letter beneath with the top element of the column
circularly following the last. For example, lz is encrypted as
3. If two letter in the pair are are not in the same row or
QL.
column of the key ,the corresponding encrypted character
for each letter is the letter that is in it’s own row but in the
same column as the other letter.
93
playfair cipher
o EXAMPLE
• plaintext = hello
• Cipher text=?
Plaintext : hello
L G D B A
Add bogus character
Q M H E C
• Key= U R I/J F helxlo
N
X V S O K he lx lo
Z Y W T P
he EC
lx QZ
lo BX
Ciphertext : ECQZBX 94
• Step 1: group letter in pair of two, he ll o, applying Basic Rules, we get pair as he lx lo
• Step 2: he in the same row of the secret key so by Rule 1 of encryption he becomes ec
• Step 3: lx in the same column so by Rule 2 of encryption, lx becomes qz
• Step 4: lo not in the same row and not in the same column of the secret key so by Rule 3 of
encryption lo becomes bx
• Plaintext = "hello"
• After making pairs: he ll o
• After applying basic rules: he lx lo
• After applying encryption rules: ec qz bx
• So Ciphertext = "ecqzbx"
Playfair Cipher
The best-known multiple-letter encryption cipher is the Playfair, which
treats digrams in the plaintext as single units and translates these units
into ciphertext digrams.
The Playfair algorithm is based on the use of a 5 * 5 matrix of letters
constructed using a keyword.
In this case, the keyword is monarchy.
In this case, the keyword is monarchy. 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
letters in alphabetic order. The letters I and J count as one letter. Plaintext is
encrypted two letters at a time, according to the following rules:
1. Repeating plaintext letters that are in the same pair are
separated with a filler letter, such as x, so that balloon would be treated
as ba lx lo on.
2. Two plaintext letters that fall in the same row of the matrix
are each replace by the letter to the right, with the first element of the
row circularly following the last. For example, ar is encrypted as RM.
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, mu is encrypted as CM.
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, hs becomes BP and ea becomes IM (or JM, as the encipherer
wishes).
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 digrams, so that
identification of individual digrams is more difficult.
Despite this level of confidence in its security, the Playfair cipher is relatively easy
to break, because it still leaves much of the structure of the plaintext language
intact. A few hundred letters of ciphertext are generally sufficient.
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.
The best known, and one of the simplest, such algorithm is referred to as
the Vigenère cipher. In this scheme, the set of related monoalphabetic
substitution rules consists of the 26 Caesar ciphers, with shifts of 0 through
25.
Table. The Modern Vigenère Tableau
Vigenere cipher
• The key stream is a repetition of an initial secret key stream of length
m,where we have 1<=m<=26.
• Initially the secret key should be agreed by Alice and Bob
• P=P1P2p3……. C=C1C2C3……..
• K=((K1,K2...,Km),(K1,K2,…,Km),….)
16.103
Example
key: deceptive
plaintext: wearediscoveredsaveyourself
ciphertext: ZICVTWQNGRZGVTWAVZHCQYGLMGJ
example, if the keyword is deceptive, the
message “we are discovered save yourself”
The periodic nature of the keyword can be eliminated by using a nonrepeating keyword that is as
long as the message itself. Vigenère proposed what is referred to as an autokey system, in which a
keyword is concatenated with the plaintext itself to provide a running key.
Hill Cipher
Another interesting multiletter cipher is the Hill cipher, developed by the
mathematician Lester Hill in 1929.
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 = 0, b= 1, c, z = 25). For m = 3, the
system can be described as
For example, consider the plaintext “paymoremoney” and use the encryption key
The first three letters of the plaintext are represented by the vector (15 0 24). Then (15 0 24)K =
(303 303 531) mod 26 = (17 17 11) = RRL
. Continuing in this fashion, the ciphertext for the entire plaintext is RRLMWBKASPDH.
Decryption requires using the inverse of the matrix K. We can compute det K = 23, and
therefore, (det K)-1 mod 26 = 17. We can then compute the inverse 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
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
The inverse of A is A-1 only when A ×
A-1 = A-1 × A = I.
Vernam Cipher
The ultimate defense against such a cryptanalysis is to choose a keyword that is as
long as the plaintext and has no statistical relationship to it. Such a system was
introduced by an AT&T engineer named Gilbert Vernam in 1918.
One-Time Pad
Joseph Mauborgne, proposed an improvement to the Vernam cipher that
yields the
ultimate in security.
Mauborgne suggested using a random key that is as long as the message,
so that the key need not be repeated.
In addition, the key is to be used to encrypt and decrypt a single message,
and then
is discarded.
Each new message requires a new key of the same length as the new
message. Such a scheme, known as a one-time pad, is unbreakable.
It produces random output that bears no statistical relationship to the
plaintext.
Because the ciphertext contains no information whatsoever about the
plaintext,
there is simply no way to break the code.
An example should illustrate our point. Suppose that we are using a Vigenère
scheme with 27 characters in which the twenty-seventh character is the space
character, but with a one-time key that is as long as the message. Consider the
ciphertext
ANKYODKYUREPFJBYOJDSPLREYIUNOFDOIUERFPLUYTS
We now show two different decryptions using two different keys:
Suppose that a cryptanalyst had managed to find these two keys. Two
plausible plaintexts are produced. How is the cryptanalyst to decide which is
the correct decryption (i.e., which is the correct key)? If the actual key were
produced in a truly random fashion, then the cryptanalyst cannot say that one
of these two keys is more likely than the other. Thus, there is no way to decide
which key is correct and therefore which plaintext is correct.
In fact, given any plaintext of equal length to the ciphertext, there is a key that
produces that plaintext. Therefore, if you did an exhaustive search of all
possible keys, you would end up with many legible plaintexts, with no way of
knowing which was the intended plaintext. Therefore, the code is
unbreakable.
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 keys. Any
heavily used system might require millions of random characters on a regular basis.
Supplying truly random characters in this volume is a significant task.
2.Even more daunting is the problem of key distribution and protection. For every
message to be sent, a key of equal length is needed by both sender and receiver. Thus, a
mammoth key distribution problem exists.
Because of these difficulties, the one-time pad is of limited utility
and is useful primarily for low-bandwidth channels requiring very
high security.
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.
Transposition Techniques
In the transposition technique the positions of letters/numbers/symbols in plain text
is changed with one another.
1 2 3 4 5 6 4 2 1 6 3 5
M E E T M E T E M E E M
A F T E R P E F A P T R
A R T Y Y R A T
Transposition cipher
• Keyless Transposition Cipher
• Combination of two
118
Keyless Transposition cipher techniques
2.Columnar Transposition
Simple Columnar Transposition
Double Columnar Transposition
Keyless Transposition Ciphers
Simple transposition ciphers, which were used in the past, are keyless.
• In this method plain text is written downwards on “rails of fence “ , starting a new column when bottom is reached.
• Algorithm:
1. First write down plain text message as a sequence of diagonals.
2. Read the plain text written in first step as a sequence of rows.
Example
A good example of a keyless cipher using the first method is the rail fence cipher. The
ciphertext is created reading the pattern row by row. For example, to send the
message “Meet me at the park” to Bob, Alice writes
16.121
Rail Fence Cipher
• Example:
• Plain text: come home tomorrow
123
ExampleExample
Alice needs to send the message “Enemy attacks tonight” to Bob..
The key used for encryption and decryption is a permutation key, which shows how
the character are permuted.
C O M E H O
M E T O M O
R R O w - -
1 2 3 4 5 6
Order 4,6,1,2,5,3
Eowoo-cmroerhm-mto
126
1. Simple Columnar Transposition
• In this method the message is written in rows of fixed length and then
read out column by column
• Column are selected in some scrambled order.
• The number of columns are defined by the length of key.
• Algorithm:
1. Write the plain text message row by row in a rectangle of predefined
size.(length of key)
2. Read the message column by column according to the selected order
thus obtained message is a cipher text.
1. Simple Columnar Transposition
• Key: ZEBRAS
• plain text: welcome home
• Order : 6 3 2 4 1 5
133
Continued
Keys
In previous Example, a single key was used in two directions for the column
exchange: downward for encryption, upward for decryption. It is customary to create
two keys.
134
Double Transposition Ciphers
135
Difference between Substitution and
Transposition Cipher
Substitution Cipher Transposition Cipher
A substitution technique is one in which the In the transposition technique the positions of
letters/number/symbols of plain text are replaced by other letters/numbers/symbols in plain text is changed with one
letters/numbers/symbols. another.
Methods: Methods:
1. Mono-Alphabetic SubstitutionCipher 1. Rail Fence Cipher
2. A Polyalphabetic Substitution Cipher 2. Columnar Transposition
3. One time Pad(Vernam Cipher) Simple Columnar Transposition
Double Columnar Transposition
STREAM AND BLOCK CIPHERS
The literature divides the symmetric ciphers into two broad categories: stream ciphers and
block ciphers. Although the definitions are normally applied to modern ciphers, this
categorization also applies to traditional ciphers.
1. Stream Ciphers
2. Block Ciphers
3. Combination
137
Stream Ciphers
Call the plaintext stream P, the ciphertext stream C, and the key stream K.
Stream cipher
138
Example of stream cipher
Additive ciphers can be categorized as stream ciphers in which the key
stream is the repeated value of the key. In other words, the key stream is
considered as a predetermined as a stream of keys K = (k, k, …, k).
139
Block Ciphers
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.
140