Docsity

Cryptography: An Introduction to Encryption and Decryption, Lecture notes of Computer Science

Partial preview of the text

Download Cryptography: An Introduction to Encryption and Decryption and more Lecture notes Computer Science in PDF only on Docsity!

Chapter Two

Cryptography

Outline

  • Overview of Cryptography
  • Classification of Cryptography
    • (^) Symmetric (Secret Key) Cryptography
    • (^) Asymmetric (Public key) Cryptography
  • Hash Functions and Digital Signatures

Overview

A sender S wanting to transmit
message M to a receiver R
To protect the message M, the
sender first encrypts it into an
unintelligible message M’
After receipt of M’, R decrypts the
message to obtain M
M is called the plaintext

 (^) What we want to encrypt

M’ is called the ciphertext
A sender S wanting to transmit
message M to a receiver R
To protect the message M, the
sender first encrypts it into an
unintelligible message M’
After receipt of M’, R decrypts the
message to obtain M
M is called the plaintext

 (^) What we want to encrypt

M’ is called the ciphertext

Cryptography: Idea

Cryptography: Idea

Overview

Plain Text : A message in its

natural format readable by an

attacker

Ciphertext – Message altered to be
unreadable by anyone except the
intended recipients
Encryption/ Encyphering : a process of
converting plaintext to ciphertext
Decryption/Decyphering : a process of
construcing plaintext from the

Plain Text : A message in its

natural format readable by an

attacker

Ciphertext – Message altered to be
unreadable by anyone except the
intended recipients
Encryption/ Encyphering : a process of
converting plaintext to ciphertext
Decryption/Decyphering : a process of
construcing plaintext from the

Cryptography: Terminologies

Cryptography: Terminologies

Cryptosystem – The combination of

algorithm, key, and key management functions used to perform cryptographic operations A cryptosystem is a 5-tuple (E,D,M,K,C), where M: the set of plaintexts K: the set of keys C: the set of ciphertexts E: M x K  C —the set of enciphering functions D: C x K  M —the set of deciphering functions

Cryptography

Security Techniques

Notation  Given P=Plaintext  C=CipherText C = E K (P) Encryption P = D K ( C) Decryption Notation  Given P=Plaintext  C=CipherText C = E K (P) Encryption P = D K ( C) Decryption

Cryptography …

Cryptography …

Cryptography

Properties of encryption function

Properties of encryption function

 It should be computationally infeasible to find the key K when given the plaintext P and associated ciphertext C= E K (p) It should also be computationally infeasible to find another key K’ such as E K (p) = E K’ (p)  It should be computationally infeasible to find the key K when given the plaintext P and associated ciphertext C= E K (p) It should also be computationally infeasible to find another key K’ such as E K (p) = E K’ (p) An encryption scheme is computationally secure if: The cost of breaking the cipher exceeds the value of the encrypted information. The time required to break the cipher exceeds the useful lifetime of the An encryption scheme is computationally secure if: The cost of breaking the cipher exceeds the value of the encrypted information. The time required to break the cipher exceeds the useful lifetime of the

Attacks on Cryptography

  • Objective is recovering the key used
  • Two^ general^ approaches^ to^ attacking^ an encryption scheme
  • Objective is recovering the key used
  • Two^ general^ approaches^ to^ attacking^ an encryption scheme

brute-force attack

 (^) Try every possible key on a piece of ciphertext until an intelligible translation into plaintext is obtained. On average half of all possible keys must be tried to achieve success.

Cryptanalysis

 (^) exploits the characteristics of the

brute-force attack

 (^) Try every possible key on a piece of ciphertext until an intelligible translation into plaintext is obtained.  On average half of all possible keys must be tried to achieve success.

Cryptanalysis

 (^) exploits the characteristics of the algorithm to attempt to deduce a

Cryptography

Cryptanalysis attack can be: Cryptanalysis attack can be: Ciphertext only 

The attacker has only the ciphertext

the goal is to find the corresponding
plaintext

Ciphertext only 

The attacker has only the ciphertext

the goal is to find the corresponding
plaintext

Known plaintext 

The attacker has one or more
plaintext- ciphertext pairs formed
with the secret key
The goal is to find the key

Known plaintext 

The attacker has one or more
plaintext- ciphertext pairs formed
with the secret key
The goal is to find the key

Cryptography

Cryptanalysis attack can be: Cryptanalysis attack can be:

Chosen plaintext

Plaintext message chosen by cryptanalyst, together with its corresponding ciphertext generated with the secret key The goal of the attack is to gain information which reduces the security of the encryption scheme

Chosen ciphertext

 Purported ciphertext chosen by cryptanalyst, together with its

Chosen plaintext

Plaintext message chosen by cryptanalyst, together with its corresponding ciphertext generated with the secret key The goal of the attack is to gain information which reduces the security of the encryption scheme

Chosen ciphertext

 Purported ciphertext chosen by cryptanalyst, together with its

Cryptographic systems are
characterized along three independent
dimensions:

1.The type of operations used for transforming plaintext to ciphertext  (^) Substitution  (^) Transposition 2.The number of keys used  (^) Symmetric/ secret-key  (^) Asymmetric/public-key 3.The way in which the plaintext is processed  (^) Block cipher  (^) Stream cipher

Cryptography

  • The^ difference^ between

substitution and transposition is

that

  • Substitution:^ each^ letter

retains its position but changes

its identity

  • Transposition:^ each^ letter

retains its identity but changes

its position.

Cryptography

Substitution …

Substitution …

Caesar Cipher: Simplest substitution cypher Used by Julius Ceasar each character of a message is replaced by a character three position down in the alphabet.  Plaintext: are you ready  Ciphertext: duh brx uhdgb Caesar Cipher: Simplest substitution cypher Used by Julius Ceasar each character of a message is replaced by a character three position down in the alphabet.  Plaintext: are you ready  Ciphertext: duh brx uhdgb

Cryptography

Substitution…

Substitution…

Denoting each letter of the

alphabet by an integer that

corresponds to its position in the

alphabet:

The encryption & decryption

algorithm can be expressed as

 c = E( 3, p ) = (p + 3) mod 26

Denoting each letter of the

alphabet by an integer that

corresponds to its position in the

alphabet:

The encryption & decryption

algorithm can be expressed as

 c = E( 3, p ) = (p + 3) mod 26