SlideShare une entreprise Scribd logo
1  sur  56
Cryptography Introduction
Shimul Shakhawat
Computer Science & Engineering Dept.
University of Rajshahi
2
History
• 50 B.C. Julius Caesar uses cryptographic
technique
• 400 A.D. Kama Sutra in India mentions
cryptographic techniques
• 1250 British monk Roger Bacon
describes simple ciphers
• 1466 Leon Alberti develops a cipher
disk
• 1861 Union forces use a cipher during
Civil
War
3
History
• 1914 World War I – British, French, and
German forces use encryption
technology
• 1917 William Friedman, Father of U.S.
encryption efforts starts a school
for teaching cryptanalysis in
Illinois
• 1917 AT&T employee Gilbert Vernam
invents polyalphabetic cipher
• 1919 Germans develop the Engima machine
for encryption
4
History
• 1937 Japanese design the Purple
machine for encryption
• 1942 Navajo windtalkers help with secure
communication during World War II
• 1948 Claude Shannon develops statistical
methods for encryption/decryption
• 1976 IBM develops DES
• 1976 Diffie – Hellman develop public key /
private key cryptography
• 1977 Rivest – Shamir – Adleman develop the
RSA algorithm for public key / private key
Plaintext
• Plaintext is a text , in natural readable form.
• It is the message or data before it gets
encrypted.
• It is sometimes called cleartext
• Plaintext is denoted by M (message) or P
(plaintext).
• It can be a stream of bits , a text file , a bitmap,
a stream of digitized voice etc.
• It is simply binary data
Ciphertext
• An encrypted message is ciphertext
• It is denoted by C (ciphertext)
• It is also binary data
• Sometime it has the same size as M, sometimes
larger
• It is the results from plaintext by applying the
encryption key
• Message altered to be unreadable by anyone
except the intended recipients
Encryption
• The process of disguising a message in such a way to
hide its substance is called encryption.
• scrambling a message using a specialized
cryptographic algorithm to make it unreadable by
anyone except the intended recipients.
• The encryption function E, operates on M to produce
C. In mathematical notation
E(M)=C
Encryption Decryption
Plaintext
Ciphertext
Plaintext
Decryption
• The process of converting ciphertext back to the original
plaintext.
• In the reverse process, the decryption function D
operates on C to produce M:
D(C) = M
• Since the whole point of encrypting and then decrypting
a message is to recover the original plaintext, the
following identity must hold true:
D(E(M)) = M
Encryption Decryption
Plaintext
Ciphertext
Plaintext
Cryptography
• The word cryptography comes from the two Greek
words: Krypto (secret) and graphein (write). So
cryptography means secret writing .
• The art and science of keeping messages secure is
called cryptography and it is practiced by
cryptographers
• The art of devising ciphers is called cryptography
• Cryptography deals with creating documents that can
be shared secretly over public communication channels
• Cryptographic documents are decrypted with the key
associated with encryption, with the knowledge of the
encryption
Cryptanalysis
• The art and science of breaking ciphertext is called
cryptanalysis.
• That is seeing through the disguise and it is
practiced by cryptanalysts.
• Cryptanalysis deals with finding the encryption key
for breaking cryptographic algorithms without the
knowledge of the encryption
• The art of breaking ciphers is called cryptanalysis
• Cryptanalyst: a person who breaks cryptographic
codes . Also referred to as “the attacker”.
Cryptology
• Cryptography and cryptanalysis is collectively
known as Cryptology.
• The branch of mathematics encompasses both
cryptography and cryptanalysis is called cryptology
and its practitioners are called cryptologists.
• Modern cryptologists are generally trained in
theoretical mathematics—they have to be.
Confidentiality
Three confidentiality or characteristics of cryptography
• Authentication: It should be possible for the
receiver of a message to ascertain its origin. An
intruder should not be able to masquerade as
someone else.
• Integrity: It should be possible for the receiver of a
message to verify that it has not been modified in
transit. An intruder should not be able to substitute
a false message for a legitimate one.
• Nonrepudiation: A sender should not be able to
falsely deny later that he sent a message.
Authentication
• Authentication is of ensuring that whoever
supplies or accesses the message is an
authorized party.
• Two solutions are:
– Passwords
– Digital signatures
Integrity
• This involves ensuring that when a message is
sent over a network, the data that arrives is the
same as the data that was originally sent. It is
important that the data has not been modified or
replaced .
• Technical solutions include:
– Encryption
– Hashing algorithms
Nonrepudiation
• Ensuring that the intended recipient actually
got the message.
• Ensuring that the alleged sender actually
sent the message.
Cryptographic Algorithm(Cipher)
• A cryptographic algorithm, also called a cipher, is
the mathematical function used for encryption and
decryption.
• Generally, there are two related functions: one for
encryption and the other for decryption.
• If the security of an algorithm is based on keeping
the way that algorithm works a secret, it is a
restricted algorithm.
• Restricted algorithms have historical interest, but
are woefully inadequate by today’s standards.
Restricted algorithm
• Drawbacks of restricted algorithm:
1. A large or changing group of users cannot use them,
because every time a user leaves the group everyone
else must switch to a different algorithm.
2. If someone accidentally reveals the secret,
everyone must change their algorithm.
3.Restricted algorithms allow no quality control or
standardization.
4. Every group of users must have their own unique
algorithm. Such a group can’t use off-the-shelf
hardware or software products; an eavesdropper
can buy the same product and learn the algorithm.
5. They have to write their own algorithms and
implementations. If no one in the group is a good
cryptographer, then they won’t know if they have
a secure algorithm.
Key and Key Space
• Key: Sequence that controls the operation and
behavior of the cryptographic algorithm
• rules used in algorithms to convert a document into a
secret document
• Keyspace : The range of possible values of the key is
called the keyspace.
• Now Ek(M)=C , Dk(C)=M then Dk (Ek(M))=M
Encryption Decryption
Plaintext
Ciphertext
Plaintext
Key Key
20
• Keys are of two types:
– Symmetric
– Asymmetric
• A key is symmetric if the same key is used both for
encryption and decryption
• A key is asymmetric if different keys are used for encryption
and decryption
• Symmetric key methods
• DES 56-bit
• Triple DES 128-bit
• AES 128-bit and higher
• Blowfish 128-bit and higher
• Asymmetric key methods
• RSA (Rivest-Shamir-Adleman of MIT)
• PGP (Phil Zimmerman of MIT)
21
Cryptosystem
• Cryptosystem – The combination of algorithm,
plaintext, ciphertext, key, and key management
functions used to perform cryptographic operations
is called cryptosystem
• A cryptosystem is a 5-tuple (E,D,M,K,C), where
E: M x K  C —the set of encryption functions;
D: C x K  M —the set of decryption functions;
M —a set of plaintexts (some use P as symbol);
K —the set of keys;
C —the set of ciphertexts;
Cryptosystem Services
1. Authenticity
2. Integrity
3. Confidentiality
4. Nonrepudiation
5. Access Control
22
Symmetric Algorithms
• There are two general types of key-based algorithms:
symmetric and public-key.
• Symmetric algorithms , sometimes called conventional
algorithms, are algorithms where the same key is used
for both encryption and decryption.
• These algorithms, also called secret-key algorithms,
single key algorithms, or one-key algorithms
• It requires that the sender and receiver agree on a key
before they can communicate securely.
• This single key shared by two communicating parties.
• The shared key must remain secret to ensure the
confidentiality of the encrypted data
• The security of a symmetric algorithm rests in the
key; divulging the key means that anyone could
encrypt and decrypt messages. As long as the
communication needs to remain secret, the key
must remain secret.
• The shared key problem is the main technological
challenge for this kind of encryption.
• One method of distributing the key is using the sneaker-
net.
• Encryption and decryption with a symmetric algorithm
are denoted by: Ek(M)=C , Dk(C)=M
Types of Symmetric Algorithm
• Symmetric algorithms can be divided into two
categories:
1. Block ciphers
2. Stream ciphers
• Some operate on the plaintext a single bit(or
sometimes byte) at a time, these are called stream
algorithms or stream ciphers .
• Others operate on the plaintext in groups of bits.
The groups of bits are called blocks , and the
algorithms are called block algorithms or block
ciphers
Block Ciphers
• Most well-known and well-studied symmetric
algorithms use block ciphers.
• Block ciphers break up the message into constant-
size blocks and encrypt the code block by block.
• Typical block sizes are 64 bits or 128 bits.
• Messages are padded (with extra bits) to fit the
block size.
• The simplest type of block ciphers work in ECB
(Electronic Code Book) mode. In this mode, each
block is encrypted separately, independent of the
other blocks
Block Ciphers
• Two factors influence the security of a
symmetric block cipher:
– The quality of the algorithm (e.g., ECB mode
ciphers are less secure).
– The length of the key (e.g., 64 bit blocks are
questionable, but 128 bit blocks are considered
more than adequate).
• There is a classic trade-off between
efficiency and security.
Public-key algorithms
• Public-key algorithms (also called asymmetric algorithms)
are designed so that the key used for encryption is
different from the key used for decryption.
• Furthermore, the decryption key cannot (at least in any
reasonable amount of time) be calculated from the
encryption key. The algorithms are called "public-key"
because the encryption key can be made public.
• A complete stranger can use the encryption key to
encrypt a message, but only a specific person with the
corresponding decryption key can decrypt the message.
• In these systems, the encryption key is often called the
public key, and the decryption key is often called the
private key.
• The private key is sometimes also called the secret key,
but to avoid confusion with symmetric algorithms, that
tag won’t be used here.
• Encryption using public key K is denoted by:
Ek(M)=C
• Even though the public key and private key are different,
decryption with the corresponding private key is denoted
by:
Dk(C)=M
• Sometimes, messages will be encrypted with the private
key and decrypted with the public key; this is used in
digital signatures
Attack.
• An attempted cryptanalysis is called an attack.
• There are four general types of cryptanalytic attacks. Of
course, each of them assumes that the cryptanalyst has
complete knowledge of the encryption algorithm used:
1. Ciphertext-only attack
2. Known-plaintext attack
3. Chosen-plaintext attack
4. Adaptive-chosen-plaintext attack
Ciphertext-only attack
• Ciphertext-only attack : The cryptanalyst has the
ciphertext of several messages, all of which have been
encrypted using the same encryption algorithm.
• The cryptanalyst’s job is to recover the plaintext of as
many messages as possible, or better yet to deduce the
key (or keys) used to encrypt the messages, in order to
decrypt other messages encrypted with the same keys.
Known-plaintext attack
• Known-plaintext attack. The cryptanalyst has access not
only to the ciphertext of several messages, but also to
the plaintext of those messages.
• His job is to deduce the key (or keys) used to encrypt the
messages or an algorithm to decrypt any new messages
encrypted with the same key (or keys).
Chosen-plaintext attack
• Chosen-plaintext attack: The cryptanalyst not only has
access to the ciphertext and associated plaintext for
several messages, but he also chooses the plaintext that
gets encrypted.
• This is more powerful than a known-plaintext attack,
because the cryptanalyst can choose specific plaintext
blocks to encrypt, ones that might yield more information
about the key.
• His job is to deduce the key (or keys) used to encrypt the
messages or an algorithm to decrypt any new messages
encrypted with the same key (or keys).
Adaptive-chosen-plaintext attack
• Adaptive-chosen-plaintext attack : This is a special case of
a chosen-plaintext attack. The cryptanalyst not only can
choose the plaintext that is encrypted, but he can also
modify his choice based on the results of previous
encryption.
• In a chosen-plaintext attack, a cryptanalyst might just be
able to choose one large block of plaintext to be
encrypted.
• In an adaptive chosen-plaintext attack he can choose a
smaller block of plaintext and then choose another based
on the results of the first, and so forth.
Chosen-ciphertext attack
• There are at least three other types of cryptanalytic attack.
5 . Chosen-ciphertext attack: . The cryptanalyst can choose
different ciphertexts to be decrypted and has access to the
decrypted plaintext. For example, the cryptanalyst has
access to a tamperproof box that does automatic
decryption. His job is to deduce the key.
• This attack is primarily applicable to public-key algorithms .
A chosen-ciphertext attack is sometimes effective against a
symmetric algorithm as well.
• Sometimes a chosen-plaintext attack and a chosen-
ciphertext attack are together known as a chosen-text
attack .
6. Chosen-key attack : This attack doesn’t mean that the
cryptanalyst can choose the key. It means that he has
some knowledge about the relationship between
different keys . It’s strange and obscure, not very
practical
7. Rubber-hose cryptanalysis : The cryptanalyst threatens,
blackmails, or tortures someone until they give him the
key. Bribery is sometimes referred to as a purchase-key
attack
Security of Algorithms
• An algorithm is considered computationally secure
sometimes called strong if it cannot be broken with
available resources, either current or future.
• Different algorithms offer different degrees of
security . It depends on how hard they are to break.
1.If the cost required to break an algorithm is greater
than the value of the encrypted data, then it is
probably safe.
2. If the time required to break an algorithm is longer
than the time the encrypted data must remain secret,
then it is probably safe.
3. If the amount of data encrypted with a single key
is less than the amount of data necessary to break
the algorithm, then it is probably safe.
• Here the term "probably" is used because there is
always a chance of new breakthroughs in
cryptanalysis.
• On the other hand, the value of most data
decreases over time. It is important that the value
of the data always remain less than the cost to
break the security protecting it.
Categories of breaking an
algorithm
• Lars Knudsen classified different categories of breaking
an algorithm. In decreasing order of severity :
1. Total break : A cryptanalyst finds the key, K,
such that Dk(C)=M
2. Global deduction : A cryptanalyst finds an alternate
algorithm, A, equivalent to Dk(C)=M without knowing K.
3. Instance or local deduction : A cryptanalyst finds the
plaintext of an intercepted ciphertext.
4. Information deduction : A cryptanalyst gains some
information about the key or plaintext. This information
could be a few bits of the key, some information about the
form of the plaintext, and so forth.
Brute-force attack
• An algorithm is unconditionally secure , no matter
how much ciphertext a cryptanalyst has, if there is
not enough information to recover the plaintext.
• In point of fact, only a one-time pad is unbreakable
given infinite resources. All other cryptosystems are
breakable in a ciphertext only attack, simply by
trying every possible key one by one and checking
whether the resulting plaintext is meaningful. This
is called a brute-force attack
Complexity of an attack
• The complexity of an attack can be measured in three
different ways:
1. Data complexity : The amount of data needed(as
input) to perform the attack.
2. Processing or time complexity : The time needed to
perform the attack : This is often called the work
factor.
3.Storage requirements : The amount of memory needed
to perform the attack.
• Complexities are expressed as orders of magnitude.
If an algorithm has a processing complexity of 2128
then 2128
operations are required to break the
algorithm.
• If it is possible to perform a million operations every
second and a million parallel processors are set
against the task, it will still take over 1019
years to
recover the key. That’s a billion times the age of the
universe.
Types of Encryption Algorithms
• Two basic types
– Transposition ciphers
– Substitution ciphers
– Combinations are called product ciphers
• Substitution Ciphers
– Every letter or group of letters is replaced by
another letter or group of letters . Example:
Caesar cipher
– Easy to break by analyzing statistical
properties of written language
• Transposition Ciphers
– Instead of substituting letters in the plaintext,
we change their order
– Also easy to break by analyzing structure of
language
• Most actual encryption algorithms use a complex
combination of substitution and transposition
– Examples:
– Data Encryption Standard (DES)
– DES chaining
Substitution Ciphers
• A substitution cipher is one in which each character in
the plaintext is substituted for another character in
the ciphertext. The receiver inverts the substitution on
the ciphertext to recover the plaintext.
• In classical cryptography, there are four types of
substitution ciphers:
1. Simple substitution cipher or mono alphabetic
cipher
2. Homophonic substitution cipher
3. Polygram substitution cipher
4. poly alphabetic substitution cipher
Simple substitution cipher
• A simple substitution cipher, or mono alphabetic
cipher, is one in which each character of the
plaintext is replaced with a corresponding
character of ciphertext.
• The cryptograms in newspapers are simple
substitution ciphers.
• Caesar cipher is an example of a mono-
alphabetic cipher
Homophonic substitution cipher
• A homophonic substitution cipher is like a
simple substitution cryptosystem, except that a
single character of plaintext can map to one of
several characters of ciphertext.
• For example, "A" could correspond to either 5,
13, 25, or 56, "B" could correspond to either 7,
19, 31, or 4 2, and so on.
Polygram substitution cipher
• A polygram substitution cipher is one in which
blocks of characters are encrypted in groups.
• For example, "ABA" could correspond to "RTQ,"
"ABB" could correspond to "SLL, “ and so on.
Polyalphabetic substitution
cipher
• A polyalphabetic substitution cipher is made up
of multiple simple substitution ciphers.
• For example, there might be five different
simple substitution ciphers used; the particular
one used changes with the position of each
character of the plaintext.
• Vigenere cipher is an example of a poly-
alphabetic cipher
Caesar Cipher
• The famous Caesar Cipher, in which each plaintext
character is replaced by the character three to the
right modulo 26 ("A" is replaced by "D," "B" is replaced
by "E,"..., "W" is replaced by "Z," "X“ is replaced by "A,"
"Y" is replaced by "B," and "Z" is replaced by "C") is a
simple substitution cipher.
• It’s actually even simpler, because the ciphertext
alphabet is a rotation of the plaintext alphabet and not
an arbitrary permutation.
Transposition cipher
• In a transposition cipher the plaintext remains the
same, but the order of characters is shuffled
• around. In a simple columnar transposition cipher,
the plaintext is written horizontally onto a piece of
graph paper of fixed width and the ciphertext is
read off vertically (see Figure 1.4).
• Decryption is a matter of writing the ciphertext
vertically onto a piece of graph paper of identical
width and then reading the plaintext off
horizontally.
• Since the letters of the ciphertext are the same as
those of the plaintext, a frequency analysis on the
ciphertext would reveal that each letter has
approximately the same likelihood as in English.
• This gives a very good clue to a cryptanalyst, who
can then use a variety of techniques to determine
the right ordering of the letters to obtain the
plaintext. Putting the ciphertext through a second
transposition cipher greatly enhances security.
Columnar Transposition Ciphers
• A transposition cipher. Keyed by a phrase such as
“MEGABUCK”. The letter in the key indicated the order
of columns to be output. Plaintext horizontally read in,
ciphertext read out column by column.
One-time pad
• A one-time pad is the only (theoretically) 100% secure
method of encryption currently available today.
• The one-time pad's security comes from it's key; the key
(if chosen correctly) is EQUAL to the length of the
plaintext and is COMPLETELY random.
• When both conditions are simultaneously fulfilled, the
key is cryptographically secure.
• A one-time pad works as follows:
• Alice wants to send a message to Bob.
• Alice obtains a random key that is equal to the length of
the Plaintext. she wishes to send and transmits it to Bob
through an existing secure channel.
• She uses an algorithm to encrypt the Plaintext with the
key.
• The actual algorithm used doesn't matter, so long as it is
agreed upon by both Alice and Bob beforehand.
• After the encryption is completed, Alice DESTROYS the
key (so it can never be recovered or used again).
• Alice then sends the message to Bob who reverses the
encryption process and destroys his copy of the key.
• The key destruction ensures that the key will not be
reused. The cipher is called the one-time pad because
you have a "pad" of keys that are used only once and
thrown out
How it works
• The message is "THE BRITISH ARE COMING". So it
must have a random key of length 19. How the key is
obtained it is not important, but it has to be truly
random . And the key is “DKJFOISJOGIJPAPDIGN”
• Next procedure Cryptography Doc/One Time Pad
Tutorial.htm

Contenu connexe

Tendances

Symmetric Cipher Model, Substitution techniques, Transposition techniques, St...
Symmetric Cipher Model, Substitution techniques, Transposition techniques, St...Symmetric Cipher Model, Substitution techniques, Transposition techniques, St...
Symmetric Cipher Model, Substitution techniques, Transposition techniques, St...JAINAM KAPADIYA
 
Cryptography and network security
Cryptography and network securityCryptography and network security
Cryptography and network securitypatisa
 
Diffie hellman key exchange algorithm
Diffie hellman key exchange algorithmDiffie hellman key exchange algorithm
Diffie hellman key exchange algorithmSunita Kharayat
 
Cryptography.ppt
Cryptography.pptCryptography.ppt
Cryptography.pptUday Meena
 
Kerberos Authentication Protocol
Kerberos Authentication ProtocolKerberos Authentication Protocol
Kerberos Authentication ProtocolBibek Subedi
 
Topic1 substitution transposition-techniques
Topic1 substitution transposition-techniquesTopic1 substitution transposition-techniques
Topic1 substitution transposition-techniquesMdFazleRabbi18
 
X.509 Certificates
X.509 CertificatesX.509 Certificates
X.509 CertificatesSou Jana
 
Cryptography - Block cipher & stream cipher
Cryptography - Block cipher & stream cipherCryptography - Block cipher & stream cipher
Cryptography - Block cipher & stream cipherNiloy Biswas
 
Network Security and Cryptography
Network Security and CryptographyNetwork Security and Cryptography
Network Security and CryptographyAdam Reagan
 
18CS2005 Cryptography and Network Security
18CS2005 Cryptography and Network Security18CS2005 Cryptography and Network Security
18CS2005 Cryptography and Network SecurityKathirvel Ayyaswamy
 
Network security & cryptography full notes
Network security & cryptography full notesNetwork security & cryptography full notes
Network security & cryptography full notesgangadhar9989166446
 
CS6701 CRYPTOGRAPHY AND NETWORK SECURITY
CS6701 CRYPTOGRAPHY AND NETWORK SECURITYCS6701 CRYPTOGRAPHY AND NETWORK SECURITY
CS6701 CRYPTOGRAPHY AND NETWORK SECURITYKathirvel Ayyaswamy
 

Tendances (20)

Symmetric Cipher Model, Substitution techniques, Transposition techniques, St...
Symmetric Cipher Model, Substitution techniques, Transposition techniques, St...Symmetric Cipher Model, Substitution techniques, Transposition techniques, St...
Symmetric Cipher Model, Substitution techniques, Transposition techniques, St...
 
Cryptography
CryptographyCryptography
Cryptography
 
Cryptography and network security
Cryptography and network securityCryptography and network security
Cryptography and network security
 
Digital Signature
Digital SignatureDigital Signature
Digital Signature
 
Diffie hellman key exchange algorithm
Diffie hellman key exchange algorithmDiffie hellman key exchange algorithm
Diffie hellman key exchange algorithm
 
Cryptography.ppt
Cryptography.pptCryptography.ppt
Cryptography.ppt
 
Electronic mail security
Electronic mail securityElectronic mail security
Electronic mail security
 
Kerberos Authentication Protocol
Kerberos Authentication ProtocolKerberos Authentication Protocol
Kerberos Authentication Protocol
 
Topic1 substitution transposition-techniques
Topic1 substitution transposition-techniquesTopic1 substitution transposition-techniques
Topic1 substitution transposition-techniques
 
X.509 Certificates
X.509 CertificatesX.509 Certificates
X.509 Certificates
 
Cryptography
CryptographyCryptography
Cryptography
 
Cryptography
CryptographyCryptography
Cryptography
 
Asymmetric Cryptography
Asymmetric CryptographyAsymmetric Cryptography
Asymmetric Cryptography
 
Cryptography - Block cipher & stream cipher
Cryptography - Block cipher & stream cipherCryptography - Block cipher & stream cipher
Cryptography - Block cipher & stream cipher
 
Network Security and Cryptography
Network Security and CryptographyNetwork Security and Cryptography
Network Security and Cryptography
 
18CS2005 Cryptography and Network Security
18CS2005 Cryptography and Network Security18CS2005 Cryptography and Network Security
18CS2005 Cryptography and Network Security
 
Network security & cryptography full notes
Network security & cryptography full notesNetwork security & cryptography full notes
Network security & cryptography full notes
 
cryptography
cryptographycryptography
cryptography
 
CRYPTOGRAPHY AND NETWORK SECURITY- Transport-level Security
CRYPTOGRAPHY AND NETWORK SECURITY- Transport-level SecurityCRYPTOGRAPHY AND NETWORK SECURITY- Transport-level Security
CRYPTOGRAPHY AND NETWORK SECURITY- Transport-level Security
 
CS6701 CRYPTOGRAPHY AND NETWORK SECURITY
CS6701 CRYPTOGRAPHY AND NETWORK SECURITYCS6701 CRYPTOGRAPHY AND NETWORK SECURITY
CS6701 CRYPTOGRAPHY AND NETWORK SECURITY
 

Similaire à Cryptography cse,ru

Cryptography and Network Security-ch1-4.pptx
Cryptography and Network Security-ch1-4.pptxCryptography and Network Security-ch1-4.pptx
Cryptography and Network Security-ch1-4.pptxSamiDan3
 
information technology cryptography Msc chapter 1-4.pdf
information technology  cryptography Msc chapter 1-4.pdfinformation technology  cryptography Msc chapter 1-4.pdf
information technology cryptography Msc chapter 1-4.pdfwondimagegndesta
 
Information and network security 31 public key cryptography
Information and network security 31 public key cryptographyInformation and network security 31 public key cryptography
Information and network security 31 public key cryptographyVaibhav Khanna
 
Information and network security 10 classical encryption techniques
Information and network security 10 classical encryption techniquesInformation and network security 10 classical encryption techniques
Information and network security 10 classical encryption techniquesVaibhav Khanna
 
Cryptography and network security
Cryptography and network security Cryptography and network security
Cryptography and network security Mathan Gopal
 
Cryptography and network security
Cryptography and network securityCryptography and network security
Cryptography and network securityShanthi Mathan
 
Evolution of Cryptography and Cryptographic techniques
Evolution of Cryptography and Cryptographic techniquesEvolution of Cryptography and Cryptographic techniques
Evolution of Cryptography and Cryptographic techniquesMona Rajput
 
Dr Petar Radanliev, PhD Thesis Department of Computer Sciences, University of...
Dr Petar Radanliev, PhD Thesis Department of Computer Sciences, University of...Dr Petar Radanliev, PhD Thesis Department of Computer Sciences, University of...
Dr Petar Radanliev, PhD Thesis Department of Computer Sciences, University of...Petar Radanliev
 
Symmetric ciphermodel
Symmetric ciphermodelSymmetric ciphermodel
Symmetric ciphermodelpriyapavi96
 
Introduction to cryptography part1-final
Introduction to cryptography  part1-finalIntroduction to cryptography  part1-final
Introduction to cryptography part1-finalTaymoor Nazmy
 
Cryptography and Network Security
Cryptography and Network SecurityCryptography and Network Security
Cryptography and Network SecurityPa Van Tanku
 
Cryptography : The Art of Secured Messaging
Cryptography : The Art of Secured MessagingCryptography : The Art of Secured Messaging
Cryptography : The Art of Secured MessagingSumit Satam
 
Cryptography and network security Nit701
Cryptography and network security Nit701Cryptography and network security Nit701
Cryptography and network security Nit701Amit Pathak
 

Similaire à Cryptography cse,ru (20)

Fundamentals of cryptography
Fundamentals of cryptographyFundamentals of cryptography
Fundamentals of cryptography
 
Crytography
CrytographyCrytography
Crytography
 
Cryptography and Network Security-ch1-4.pptx
Cryptography and Network Security-ch1-4.pptxCryptography and Network Security-ch1-4.pptx
Cryptography and Network Security-ch1-4.pptx
 
chapter 1-4.pdf
chapter 1-4.pdfchapter 1-4.pdf
chapter 1-4.pdf
 
information technology cryptography Msc chapter 1-4.pdf
information technology  cryptography Msc chapter 1-4.pdfinformation technology  cryptography Msc chapter 1-4.pdf
information technology cryptography Msc chapter 1-4.pdf
 
Information and network security 31 public key cryptography
Information and network security 31 public key cryptographyInformation and network security 31 public key cryptography
Information and network security 31 public key cryptography
 
Information and network security 10 classical encryption techniques
Information and network security 10 classical encryption techniquesInformation and network security 10 classical encryption techniques
Information and network security 10 classical encryption techniques
 
Cryptography and network security
Cryptography and network security Cryptography and network security
Cryptography and network security
 
Cryptography and network security
Cryptography and network securityCryptography and network security
Cryptography and network security
 
Network security
Network securityNetwork security
Network security
 
Evolution of Cryptography and Cryptographic techniques
Evolution of Cryptography and Cryptographic techniquesEvolution of Cryptography and Cryptographic techniques
Evolution of Cryptography and Cryptographic techniques
 
Cryptography
Cryptography Cryptography
Cryptography
 
Dr Petar Radanliev, PhD Thesis Department of Computer Sciences, University of...
Dr Petar Radanliev, PhD Thesis Department of Computer Sciences, University of...Dr Petar Radanliev, PhD Thesis Department of Computer Sciences, University of...
Dr Petar Radanliev, PhD Thesis Department of Computer Sciences, University of...
 
Symmetric ciphermodel
Symmetric ciphermodelSymmetric ciphermodel
Symmetric ciphermodel
 
Introduction to cryptography part1-final
Introduction to cryptography  part1-finalIntroduction to cryptography  part1-final
Introduction to cryptography part1-final
 
Cryptography and Network Security
Cryptography and Network SecurityCryptography and Network Security
Cryptography and Network Security
 
Cryptography : The Art of Secured Messaging
Cryptography : The Art of Secured MessagingCryptography : The Art of Secured Messaging
Cryptography : The Art of Secured Messaging
 
Cryptography and network security Nit701
Cryptography and network security Nit701Cryptography and network security Nit701
Cryptography and network security Nit701
 
groupWork.pptx
groupWork.pptxgroupWork.pptx
groupWork.pptx
 
Slidecast - Workshop
Slidecast - WorkshopSlidecast - Workshop
Slidecast - Workshop
 

Plus de Hossain Md Shakhawat (20)

Recipe for the effective presentaion
Recipe for the effective presentaionRecipe for the effective presentaion
Recipe for the effective presentaion
 
The Road to Higher study in Japan
The Road to Higher study in JapanThe Road to Higher study in Japan
The Road to Higher study in Japan
 
Application of dfs
Application of dfsApplication of dfs
Application of dfs
 
Breadth first search and depth first search
Breadth first search and  depth first searchBreadth first search and  depth first search
Breadth first search and depth first search
 
Islamic jurisprudence
Islamic jurisprudenceIslamic jurisprudence
Islamic jurisprudence
 
Introduction to Medical Imaging
Introduction to Medical ImagingIntroduction to Medical Imaging
Introduction to Medical Imaging
 
Jpeg compression
Jpeg compressionJpeg compression
Jpeg compression
 
Surah Fatiha
Surah FatihaSurah Fatiha
Surah Fatiha
 
Hashing
HashingHashing
Hashing
 
Decision making and looping
Decision making and loopingDecision making and looping
Decision making and looping
 
Decision making and branching
Decision making and branchingDecision making and branching
Decision making and branching
 
Digital signature
Digital signatureDigital signature
Digital signature
 
Caesar cipher
Caesar cipherCaesar cipher
Caesar cipher
 
Rsa rivest shamir adleman
Rsa rivest shamir adlemanRsa rivest shamir adleman
Rsa rivest shamir adleman
 
Introduction to programming with c,
Introduction to programming with c,Introduction to programming with c,
Introduction to programming with c,
 
Introduction to digital image processing
Introduction to digital image processingIntroduction to digital image processing
Introduction to digital image processing
 
History of computing
History of computingHistory of computing
History of computing
 
Introduction to Printers
Introduction to PrintersIntroduction to Printers
Introduction to Printers
 
Input devices_(Mouse and Keyboard)
Input devices_(Mouse and Keyboard)Input devices_(Mouse and Keyboard)
Input devices_(Mouse and Keyboard)
 
Binary search tree(bst)
Binary search tree(bst)Binary search tree(bst)
Binary search tree(bst)
 

Dernier

9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 

Dernier (20)

9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 

Cryptography cse,ru

  • 1. Cryptography Introduction Shimul Shakhawat Computer Science & Engineering Dept. University of Rajshahi
  • 2. 2 History • 50 B.C. Julius Caesar uses cryptographic technique • 400 A.D. Kama Sutra in India mentions cryptographic techniques • 1250 British monk Roger Bacon describes simple ciphers • 1466 Leon Alberti develops a cipher disk • 1861 Union forces use a cipher during Civil War
  • 3. 3 History • 1914 World War I – British, French, and German forces use encryption technology • 1917 William Friedman, Father of U.S. encryption efforts starts a school for teaching cryptanalysis in Illinois • 1917 AT&T employee Gilbert Vernam invents polyalphabetic cipher • 1919 Germans develop the Engima machine for encryption
  • 4. 4 History • 1937 Japanese design the Purple machine for encryption • 1942 Navajo windtalkers help with secure communication during World War II • 1948 Claude Shannon develops statistical methods for encryption/decryption • 1976 IBM develops DES • 1976 Diffie – Hellman develop public key / private key cryptography • 1977 Rivest – Shamir – Adleman develop the RSA algorithm for public key / private key
  • 5. Plaintext • Plaintext is a text , in natural readable form. • It is the message or data before it gets encrypted. • It is sometimes called cleartext • Plaintext is denoted by M (message) or P (plaintext). • It can be a stream of bits , a text file , a bitmap, a stream of digitized voice etc. • It is simply binary data
  • 6. Ciphertext • An encrypted message is ciphertext • It is denoted by C (ciphertext) • It is also binary data • Sometime it has the same size as M, sometimes larger • It is the results from plaintext by applying the encryption key • Message altered to be unreadable by anyone except the intended recipients
  • 7. Encryption • The process of disguising a message in such a way to hide its substance is called encryption. • scrambling a message using a specialized cryptographic algorithm to make it unreadable by anyone except the intended recipients. • The encryption function E, operates on M to produce C. In mathematical notation E(M)=C Encryption Decryption Plaintext Ciphertext Plaintext
  • 8. Decryption • The process of converting ciphertext back to the original plaintext. • In the reverse process, the decryption function D operates on C to produce M: D(C) = M • Since the whole point of encrypting and then decrypting a message is to recover the original plaintext, the following identity must hold true: D(E(M)) = M Encryption Decryption Plaintext Ciphertext Plaintext
  • 9. Cryptography • The word cryptography comes from the two Greek words: Krypto (secret) and graphein (write). So cryptography means secret writing . • The art and science of keeping messages secure is called cryptography and it is practiced by cryptographers • The art of devising ciphers is called cryptography • Cryptography deals with creating documents that can be shared secretly over public communication channels • Cryptographic documents are decrypted with the key associated with encryption, with the knowledge of the encryption
  • 10. Cryptanalysis • The art and science of breaking ciphertext is called cryptanalysis. • That is seeing through the disguise and it is practiced by cryptanalysts. • Cryptanalysis deals with finding the encryption key for breaking cryptographic algorithms without the knowledge of the encryption • The art of breaking ciphers is called cryptanalysis • Cryptanalyst: a person who breaks cryptographic codes . Also referred to as “the attacker”.
  • 11. Cryptology • Cryptography and cryptanalysis is collectively known as Cryptology. • The branch of mathematics encompasses both cryptography and cryptanalysis is called cryptology and its practitioners are called cryptologists. • Modern cryptologists are generally trained in theoretical mathematics—they have to be.
  • 12. Confidentiality Three confidentiality or characteristics of cryptography • Authentication: It should be possible for the receiver of a message to ascertain its origin. An intruder should not be able to masquerade as someone else. • Integrity: It should be possible for the receiver of a message to verify that it has not been modified in transit. An intruder should not be able to substitute a false message for a legitimate one. • Nonrepudiation: A sender should not be able to falsely deny later that he sent a message.
  • 13. Authentication • Authentication is of ensuring that whoever supplies or accesses the message is an authorized party. • Two solutions are: – Passwords – Digital signatures
  • 14. Integrity • This involves ensuring that when a message is sent over a network, the data that arrives is the same as the data that was originally sent. It is important that the data has not been modified or replaced . • Technical solutions include: – Encryption – Hashing algorithms
  • 15. Nonrepudiation • Ensuring that the intended recipient actually got the message. • Ensuring that the alleged sender actually sent the message.
  • 16. Cryptographic Algorithm(Cipher) • A cryptographic algorithm, also called a cipher, is the mathematical function used for encryption and decryption. • Generally, there are two related functions: one for encryption and the other for decryption. • If the security of an algorithm is based on keeping the way that algorithm works a secret, it is a restricted algorithm. • Restricted algorithms have historical interest, but are woefully inadequate by today’s standards.
  • 17. Restricted algorithm • Drawbacks of restricted algorithm: 1. A large or changing group of users cannot use them, because every time a user leaves the group everyone else must switch to a different algorithm. 2. If someone accidentally reveals the secret, everyone must change their algorithm. 3.Restricted algorithms allow no quality control or standardization.
  • 18. 4. Every group of users must have their own unique algorithm. Such a group can’t use off-the-shelf hardware or software products; an eavesdropper can buy the same product and learn the algorithm. 5. They have to write their own algorithms and implementations. If no one in the group is a good cryptographer, then they won’t know if they have a secure algorithm.
  • 19. Key and Key Space • Key: Sequence that controls the operation and behavior of the cryptographic algorithm • rules used in algorithms to convert a document into a secret document • Keyspace : The range of possible values of the key is called the keyspace. • Now Ek(M)=C , Dk(C)=M then Dk (Ek(M))=M Encryption Decryption Plaintext Ciphertext Plaintext Key Key
  • 20. 20 • Keys are of two types: – Symmetric – Asymmetric • A key is symmetric if the same key is used both for encryption and decryption • A key is asymmetric if different keys are used for encryption and decryption • Symmetric key methods • DES 56-bit • Triple DES 128-bit • AES 128-bit and higher • Blowfish 128-bit and higher • Asymmetric key methods • RSA (Rivest-Shamir-Adleman of MIT) • PGP (Phil Zimmerman of MIT)
  • 21. 21 Cryptosystem • Cryptosystem – The combination of algorithm, plaintext, ciphertext, key, and key management functions used to perform cryptographic operations is called cryptosystem • A cryptosystem is a 5-tuple (E,D,M,K,C), where E: M x K  C —the set of encryption functions; D: C x K  M —the set of decryption functions; M —a set of plaintexts (some use P as symbol); K —the set of keys; C —the set of ciphertexts;
  • 22. Cryptosystem Services 1. Authenticity 2. Integrity 3. Confidentiality 4. Nonrepudiation 5. Access Control 22
  • 23. Symmetric Algorithms • There are two general types of key-based algorithms: symmetric and public-key. • Symmetric algorithms , sometimes called conventional algorithms, are algorithms where the same key is used for both encryption and decryption. • These algorithms, also called secret-key algorithms, single key algorithms, or one-key algorithms • It requires that the sender and receiver agree on a key before they can communicate securely. • This single key shared by two communicating parties. • The shared key must remain secret to ensure the confidentiality of the encrypted data
  • 24. • The security of a symmetric algorithm rests in the key; divulging the key means that anyone could encrypt and decrypt messages. As long as the communication needs to remain secret, the key must remain secret. • The shared key problem is the main technological challenge for this kind of encryption. • One method of distributing the key is using the sneaker- net. • Encryption and decryption with a symmetric algorithm are denoted by: Ek(M)=C , Dk(C)=M
  • 25. Types of Symmetric Algorithm • Symmetric algorithms can be divided into two categories: 1. Block ciphers 2. Stream ciphers • Some operate on the plaintext a single bit(or sometimes byte) at a time, these are called stream algorithms or stream ciphers . • Others operate on the plaintext in groups of bits. The groups of bits are called blocks , and the algorithms are called block algorithms or block ciphers
  • 26. Block Ciphers • Most well-known and well-studied symmetric algorithms use block ciphers. • Block ciphers break up the message into constant- size blocks and encrypt the code block by block. • Typical block sizes are 64 bits or 128 bits. • Messages are padded (with extra bits) to fit the block size. • The simplest type of block ciphers work in ECB (Electronic Code Book) mode. In this mode, each block is encrypted separately, independent of the other blocks
  • 27. Block Ciphers • Two factors influence the security of a symmetric block cipher: – The quality of the algorithm (e.g., ECB mode ciphers are less secure). – The length of the key (e.g., 64 bit blocks are questionable, but 128 bit blocks are considered more than adequate). • There is a classic trade-off between efficiency and security.
  • 28. Public-key algorithms • Public-key algorithms (also called asymmetric algorithms) are designed so that the key used for encryption is different from the key used for decryption. • Furthermore, the decryption key cannot (at least in any reasonable amount of time) be calculated from the encryption key. The algorithms are called "public-key" because the encryption key can be made public. • A complete stranger can use the encryption key to encrypt a message, but only a specific person with the corresponding decryption key can decrypt the message. • In these systems, the encryption key is often called the public key, and the decryption key is often called the private key.
  • 29. • The private key is sometimes also called the secret key, but to avoid confusion with symmetric algorithms, that tag won’t be used here. • Encryption using public key K is denoted by: Ek(M)=C • Even though the public key and private key are different, decryption with the corresponding private key is denoted by: Dk(C)=M • Sometimes, messages will be encrypted with the private key and decrypted with the public key; this is used in digital signatures
  • 30. Attack. • An attempted cryptanalysis is called an attack. • There are four general types of cryptanalytic attacks. Of course, each of them assumes that the cryptanalyst has complete knowledge of the encryption algorithm used: 1. Ciphertext-only attack 2. Known-plaintext attack 3. Chosen-plaintext attack 4. Adaptive-chosen-plaintext attack
  • 31. Ciphertext-only attack • Ciphertext-only attack : The cryptanalyst has the ciphertext of several messages, all of which have been encrypted using the same encryption algorithm. • The cryptanalyst’s job is to recover the plaintext of as many messages as possible, or better yet to deduce the key (or keys) used to encrypt the messages, in order to decrypt other messages encrypted with the same keys.
  • 32. Known-plaintext attack • Known-plaintext attack. The cryptanalyst has access not only to the ciphertext of several messages, but also to the plaintext of those messages. • His job is to deduce the key (or keys) used to encrypt the messages or an algorithm to decrypt any new messages encrypted with the same key (or keys).
  • 33. Chosen-plaintext attack • Chosen-plaintext attack: The cryptanalyst not only has access to the ciphertext and associated plaintext for several messages, but he also chooses the plaintext that gets encrypted. • This is more powerful than a known-plaintext attack, because the cryptanalyst can choose specific plaintext blocks to encrypt, ones that might yield more information about the key. • His job is to deduce the key (or keys) used to encrypt the messages or an algorithm to decrypt any new messages encrypted with the same key (or keys).
  • 34. Adaptive-chosen-plaintext attack • Adaptive-chosen-plaintext attack : This is a special case of a chosen-plaintext attack. The cryptanalyst not only can choose the plaintext that is encrypted, but he can also modify his choice based on the results of previous encryption. • In a chosen-plaintext attack, a cryptanalyst might just be able to choose one large block of plaintext to be encrypted. • In an adaptive chosen-plaintext attack he can choose a smaller block of plaintext and then choose another based on the results of the first, and so forth.
  • 35. Chosen-ciphertext attack • There are at least three other types of cryptanalytic attack. 5 . Chosen-ciphertext attack: . The cryptanalyst can choose different ciphertexts to be decrypted and has access to the decrypted plaintext. For example, the cryptanalyst has access to a tamperproof box that does automatic decryption. His job is to deduce the key. • This attack is primarily applicable to public-key algorithms . A chosen-ciphertext attack is sometimes effective against a symmetric algorithm as well. • Sometimes a chosen-plaintext attack and a chosen- ciphertext attack are together known as a chosen-text attack .
  • 36. 6. Chosen-key attack : This attack doesn’t mean that the cryptanalyst can choose the key. It means that he has some knowledge about the relationship between different keys . It’s strange and obscure, not very practical 7. Rubber-hose cryptanalysis : The cryptanalyst threatens, blackmails, or tortures someone until they give him the key. Bribery is sometimes referred to as a purchase-key attack
  • 37. Security of Algorithms • An algorithm is considered computationally secure sometimes called strong if it cannot be broken with available resources, either current or future. • Different algorithms offer different degrees of security . It depends on how hard they are to break. 1.If the cost required to break an algorithm is greater than the value of the encrypted data, then it is probably safe. 2. If the time required to break an algorithm is longer than the time the encrypted data must remain secret, then it is probably safe.
  • 38. 3. If the amount of data encrypted with a single key is less than the amount of data necessary to break the algorithm, then it is probably safe. • Here the term "probably" is used because there is always a chance of new breakthroughs in cryptanalysis. • On the other hand, the value of most data decreases over time. It is important that the value of the data always remain less than the cost to break the security protecting it.
  • 39. Categories of breaking an algorithm • Lars Knudsen classified different categories of breaking an algorithm. In decreasing order of severity : 1. Total break : A cryptanalyst finds the key, K, such that Dk(C)=M 2. Global deduction : A cryptanalyst finds an alternate algorithm, A, equivalent to Dk(C)=M without knowing K. 3. Instance or local deduction : A cryptanalyst finds the plaintext of an intercepted ciphertext. 4. Information deduction : A cryptanalyst gains some information about the key or plaintext. This information could be a few bits of the key, some information about the form of the plaintext, and so forth.
  • 40. Brute-force attack • An algorithm is unconditionally secure , no matter how much ciphertext a cryptanalyst has, if there is not enough information to recover the plaintext. • In point of fact, only a one-time pad is unbreakable given infinite resources. All other cryptosystems are breakable in a ciphertext only attack, simply by trying every possible key one by one and checking whether the resulting plaintext is meaningful. This is called a brute-force attack
  • 41. Complexity of an attack • The complexity of an attack can be measured in three different ways: 1. Data complexity : The amount of data needed(as input) to perform the attack. 2. Processing or time complexity : The time needed to perform the attack : This is often called the work factor. 3.Storage requirements : The amount of memory needed to perform the attack.
  • 42. • Complexities are expressed as orders of magnitude. If an algorithm has a processing complexity of 2128 then 2128 operations are required to break the algorithm. • If it is possible to perform a million operations every second and a million parallel processors are set against the task, it will still take over 1019 years to recover the key. That’s a billion times the age of the universe.
  • 43. Types of Encryption Algorithms • Two basic types – Transposition ciphers – Substitution ciphers – Combinations are called product ciphers • Substitution Ciphers – Every letter or group of letters is replaced by another letter or group of letters . Example: Caesar cipher – Easy to break by analyzing statistical properties of written language
  • 44. • Transposition Ciphers – Instead of substituting letters in the plaintext, we change their order – Also easy to break by analyzing structure of language • Most actual encryption algorithms use a complex combination of substitution and transposition – Examples: – Data Encryption Standard (DES) – DES chaining
  • 45. Substitution Ciphers • A substitution cipher is one in which each character in the plaintext is substituted for another character in the ciphertext. The receiver inverts the substitution on the ciphertext to recover the plaintext. • In classical cryptography, there are four types of substitution ciphers: 1. Simple substitution cipher or mono alphabetic cipher 2. Homophonic substitution cipher 3. Polygram substitution cipher 4. poly alphabetic substitution cipher
  • 46. Simple substitution cipher • A simple substitution cipher, or mono alphabetic cipher, is one in which each character of the plaintext is replaced with a corresponding character of ciphertext. • The cryptograms in newspapers are simple substitution ciphers. • Caesar cipher is an example of a mono- alphabetic cipher
  • 47. Homophonic substitution cipher • A homophonic substitution cipher is like a simple substitution cryptosystem, except that a single character of plaintext can map to one of several characters of ciphertext. • For example, "A" could correspond to either 5, 13, 25, or 56, "B" could correspond to either 7, 19, 31, or 4 2, and so on.
  • 48. Polygram substitution cipher • A polygram substitution cipher is one in which blocks of characters are encrypted in groups. • For example, "ABA" could correspond to "RTQ," "ABB" could correspond to "SLL, “ and so on.
  • 49. Polyalphabetic substitution cipher • A polyalphabetic substitution cipher is made up of multiple simple substitution ciphers. • For example, there might be five different simple substitution ciphers used; the particular one used changes with the position of each character of the plaintext. • Vigenere cipher is an example of a poly- alphabetic cipher
  • 50. Caesar Cipher • The famous Caesar Cipher, in which each plaintext character is replaced by the character three to the right modulo 26 ("A" is replaced by "D," "B" is replaced by "E,"..., "W" is replaced by "Z," "X“ is replaced by "A," "Y" is replaced by "B," and "Z" is replaced by "C") is a simple substitution cipher. • It’s actually even simpler, because the ciphertext alphabet is a rotation of the plaintext alphabet and not an arbitrary permutation.
  • 51. Transposition cipher • In a transposition cipher the plaintext remains the same, but the order of characters is shuffled • around. In a simple columnar transposition cipher, the plaintext is written horizontally onto a piece of graph paper of fixed width and the ciphertext is read off vertically (see Figure 1.4). • Decryption is a matter of writing the ciphertext vertically onto a piece of graph paper of identical width and then reading the plaintext off horizontally.
  • 52. • Since the letters of the ciphertext are the same as those of the plaintext, a frequency analysis on the ciphertext would reveal that each letter has approximately the same likelihood as in English. • This gives a very good clue to a cryptanalyst, who can then use a variety of techniques to determine the right ordering of the letters to obtain the plaintext. Putting the ciphertext through a second transposition cipher greatly enhances security.
  • 53. Columnar Transposition Ciphers • A transposition cipher. Keyed by a phrase such as “MEGABUCK”. The letter in the key indicated the order of columns to be output. Plaintext horizontally read in, ciphertext read out column by column.
  • 54. One-time pad • A one-time pad is the only (theoretically) 100% secure method of encryption currently available today. • The one-time pad's security comes from it's key; the key (if chosen correctly) is EQUAL to the length of the plaintext and is COMPLETELY random. • When both conditions are simultaneously fulfilled, the key is cryptographically secure. • A one-time pad works as follows: • Alice wants to send a message to Bob. • Alice obtains a random key that is equal to the length of the Plaintext. she wishes to send and transmits it to Bob through an existing secure channel.
  • 55. • She uses an algorithm to encrypt the Plaintext with the key. • The actual algorithm used doesn't matter, so long as it is agreed upon by both Alice and Bob beforehand. • After the encryption is completed, Alice DESTROYS the key (so it can never be recovered or used again). • Alice then sends the message to Bob who reverses the encryption process and destroys his copy of the key. • The key destruction ensures that the key will not be reused. The cipher is called the one-time pad because you have a "pad" of keys that are used only once and thrown out
  • 56. How it works • The message is "THE BRITISH ARE COMING". So it must have a random key of length 19. How the key is obtained it is not important, but it has to be truly random . And the key is “DKJFOISJOGIJPAPDIGN” • Next procedure Cryptography Doc/One Time Pad Tutorial.htm

Notes de l'éditeur

  1. So why do care about cryptography? Well, here’s what it can do for us. Confidentiality – Only authorized entities are allowed to view Integrity – Ensures the message was not altered by unauthorized individuals Authenticity – Validates the source of a message, to ensure the sender is properly identified Nonrepudiation – Establishes sender identity so that the entity cannot deny having sent the message Access Control – Access to an object requires access to the associated crypto keys in many systems (e.g. login)