Unit 1 Intro at Classical Cipher
Unit 1 Intro at Classical Cipher
CSC-316
BSc CSIT 5th Semester
Unit-1
Prepared By: Laxman Bhandari Prepared By: Laxman Bhandari Prepared By: Laxman Bhandari
Unit-1 Introduction & Classical Cipher (7 Hrs. )
Contents:
1.1 Security:
1.1.1 Computer Security, Information Security, Network Security ,
1.1.2 CIA Traid ,
1.1.3 Cryptography , Cryptosystem , Cryptanalysis ,
1.1.4 Security Threats & Attacks ,
1.1.5 Security Services, Security Mechanisms
1. Substitution Techniques :
1.1. Ceasar , Monoalphabetic , Playfair, Hill, Polyalphabetic Cipher , One
–time pad
2. Transposition echniques :
2.1. Rail Fence Cipher
• The protection afforded to an automated information system in order to attain the applicable objectives of preserving the integrity, availability and confidentiality of information
system resources.
Computer security is a complex field that involves various methods and technologies to protect computer systems and data from potential threats. It focuses on ensuring the confidentiality,
integrity, and availability of information stored and processed within these systems.
Confidentiality ensures that only authorized individuals can access sensitive information, often achieved through encryption and access control measures.
Integrity involves maintaining data accuracy and reliability, often verified using techniques like hash functions and digital signatures.
Availability ensures that computer systems and resources remain accessible to authorized users, often through redundancy and disaster recovery planning.
Authentication verifies the identity of users or entities accessing a system, using methods such as passwords or biometrics.
Access control governs the permissions and privileges granted to users within a system, determining what actions they can perform and what resources they can access.
Intrusion detection and prevention systems monitor system activities to detect and respond to potential security breaches.
Security policies and procedures establish guidelines for maintaining system security, often enforced through regular audits.
Risk management identifies, assesses, and mitigates potential security risks, aiming to reduce them to an acceptable level.
Security awareness and training programs educate users about security risks and best practices.
Computer security requires a comprehensive approach involving technology, policies, risk management, and user education to protect against a range
• Information security means protecting information and information systems from unauthorized access, use, modification, or destruction.
• The terms information security, computer security and information assurance are frequently
used interchangeably.
• These fields are interrelated and share the common goals of protecting the confidentiality ,
• Thus, computer security is the generic name for the collection of tools designed to
• consists of the policies and practices adopted to prevent and monitor unauthorized access, misuse, modification, or denial of a computer
network and network-accessible resources.
• involves the authorization of access to data in a network, which is controlled by the network administrator.
• covers a variety of computer networks, both public and private, that are used in everyday jobs; conducting transactions and communications among businesses,
government agencies and individuals.
•Users choose or are assigned an ID and password or other authenticating information that
allows them access to information and programs within their authority.
• Network security is involved in organizations, enterprises, and other types of institutions, it secures the network, as well as protecting and overseeing operations being
done.
• Network security starts with authentication, commonly with a username and a password. Since this requires just one detail authenticating the user name—i.e., the
password—this is sometimes termed one-factor authentication.
• With two-factor authentication, something the user 'has' is also used (e.g., a security
• With three-factor authentication, something the user 'is' is also used (e.g., a fingerprint or retinal scan).
• component may fail to check potentially harmful content such as computer worms
or Trojans being transmitted over the network.
• Anti-virus software or an intrusion prevention system (IPS) help detect and inhibit the action of
such malware.
An anomaly-based intrusion detection system may also monitor the network like wires hark(packet analyzer) traffic and may be logged for audit purposes and for
later high-level analysis.
• Newer systems combining unsupervised machine learning with full network traffic analysis can detect active network attackers from malicious insiders or targeted external
attackers that have compromised a user machine or account.
4. specify a protocol enabling the principals to use the transformation and secret information for a security service
Model for Network Security:
2. implement security controls to ensure only authorised users access designated information or resources
• These three concepts(Confidentiality , Integrity, &Availability ) form what is often referred to as the CIA triad.
• The three concepts embody the fundamental security objectives for both data and for information and computing services.
• FIPS PUB 199(Fedral Information Processing Standard) provides a useful characterization of these three objectives in terms of requirements and the definition of a loss of
security in each category:
• Preserving authorized restrictions on information access and disclosure, including means for protecting personal privacy and proprietary information.
• A loss of confidentiality is the unauthorized disclosure of information.
• Cryptography can be the better choice for maintaining the privacy of information, which
• Similarly, privacy of resources, i.e. resource hiding can be maintained by using proper firewalls.
Phishing scam
GnuPG
Malware attack
xCRYPT
Insider threat
BitLocker
• And also provides assurance to the sender that its message was delivered, as well as proof of the sender's identity to the recipient.
• This way, neither party can deny that a message was sent, received and processed)
• and authenticity.
• For example, if we say that we have preserved the integrity of an item, we may mean that the item is:
• precise, accurate, unmodified, modified only in acceptable ways, modified only by authorized people, modified only by authorized processes, consistent,
meaningful and usable.
• Prevention mechanisms are responsible to maintain the integrity of data by blocking any unauthorized attempts to change the data or any attempts to change data in unauthorized ways.
• While detection mechanisms; rather than preventing the violations of integrity; they simply analyze the data’s integrity is no longer trustworthy.
• Such mechanisms may analyze the system events or the data itself to see if required constraints still hold.
SQL injection
Malware attacks
HashCheck
astSum
Md5sum
Sha1sum
SFVChecker
QuickSFV
It is making clear progress, and, if in wait mode, it has a bounded waiting time.
The service is completed in an acceptable period of time.
Availability is defined in terms of “quality of service,” in which authorized users are expected to receive a specific level of service.
• The aspect of availability that is relevant to security is that someone may intentionally arrange to deny access to data or to service by making it unavailable .
o Although the use of the CIA triad to define security objectives is well established, some in the security field feel that additional concepts are needed to present a complete picture.
1. Firewalls
2. Malware attacks
Authenticity:
Fig : Relationship between Confidentiality, Integrity and Availability
• The property of being genuine and being able to be verified and
trusted; confidence in
Accountability:
• Cryptography is the art & science of making cryptosystem that is capable of providing information security.
text.
• Only those who possess a secret key can decipher (or decrypt) the message into plaintext.
• Encrypted messages can sometimes be broken by cryptanalysis, also called code breaking,
• Cryptography is the science of securing digital data, Cryptanalysis is the science of analyzing and breaking cipher text.
• Cryptanalysis involves the study of cryptographic techniques to test their security strengths.
• Until 1970’s cryptography was considered the domain of military & government only .
• However the worldwide use of computers & the rise of internet have made it an integral part of our daily lives .
• Today cryptography is at the heart of many secure applications such as online banking, online shopping, online government services such as filling personal income taxes, cellular
phones, & wireless LANs etc.
• A cryptosystem is an implementation of cryptographic techniques & their accompanying infrastructure to provide information security services.
• The given figure is simple model of cryptosystem that provides the confidentiality to the information being transmitted.
• The above figure shows a sender (Bob) who wants to transfer some sensitive data to receive (Alice) in such a way that any party intercepting or eves dropping on the
communication channel cannot extract the data.
• An interceptor (or attacker) is an unauthorized entity who attempts to determine the plaintext.
• The objective of this simple cryptosystem is that at the end of the process, only the sender & receiver will know the plaintext.
Encryption Algorithm: It is cryptographic algorithm that takes plain text & encryption key as input and produces cipher text.
Cipher text: It is the scrambled version of the plaintext produced by encryption algorithm using a specific the encryption key.
• It flows in public channel, which is not guarded.it can be intercepted compromised by anyone who has access to the communication channel.
• Decryption Algorithm:
• It is a cryptographic algorithm that takes cipher text & a decryption key as input & output a plaintext.
• The decryption algorithm essentially reverses of the encryption algorithm.
• Encryption Key:
• The sender inputs encryption key into the encryption algorithm along with the plaintext in order to compute the cipher text.
• Decryption Key:
• The decryption key is related to the encryption key, but is not always identical to it.
• For Example
M = {sequences of letters}
• Cryptanalysis is the study of methods for obtaining the meaning ofencrypted information,
• Cryptanalysis can be performed under a number of assumptions about how much can be observed or found out about the system under attack.
• It is normally assumed that the general algorithm is known; this is Kerckhoffs' principle of "the enemy knows the system".
• There can be many types of attacks and broadly we categorize them as attack models:
Cryptanalysis:
objective is to recover the key in use rather then simply to recover the plaintext of a single ciphertext.
There are two general approaches:
• Cryptanalytic attack:
• relies 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.
• try every possible key on a piece of ciphertext until an intelligible translation into plaintext is obtained.
If either type of attack succeeds in deducing the key, the effect is catastrophic: All future and past messages encrypted with that key are compromised.
Cryptanalysis:
• Depends on the nature of encryption scheme and the information available to Cryptanalyst.
Alan Mathison Turing was a English Mathematician, logician, cryptanalyst, and computer scientist.
During the Second World War, Turing worked for the Government Code and Cypher School at Bletchley Park, Britain's Codebreaking centre.
Types of cryptanalytic attacks, based on the amount of information known to the cryptanalyst
ciphertext only
only know algorithm & ciphertext, is statistical, know or can identify plaintext.
known plaintext
know/suspect plaintext & ciphertext
chosen plaintext
select plaintext and obtain ciphertext
chosen ciphertext
select ciphertext and obtain plaintext
chosen text
select plaintext or ciphertext to encrypt/decrypt
• The Stallings Table2.2 (next slide) shows how much time is required to conduct a brute- force attack, for various common key sizes (DES is 56, AES is 128, Triple-DES is 168, plus
general mono-alphabetic cipher), where either a single system or a million parallel systems, are used.
Aspect of Security:
Security service
• Security attack: Any action that compromises the security of information owned by an organization.
• Security mechanism: A process (or a device incorporating such a process) that is designed to detect, prevent, or recover from a security attack.
• Security service: 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.
In the literature, the terms threat and attack are commonly used to mean more or less the
same thing. Given definitions taken from RFC 2828, Internet Security Glossary.
Threat - A potential for violation of security, which exists when there is a circumstance, capability, action, or event that could breach security and cause harm. That is, a threat is a
possible danger that might exploit a vulnerability.
Attack - An assault(physical harm) on system security that derives from an intelligent threat; that is, an intelligent act that is a deliberate attempt (especially in the sense of a method or
technique) to evade security services and violate the security policy of a system.
• Two types of passive attacks are release of message contents and traffic analysis.
• A telephone conversation, an electronic mail message, and a transferred file may contain sensitive or confidential information.
• We would like to prevent an opponent from learning the contents of these transmissions.
• Suppose that we had a way of masking the contents of messages or other information traffic so that opponents, even if they captured the message, could not
extract the
information from the message.
• If we had encryption protection in place, an opponent might pattern of these messages. still be able to observe the
• The opponent could determine the location and identity of communicating hosts and could observe the frequency and length of messages being exchanged.
• This information might be useful in guessing the nature of the communication that was taking place.
• very difficult to detect because they do not involve any alteration of the data.
• Typically, the messages are sent and received in seemingly normal fashion.
• Neither the sender nor receiver is aware that a third party has read the messages or observed the traffic pattern.
• However, it is feasible to prevent the success of these attacks.
• Thus, the emphasis in dealing with passive attacks is on prevention rather than detection.
Active Attacks:
• Active attacks involve some modification of the data stream or the creation of a false stream and can be subdivided into four categories:
• Replay
• Masquerade
• Denial of service.
• involves the passive capture of a data unit and its subsequent retransmission to produce
• A masquerade
• takes place when one entity pretends to be a different entity (Figure 1.4 b).
• A masquerade attack usually includes one of the other forms of active attack.
• For example, authentication sequences can be captured and replayed after a valid authentication sequence has taken place, thus enabling an authorized entity with few
privileges to obtain extra privileges by impersonating an entity that has those privileges.
• that some portion of a legitimate message is altered, or that messages are delayed or reordered, to produce an unauthorized effect (Figure 1.4 c).
• For example, a message meaning "Allow John Smith to read confidential file accounts" is modified to mean "Allow Fred Brown to read confidential file accounts."
• prevents or inhibits the normal use or management of communications facilities (Figure 1.4 d).
• This attack may have a specific target; for example, an entity may suppress all messages directed to a particular destination (e.g., the security audit service).
• Another form of service denial is the disruption of an entire network, either by disabling the network or by overloading it with messages so as to degrade performance.
• Whereas passive attacks are difficult to detect, measures are available to prevent their success.
• On the other hand , it is quite difficult to prevent active attacks absolutely, because of the wide variety of potential physical, software, and network vulnerabilities.
• Instead, the goal is to detect active attacks and to recover from any disruption or delays caused by them.
Security service:
• For example, have signatures, dates; need protection from disclosure, tampering, or destruction; be notarized or witnessed; be recorded or licensed
X.800:
“a service provided by a protocol layer of communicating open systems, which ensures adequate security of the systems or of data transfers”
RFC 2828:
“a processing or communication service provided by a system to give a specific kind of protection to system resources”
• X.800 divides these services into five categories and fourteen specific services (Table 2.1).
• Figure here shows all specific services and the category they belong to.
• The mechanisms are divided into those that are implemented in a specific protocol layer, such as TCP or an application-layer protocol, and those that are not specific to any particular
protocol layer or security service.
• These mechanisms are called “specific security mechanisms‟ and “pervasive security
mechanism‟.
• These may be incorporated into the appropriate protocol layer in order to provide some of the
• OSI security services. Some techniques for realizing security are listed here.
1. Encipherment
• This is the process of using mathematical algorithms to transform data into a form that is not readily intelligible.
• The transformation and subsequent recovery of the data depend on an algorithm and zero or more encryption keys.
2. Digital Signature
• Data or cryptographic transformation of a data unit is appended to the data, so that the recipient of the data unit is convinced of the source and integrity of the data unit and this
can also serve to protect the data against forgery (e.g., by the recipient).
3. Access Control
4. Data Integrity:
•This is a mechanism intended to ensure the identity of an entity by means of information exchange.
6. Traffic Padding:
• The insertion of bits into gaps in a data stream is called traffic padding. This helps to thwart traffic analysis attempts.
7. Routing Control:
•Routing control enables selection of particular physically secure routes for certain data transmission and allows routing changes, especially when a breach of security is
suspected.
8. Notarization:
Pervasive Security Mechanisms:
• These are the mechanisms that are not specific to any particular OSI security service or protocol layer.
2. Security Label
• This is the technique of marking of a bound to a resource (which may be a data unit) that names or designates the security attributes of that resource.
3. Event Detection
• Detection of security-relevant events such as forgery, denial of sending or receiving of data, alteration of data etc. is another important essential mechanism.
5. Security Recovery
• This deals with requests from mechanisms, such as event handling and management
• Mechanisms discussed in the previous section are only theoretical recipes to implement security.
• The actual implementation of security goals needs some techniques.
A. Cryptography:
• Some security mechanisms listed in the previous section can be implemented using cryptography.
• However, we use the term to refer to the science and art of transforming messages to make them secure and immune to attacks.
• Although in the past cryptography reffered only to the encrytion and decryption of messages using secert keys, today it is defined as involving three distinct mechanisms:
symmetric-key encripherment, asymmetric-key encipherment, and hashing.
• In symmetric encipherment, an entity, say Alice, can send a message to other entity, say Bob,over an insecure channel with the assumption that an adversary, say Eve, cannot
understand the contents of the message by simply eavesdropping over the channel.
• Symmetric-key encipherment uses a single secret key for both encryption and
decryption. Encryption/decryption can be thought of as electronic locking system.
• In symmetric-key enciphering, Alice puts the message in a box and locks the box using
the shared secret key; Bob unlocks the box with the same key and takes out the messages.
2. Asymmetric Encipherment
• In asymmetric encipherment, we have the same situation as the symmetric-key encipherment, with a few exceptions.
• First, there are two keys instead of one; one public key and one private key.
• To send a secure message to Bob, Alice firsts encrypts the message using Bob‟s public key.
• The digest is normally much smaller than the message. To be useful, both the message and the digest must be sent to Bob.
• Hashing is used to provide checkvalues, which were discussed earlier in relation to providing data integrity.
B. Steganography
• This is the art of hiding messages in another form. Message is not altered as in encryption.
• A text can hide a message. For exmple “red umbrella needed” may mean the message “run”.
• The first letter of each word in the text becomes the message.
Ciphers c.
e.g.
AES Block
c (Public
Key)
e.g.
FISH Stream
e.g. RSA, DSA,
Diffie-
H
e
l
l
m
a
n
e
t
Hill ciphers,
Polyalphabetic ciphers,
Transposition Techniques:
It used processes like substitution and transposition or combination of both called product ciphers.
These historic ciphers use the single key for both encryption and decryption (symmetric cipher).
To reduce the cipher attacks, in substitution instead of monoalphabetic (a letter for letter), polyalphabetic (one or more letters for single letter) substitution can be used.
Substitution Technique: where letters of plaintext are replaced by other letters or by
numbers or symbols
1. Caesar Cipher
• The Caesar cipher involves replacing each letter of the alphabet with the letter standing three(3) places further down the alphabet.
• The first attested use in military affairs of one was by Julius Caesar For eg: With a left shift of 3, D would be replaced by A.
abcdefghij 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
2 E (m) =(3 0 19 6)
k
3 D (c) = (C+26-k) mod 26 = (C+26-k) mod 26 //similar
k
key(k)=19
4 D (c) = (C+26-k) mod 26 =(3+26-19 0+26-19 19+26-19 6+26-
k
19)
mod 26
5 D (c) = =(10 7 0 13)
k
6 Plain text(M) “K H A N”
6
Prepared By: Laxman Bhandari
Substitution/Shift Cipher:
• The Caesar cipher is a specific type of substitution cipher, but not all substitution ciphers are Caesar ciphers.
• A substitution cipher is a method of encrypting by which units of plaintext are replaced other letters or by numbers or symbols.
• or if plaintext is viewed as a sequence of bits, then substitution involves replacing plaintext bit patterns with ciphertext bit patterns
• A monoalphabetic cipher uses fixed substitution over the entire message, whereas a
polyalphabetic cipher uses a number of substitutions at different positions in the message.
Monoalphabetic Cipher:
2) Playfair Cipher:
The scheme was invented in 1854 by Charles Wheatstone but was named after Lord Playfair who promoted the use of the cipher.
The Playfair cipher was the first practical digraph substitution cipher.
In playfair cipher, we encrypt a pair of alphabets(digraphs) instead of a single alphabet.
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 key square is a 5×5 grid of alphabets that acts as the key for encrypting the plaintext. Each of the 25 alphabets must be unique and one letter of the alphabet (usually J) is omitted
from the table (as the table can hold only 25 alphabets).
The plaintext is split into pairs of two letters (digraphs For example: PlainText: "instrument"
1) If a pair is a repeated letter, insert a filler like 'X', Eg: "balloon" encrypts as "ba lx loon"
2) If both the letters are in the same column: Take the letter below each one
3) If both the letters are in the same row: Take the letter to the right of each one
(going back to the leftmost if at the rightmost position).
For example:
• Works on multiple letters at same time, and is first polygraphic substitution cipher.
• The encryption algorithm takes m successive plaintext letters and substitutes for them m ciphertext letters.
𝑘1 𝑘1 𝑘1
numerical value (a = 0, b = 1 ... z = 25).
1 2 3
•
𝑘2 𝑘2 𝑘2
The concept of inverse matrix is used.
1 2 3
• Let m=3 and Plain text (m)= (x1 , x2, x3) then
6 2 1
Step 1: Let Plain Text (m)= DOG, i.e (M)= (3 14 6)
1 4 1
Choose any random key(3X3) = (While choosing random key the Determinant of key should not be 0.)
3 1 0
Step 2: Calculate C= E(K, P) = KP mod 26
21 6 1 6∗3 24 ∗ 14 1∗6
13 ∗ 3 16 ∗ 14 10 ∗ 6
6 24 3
or, KP mod 26 = 13 16 10 14 or, KP mod 26 =
20 17 15 6 20 ∗ 3 17 ∗ 14 15 ∗ 6
360
323
388
or, KP mod 26 =
mod 26
22
11
or, KP mod 26 =
24
𝑊
i.e.Ciphertext(E =
13 16 10
820517 10
15
is
22 21 8 21
=
11
�
21 12 8
𝐿 24
and Cipher text(C) = �
8 5 10 22
21 8 21
Step 2: Now K-1 C mod 26 = 11 mod 26
21 12 8 24
471
1054
-1
or, Now K C mod 26 = mod 26
3 786
14
-1
Or, K C mod 26 = Thus is Plain text= “DOG”
1. Not all matrices have an inverse (see invertible matrix). The matrix will have an inverse if and only if its determinant is not zero.
2. The determinant of the encrypting matrix must not have any common factors with the modular base
• It uses simple form of polyalphabetic substitution and encryption is done using vigenere table.
Keys(
rows)
Key Value 15 0 18 2 0
here Key length= 6, So we have to make 6 length table
11
Step-2:
C=(P+K)mod 26 7 7 22 10 18
22
Cipher Text H H W K SW
Cipher Text H H W K S W X S L G N T C G
Cipher Value 7 7 22 10 18 22 23 18 11 6 13 19 2 6
Key Value 15 0 18 2 0 11 15 0 18 2 0 11 15 0
P=(C-K)mod 26 -8 7 4 8 18 11 8 18 -7 4 13 8 -13 6
P mod 26 18 7 4 8 18 11 8 18 19 4 13 8 13 6
Plain Text S H E I S L I S T E N I N G
The One-Time Pad is an evolution of the Vernham cipher, which was invented by Gilbert Vernham in 1918, and used a long tape of random letters to encrypt the message.
An Army Signal Corp officer, Joseph Mauborgne, proposed an improvement using a random key that was truly as long as the message, with no repetitions, which thus totally
obscures the original message.
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, since any plaintext can be mapped to any ciphertext given some key.
The one-time pad offers complete security but, in practice, has two fundamental difficulties:
2. And the problem of key distribution and protection, where for every message to be sent,
a key of equal length is needed by both sender and receiver.
•Because of these difficulties, the one-time pad is of limited utility, and is useful primarily for low-bandwidth channels requiring very high security.
•problems in generation & safe distribution of key
Transposition Ciphers
• Now consider classical transposition or permutation ciphers these hide the message by rearranging the letter order without altering the actual letters used
• Can recognise these since have the same frequency distribution as the original text.
• 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, and form the second basic building block of ciphers.
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.
The example message is: "meet me after the toga party" with a rail fence of depth 2.
Eg. write message out as: m e m a t r h t g p r y
4.1.1. e t e f e t e o a a t
• PT=HELLO WORLD
• For Encrypt:
H O L
E L W R D
L O
st nd rd
• CT= HOLELWRDLO(sequentially from 1 2 & 3 rows)
H O L
- - - - -
- -
H O L
• PT=HELLOWORLD E L W R D
6/10/2024 37
L O
A more complex transposition cipher is to write the message in a rectangle, row by row, and read the message off shuffling the order of the columns in
each row.
A pure transposition cipher is easily recognized because it has the same letter frequencies as the original plaintext.
For the type of columnar transposition just shown, cryptanalysis is fairly straightforward and involves laying out the ciphertext in a matrix and playing around with column
positions.
Encryption
1) The message is written out in rows of a fixed length, and then read out again column by column, and the columns are chosen in some scrambled order.
2) Width of the rows and the permutation of the columns are usually defined by a
keyword.
4) The spare spaces are filled with nulls or left blank or placed by a character (Example: _ or X, Y etc.
5) Finally, the message is read off in columns, in the order specified by the keyword.
Plaintext: a t t a c k p o s t p o n e d u n t i l t w o a m
4 3 1 2 5 6 7
A T T A C K P
O S T P O N E
D U N T I L T
W O A M X Y Z
Ciphertext: TTNAAPTMTSUOAODWCOIXKNLYPETZ
Decryption
1) To decipher it, the recipient has to work out the column lengths by dividing the message length by the key length.
2) Then, write the message out in columns again, then re-order the columns by reforming the key word
• Eg: classical stream cipher are: autokeyed vigenere cipher and vernam cipher
• 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.
• Here the plaintext is converted into ciphertext block by block.So it encrypts of data of fixed size.
better analyzed
If the sender and receiver use different keys, the system is referred to as asymmetric, two-key, or public-key encryption.
These techniques use two keys, namely private and public keys. One key is used for
1. Plaintext: This is the original intelligible message or data that is fed into the algorithm as input.
2. Encryption algorithm: The encryption algorithm performs various substitutions and transformations on the plaintext.
3. 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.
• 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 ciphertexts.
5. Decryption algorithm:
• This is essentially the encryption algorithm run in reverse. It takes the ciphertext and the secret key and produces the original plaintext.
Asymmetric ciphers: