1 Introduction to Cryptography Chapter-4. Definitions  Cryptography = the science (art) of encryption  Cryptanalysis = the science (art) of breaking.

Slides:



Advertisements
Similar presentations
CLASSICAL ENCRYPTION TECHNIQUES
Advertisements

Using Cryptography to Secure Information. Overview Introduction to Cryptography Using Symmetric Encryption Using Hash Functions Using Public Key Encryption.
MAC Raushan. DES simple fiestel network 3131 PlainText Blocks 2*4=8bits 31 f f =0011 xor 0011=0000 = 0 f(r,k)=(2*r+k^2)%8 f(1,5)=(2*1+5^2)%8=3 xor 3 3.
“Advanced Encryption Standard” & “Modes of Operation”
Encipherment Using Modern Symmetric-Key Ciphers. 8.2 Objectives ❏ To show how modern standard ciphers, such as DES or AES, can be used to encipher long.
CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (3) Information Security.
Computer Science CSC 474By Dr. Peng Ning1 CSC 474 Information Systems Security Topic 2.1 Introduction to Cryptography.
CS 6262 Spring 02 - Lecture #7 (Tuesday, 1/29/2002) Introduction to Cryptography.
Intro 1 Introduction Intro 2 Good Guys and Bad Guys  Alice and Bob are the good guys  Trudy is the bad guy  Trudy is our generic “intruder”
1 Introduction CSE 5351: Introduction to cryptography Reading assignment: Chapter 1 of Katz & Lindell.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 29 Cryptography and Network.
EEC 688/788 Secure and Dependable Computing Lecture 4 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
Chapter 5 Cryptography Protecting principals communication in systems.
Cryptography (continued). Enabling Alice and Bob to Communicate Securely m m m Alice Eve Bob m.
McGraw-Hill©The McGraw-Hill Companies, Inc., Security PART VII.
Introduction to Symmetric Block Cipher Jing Deng Based on Prof. Rick Han’s Lecture Slides Dr. Andreas Steffen’s Security Tutorial.
Computer Networking Lecture 21: Security and Cryptography Thanks to various folks from , semester’s past and others.
Lecture 23 Symmetric Encryption
Chapter 8.  Cryptography is the science of keeping information secure in terms of confidentiality and integrity.  Cryptography is also referred to as.
IT 221: Classical and Modern Encryption Techniques Lecture 2: Classical and Modern Encryption Techniques For Educational Purposes Only Revised: September.
3.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 3 Traditional Symmetric-Key Ciphers.
Chapter 2 Basic Encryption and Decryption. csci5233 computer security & integrity 2 Encryption / Decryption encrypted transmission AB plaintext ciphertext.
Lecture 19 Page 1 CS 111 Online Symmetric Cryptosystems C = E(K,P) P = D(K,C) E() and D() are not necessarily the same operations.
symmetric key cryptography
Chapter 2 – Elementary Cryptography  Concepts of encryption  Cryptanalysis  Symmetric (secret key) Encryption (DES & AES)(DES & AES)  Asymmetric (public.
CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (1) Information Security.
Information Systems Security
Chapter 20 Symmetric Encryption and Message Confidentiality.
ITMS – 3153 Information Systems Security
Midterm Review Cryptography & Network Security
1 Chapter 2-1 Conventional Encryption Message Confidentiality.
Network Security Lecture 11 Presented by: Dr. Munam Ali Shah.
CS526: Information Security Prof. Sam Wagstaff September 16, 2003 Cryptography Basics.
Module 3 – Cryptography Cryptography basics Ciphers Symmetric Key Algorithms Public Key Algorithms Message Digests Digital Signatures.
Symmetric-Key Cryptography
Cryptography Chapter 7 Part 2 Pages 781 to 812. Symmetric Cryptography Secret Key Figure 7-10 on page 782 Key distribution problem – Secure courier Many.
Elementary Cryptography  Concepts of encryption  Symmetric (secret key) Encryption (DES & AES)(DES & AES)  Asymmetric (public key) Encryption (RSA)(RSA)
Classical Crypto By: Luong-Sorin VA, IMIT Dith Nimol, IMIT.
Part 9, Basic Cryptography 1. Introduction A cryptosystem is a tuple: ( M,K,C, E,D) where M is the set of plaintexts K the set of keys C the set of ciphertexts.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Security.
Traditional Symmetric-Key Ciphers
Lecture 2: Introduction to Cryptography
Cryptography 1 Crypto Cryptography 2 Crypto  Cryptology  The art and science of making and breaking “secret codes”  Cryptography  making “secret.
15-499Page :Algorithms and Applications Cryptography I – Introduction – Terminology – Some primitives – Some protocols.
Lecture 23 Symmetric Encryption
K. Salah1 Cryptography Module I. K. Salah2 Cryptographic Protocols  Messages should be transmitted to destination  Only the recipient should see it.
Intro to Cryptography Lesson Introduction
CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (2) Information Security.
EEC 688/788 Secure and Dependable Computing Lecture 3 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
CPIS 312 Chapter Two: Classic Cryptography By Dr. Daniyal Alghazzawi 2011 Term 2.
Chapter Two: Classic Cryptography
Computer Security By Rubel Biswas. Introduction History Terms & Definitions Symmetric and Asymmetric Attacks on Cryptosystems Outline.
Department of Computer Science Chapter 5 Introduction to Cryptography Semester 1.
CS480 Cryptography and Information Security Huiping Guo Department of Computer Science California State University, Los Angeles 4. Traditional and Modern.
3.1 Chapter 3 Traditional Symmetric-Key Ciphers Part2.
Chapter 2 Basic Encryption and Decryption
Data Security B. R. Chandavarkar Asst. Prof., CSE Dept., NITK, Surathkal. brc.nitk.ac.in.
Chapter 30 Cryptography Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Cryptography.
مروري برالگوريتمهاي رمز متقارن(كليد پنهان)
PART VII Security.
Introduction to Symmetric-key and Public-key Cryptography
Unit 2: Cryptography & Cryptographic Algorithm
Secret-Key Encryption
Presentation transcript:

1 Introduction to Cryptography Chapter-4

Definitions  Cryptography = the science (art) of encryption  Cryptanalysis = the science (art) of breaking encryption  Cryptology = cryptography + cryptanalysis

Cryptography Goals  Encryption – Prevent Eve from intercepting message  Authentication – Prevent Eve from impersonating Alice AliceBob Eve Insecure Channel

Cryptosystems A. Ciphers B. Classic B.1 Substitution e.g., Caesar Cipher B.2 Transposition e.g., Route Cipher B.3 Hybrid C. Modern C.1 Symmetric (Private Key) Stream Cipher e.g., RC4, A5/1 Block Cipher e.g., DES, AES C.2 Asymmetric (Public Key) e.g., RSA C.3 Hybrid

A. Terminology  Cryptology is the art and science of making and breaking “secret codes.”  Cryptography is the making of “secret codes.”  Cryptanalysis is the breaking of “secret codes.”  Crypto is a synonym for any or all of the above (and more).  Cipher ( صفر ) is an algorithm for performing encryption and decryption — a series of well-defined steps that can be followed as a procedure. 5

Terminology  Encryption is the process of encoding a message so that its meaning is not obvious  Equivalent terms: encode, encipher  Decryption is the reverse process, transforming an encrypted message back into its normal, original form  Equivalent terms: decode, decipher Plaintext Ciphertext Encrypt Decrypt 6

Substitution Ciphers Tap Code  Each letter is replaced by a number of beeps 7

8 Substitution Cipher Pigpen Cipher  Each letter is replaced by an art

Substitution Ciphers Vigenère Cipher  Polyalphabetic ciphers flatten the frequency distribution of the plaintext considerably.  Vigenère Cipher is an example of polyalphabetic ciphers - use different monoalphabetic substitutions as one proceeds through the plaintext message.  For example: Plaintext (M)meet me at ten Key (K)badb ad ba dba Ciphertext(C)nehu mh bt wfn where C = M+K mod 26 9

Plaintext (M)= Y 24 Key (K) = T 19 Ciphertext(C) 24+19=43 43 mod 26  43 – 26 = 17 ( R )

B.2. Transposition Ciphers  Transposition cipher – reorders (rearrange) symbols but does not disguise them. It is also called permutation  With transposition, the cryptography aims for diffusion  Widely spreading the information from the message or the key across the ciphertext  Transpositions try to break established patterns 12

Transposition Ciphers Route Cipher 13

Transposition Ciphers Rail Fence Cipher 14

Transposition Ciphers Columnar Transposition  Plaintext written in rows  Number of columns = key length  Key is used to number the columns  Ciphertext reads out by columns, starting with column whose key letter is lowest 15

Transposition Ciphers Columnar Transposition  Plaintext (M): WE ARE DISCOVERED FLEE AT ONCE  Key (K):  Ciphertext(C): EVLNE ACDTK ESEAQ ROFOJ DEECU WIREE 16

Terminology  Encryption/decryptions algorithms often use a device called a key, so that the resulting ciphertext depends on the original plaintext message, the algorithm, and the key value  An encryption scheme that does not require the use of a key is called a keyless cipher Plaintext Ciphertext Encrypt Decrypt 17

Terminology  Plaintext: message to be encrypted  Ciphertext: encrypted message  D K (E K (P)) = P 18

Symmetric (secret) Key  Alice and Bob share a secret key, K ab  Encryption – Plaintext message is encrypted and decrypted with K ab  Authentication – Alice proves to Bob that she knows K ab (e.g. a password)

Symmetric (secret) Key Alice Bob Message “Plaintext” Encryption By “K” Encryption By “K” Ciphertext Decryption By “K” Decryption By “K” Message “Plaintext” Ciphertext

Public Key Encryption  Bob generates 2 keys, K eb and K db  Bob publishes K eb (public key)  Alice encrypts: ciphertext C = E(K eb, plaintext P)  Bob decrypts: P = D(K db, C)  It must not be possible to compute K db (private key) from K eb

Public Key Encryption Alice Bob Message “Plaintext” Encryption by Bob Public K Encryption by Bob Public K Ciphertext Decryption by private “K” Decryption by private “K” Message “Plaintext” Ciphertext It must not be possible to compute (private key) from ‘Public kay‘

Digital Signatures  Alice generates K ea and K da  Alice publishes K ea  Alice signs plaintext P: (P, S = D(K da, P))  Alice sends P, S to Bob  Bob verifies that E(K ea, S) = P (since only Alice knows K da )

Digital Signatures Alice Bob Message “Plaintext” Signe P by private “K” To get S Signe P by private “K” To get S Send (S+P) verifies by public “K” To make sure that the Message from Alice verifies by public “K” To make sure that the Message from Alice Message “Plaintext” Send (S+P)

Combining Public Key Encryption and Authentication  Alice encrypts with Bob’s public key: C = E(K eb, P)  Alice signs with her secret key: S = D(K da, C)  Alice sends S, C to Bob  Bob verifies E(K ea, C) = C  Bob decrypts: P = D(K db, C)

Combining Public Key Encryption and Authentication Alice Bob Message “Plaintext” Send (C+S) Message “Plaintext” Send (C+S) encrypts with Bob’s public “K” signs with her secret “K” C S Verifie with Alice public “K” Decrypts with his private “K”

Cryptographic Attacks  Ciphertext only: attacker has only ciphertext.  Known plaintext: attacker has plaintext and corresponding ciphertext.  Chosen plaintext: attacker can encrypt messages of his choosing.  Distinguishing attack: an attacker can distinguish your cipher from an ideal cipher (random permutation).  A cipher must be secure against all of these attacks.

Kerckhoffs’ Principle  The security of an encryption system must depend only on the key, not on the secrecy of the algorithm.  Nearly all proprietary encryption systems have been broken (Enigma, DeCSS, zipcrack).  Secure systems use published algorithms (PGP, OpenSSL, Truecrypt).

Provable Security  There is no such thing as a provably secure system.  Proof of unbreakable encryption does not prove the system is secure.  The only provably secure encryption is the one time pad: C = P + K, where K is as long as P and never reused.  Systems are believed secure only when many people try and fail to break them.

Cryptographic Algorithms  Block ciphers (secret/symmetric key)  Hashes  MAC (keyed hashes)  Diffie-Hellman key exchange  RSA (public key encryption and digital signature)  ElGamal digital signature

Block Ciphers  AES  DES  3DES  Twofish  Blowfish  Serpent  RC4  IDEA  Etc. E D Plaintext Ciphertext Key

Encryption Modes  ECB – Electronic Code Book  CBC – Cipher Block Chaining  OFB – Output Feedback  CTR – Counter

ECB Mode  C i = E(K, P i )  Insecure (ciphertext blocks may repeat) C1C1 C2C2 C3C3 C4C4 P1P1 P2P2 P3P3 P4P4 EEEE

CBC Mode  C i = E(K, P i xor C i-1 )  C 0 = IV (initialization Vector) (fixed, random, counter, or nonce)  Most popular mode PiPi + E C i-1 CiCi P i-1 IV

OFB Mode  K 0 = IV (nonce = number used once)  K i = E(K, K i-1 )  C i = P i xor K i  Not tamper resistant E PiPi + CiCi KiKi

CTR Mode  K i = E(K, nonce || i)  C i = P i xor K i  Not tamper resistant E PiPi + CiCi KiKi (nonce || i)

Block Cipher Components  S boxes – invertible lookup tables, depends on key  P boxes – reorder bits (may also depend on key)  Key schedule – function of key (e.g. bit selection or simple hash) SSSS P SSSS P Schedule One Round Key Round Key

Substitution by itself is weak

Permutation by itself is weak  But combining many rounds of substitution and permutation might build a strong cipher.

Stream Ciphers C i-1 CiCi C i+1 P i-1 PiPi P i+1 PRNG + Key XOR Pseudo Random Number Generator