1 views

Uploaded by jai jaiswal

crypto

- 20100229
- Criptare Muz
- L03 Cryptanalysis Overview
- Communication Theory of Secrecy Systems - Shannon
- Survey on Security Challenge for Data Forwarding in Cloud
- Cryptography
- A Novel Block Cipher Involving Keys in a Key Bunch
- network
- Computer
- Hummingbird Algorithm
- crv0n0-0
- 15812_CSE403T Term Paper Topic11
- 200507-1
- Zig Zag Cryptography
- 2. Management-Text Hiding Using RSA and BLOWFISH Algorithms With HLSB Technique-G.annapurna
- Metodos de Sistemas de Criptoanálisis
- An Overview of Cryptography
- Key-Aggregate Cryptosystem for Scalable Data Sharing in Cloud Storage
- Hf 2513081311
- sg248249_IBMi7.2

You are on page 1of 37

CS 701

SK Hafizul Islam

hafi786@gmail.com

Department of CSE

IIIT Kalyani

10 July 2018 CS 701 1

Symmetric Encryption

• Conventional / private-key / single-key

• Sender and recipient share a common key

• All classical encryption algorithms are private-key

• Was only type prior to invention of public-key in 1970’s

Some Basic Terminology

• plaintext - original message

• ciphertext - coded message

• cipher - algorithm for transforming plaintext to ciphertext

• key - info used in cipher known only to sender/receiver

• encipher (encrypt) - converting plaintext to ciphertext

• decipher (decrypt) - recovering ciphertext from plaintext

Symmetric Cipher Model

Requirements

• Two requirements for secure use of symmetric encryption:

– a strong encryption algorithm

– a secret key known only to both sender and receiver

• Mathematically,

Y = EK(X)

X = DK(Y)

• assume encryption algorithm is known

• implies a secure channel to distribute key

Cryptography

• Systems are characterized along three independent dimensions:

– type of encryption operations used

• substitution / transposition / product

– number of keys used

• single-key or private / two-key or public

– way in which plaintext is processed

• block / stream

Cryptanalysis

• objective to recover key not just message

• general approaches:

– Cryptanalytic attack: Cryptanalytic attacks rely on the nature of

the algorithm plus perhaps some knowledge of the general

characteristics of the plaintext or even some sample plaintext –

ciphertext pairs. This type of attack exploits the characteristics

of the algorithm to attempt to deduce a specific plaintext or to

deduce the key being used.

– Brute-force attack: The attacker tries every possible key on a

piece of ciphertext until an intelligible translation into plaintext

is obtained. On average, half of all possible keys must be tried

to achieve success.

10 July 2018 CS 701 7

Cryptanalytic Attacks

• ciphertext only

• known plaintext

• chosen plaintext

• chosen ciphertext

Ciphertext only attacks

• Only know algorithm & ciphertext, is statistical, know or can

identify plaintext

– Brute-Force attack

– Statistical attack

– Pattern attack

Known plaintext attacks

• know/suspect plaintext & ciphertext

Chosen plaintext attacks

• Select plaintext and obtain ciphertext

Chosen ciphertext attacks

• Select ciphertext and obtain plaintext

More Definitions

• unconditional security

– no matter how much computer power or time is available, the

cipher cannot be broken since the ciphertext provides

insufficient information to uniquely determine the

corresponding plaintext

• computational security

– given limited computing resources (e.g., time needed for

calculations is greater than age of universe), the cipher cannot

be broken

Brute Force Search

• always possible to simply try every key

• most basic attack, proportional to key size

• assume either know / recognise plaintext

Key Size (bits) Number of Alternative Time required at 1 Time required at 106

Keys decryption/µs decryptions/µs

128 2128 = 3.4 1038 2127 µs = 5.4 1024 years 5.4 1018 years

168 2168 = 3.7 1050 2167 µs = 5.9 1036 years 5.9 1030 years

26 characters 26! = 4 1026 2 1026 µs = 6.4 1012 years 6.4 106 years

(permutation)

Classical Substitution Ciphers

• Letters of plaintext are replaced by 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.

• Substitution ciphers can be categorized as either monoalphabetic

ciphers or polyalphabetic ciphers.

Additive/shift/Caesar Cipher

• earliest known substitution cipher

• by Julius Caesar

• first attested use in military affairs

• replaces each letter by 3rd letter on

• example:

meet me after the toga party

PHHW PH DIWHU WKH WRJD SDUWB

Caesar Cipher

• can define transformation as:

abcdefghijklmnopqrstuvwxyz

DEFGHIJKLMNOPQRSTUVWXYZABC

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

c = E(p) = (p + k) mod (26)

p = D(c) = (c – k) mod (26)

Example of Caesar Cipher

Use the additive cipher with key = 15 to encrypt the

message “hello”.

Solution:

We apply the encryption algorithm to the plaintext,

character by character:

18

10 July 2018 CS 701

Example of Caesar Cipher...

Use the additive cipher with key = 15 to decrypt the

message “WTAAD”.

Solution:

We apply the decryption algorithm to the plaintext

character by character:

19

10 July 2018 CS 701

Cryptanalysis of Caesar Cipher

• only have 26 possible ciphers

– A maps to A,B,..Z

• could simply try each in turn

• a brute force search

• given ciphertext, just try all shifts of letters

• do need to recognize when have plaintext

• eg. break ciphertext "GCUA VQ DTGCM"

Cryptanalysis of Caesar Cipher...

Eve has intercepted the ciphertext “UVACLYFZLJBYL”. Show

how she can use a brute-force attack to break the cipher.

Solution:

Eve tries keys from 1 to 7. With a key of 7, the plaintext is

“not very secure”, which makes sense.

21

10 July 2018 CS 701

Language Redundancy and Cryptanalysis

• human languages are redundant

• letters are not equally commonly used

• in English E is by far the most common letter

– followed by T, R, N, I, O, A, S

• other letters like Z, J, K, Q, X are fairly rare

• have tables of single, double & triple letter frequencies

for various languages

https://www.tandfonline.com/doi/abs/10.1080/0161-117991854133

English Letter Frequencies

Use in Cryptanalysis

• key concept - monoalphabetic substitution ciphers do not

change relative letter frequencies

• discovered by Arabian scientists in 9th century

• calculate letter frequencies for ciphertext

• compare counts/plots against known values

Example Cryptanalysis

• given ciphertext:

UZQSOVUOHXMOPVGPOZPEVSGZWSZOPFPESXUDBMETSXAIZVUEPHZHMDZSHZOW

SFPAPPDTSVPQUZWYMXUZUHSXEPYEPOPDZSZUFPOMBZWPFUPZHMDJUDTMOHMQ

• count relative letter frequencies (see text)

• guess P & Z are e and t

• guess ZW is th and hence ZWP is the

• proceeding with trial and error finally get:

it was disclosed yesterday that several informal but

direct contacts have been made with political

representatives of the viet cong in moscow

Multiplicative Cipher

(C) are integers in Z26; the key is an integer in Z26*.

26

10 July 2018 CS 701

Example of Multiplicative Cipher

What is the key domain for any multiplicative cipher?

Solution

The key needs to be in Z26*. This set has only 12 members: 1, 3, 5, 7,

9, 11, 15, 17, 19, 21, 23, 25.

key of k=7. The ciphertext is “XCZZU”.

27

10 July 2018 CS 701

Affine Cipher

28

10 July 2018 CS 701

Example of Affine Cipher

The affine cipher uses a pair of keys (k1, k2) in which the

first key is from Z26* and the second is from Z26. The size of

the key domain is (26 × 12) = 312.

the key pair (7, 2).

29

10 July 2018 CS 701

Example of Affine Cipher…

Use the affine cipher to decrypt the message “ZEBBW” with

the key pair (7, 2) in modulus 26.

Solution

which k1 = 1. The multiplicative cipher is a special case of

affine cipher in which k2 = 0.

30

10 July 2018 CS 701

Frequency analysis of Affine Cipher

31

10 July 2018 CS 701

Frequency analysis of Affine Cipher…

32

10 July 2018 CS 701

Frequency analysis of Affine Cipher…

• There are only 57 characters of ciphertext.

• The most frequent ciphertext characters are: R(8 times), D(7

times), E, H, K (5 times) and F, S, V (4 times).

• First guess, R is the encryption of e and D is the encryption of t,

since e and t are most common letters.

• We have EK(4)=17 and EK(19)=3. Thus, 4K1+K2=17 and 19K1+K2=3

33

10 July 2018 CS 701

Frequency analysis of Affine Cipher…

• Unique solution of 4K1+K2=17 and 19K1+K2=3 is K1=6, K2=19. Since

gcd(K1, 26)=2>1. So the hypothesis is incorrect.

• Second guess, R is the encryption of e and E is the encryption of t.

• We have EK(4)=17 and EK(19)=4. Thus, 4K1+K2=17 and 19K1+K2=4

• It leads K1=13, Since gcd(K1, 26)=2>1. So the hypothesis is

incorrect.

34

10 July 2018 CS 701

Frequency analysis of Affine Cipher…

• Third guess, R is the encryption of e and H is the encryption of t.

• We have EK(4)=17 and EK(19)=7. Thus, 4K1+K2=17 and 19K1+K2=7

• It leads K1=8, Since gcd(K1, 26)=2>1. So the hypothesis is incorrect.

35

10 July 2018 CS 701

Frequency analysis of Affine Cipher…

• Continuing, we suppose that, R is the encryption of e and K is the

encryption of t.

• We have EK(4)=17 and EK(19)=10. Thus, 4K1+K2=17 and 19K1+K2=10

• It leads K1=3, K2=5, Since gcd(K1, 26)=1.

• The key K = (3, 5) gives a meaningful plaintext: “algorithms are

quite general definitions of arithmetic processes”

36

10 July 2018 CS 701

Thank You

- 20100229Uploaded bySukhvinder Deora
- Criptare MuzUploaded byIoana Pînzariu
- L03 Cryptanalysis OverviewUploaded byashokatmellon
- Communication Theory of Secrecy Systems - ShannonUploaded byMiguel Liceaga
- Survey on Security Challenge for Data Forwarding in CloudUploaded byIjsrnet Editorial
- CryptographyUploaded byrishi
- A Novel Block Cipher Involving Keys in a Key BunchUploaded byInternational Journal of Research in Engineering and Technology
- networkUploaded byaniezahid
- ComputerUploaded byTemitayo Oyin
- Hummingbird AlgorithmUploaded byPavankumar Chandra Sekhar Upadrasta
- crv0n0-0Uploaded bypostscript
- 15812_CSE403T Term Paper Topic11Uploaded byAnish Shah
- 200507-1Uploaded byapi-3844475
- Zig Zag CryptographyUploaded byAndysah Putra Utama Siahaan
- 2. Management-Text Hiding Using RSA and BLOWFISH Algorithms With HLSB Technique-G.annapurnaUploaded byBESTJournals
- Metodos de Sistemas de CriptoanálisisUploaded byZosemu Bot
- An Overview of CryptographyUploaded bySantanu Manna
- Key-Aggregate Cryptosystem for Scalable Data Sharing in Cloud StorageUploaded byNarendra Babu
- Hf 2513081311Uploaded byAnonymous 7VPPkWS8O
- sg248249_IBMi7.2Uploaded byAjay Kumar Akurathi
- Handout Csi4138 Ecc 2002Uploaded bySalman Habib
- Twofish Analysis ShihoUploaded byOnet GB
- nsUploaded byArjun Choudhary
- Decentralized Polling With Respectable Participants - Guerraoui_etal - 2012Uploaded byvladiprocop
- csqzas04Uploaded byLAXMIKANTH24
- Information Security Lecture2 Encryption Part2Uploaded bymeme99mimo
- Location Based Encryption Using Message Authentication Code in Mobile NetworksUploaded byeditor_ijcat
- sahil rUploaded byAnamika Joshi
- Application of Elliptical Curve Cryptography in Empowering Cloud Data SecurityUploaded byEditor IJRITCC
- OWASP MASVS Spain Nov 17Uploaded bybetosec

- ComplaintUploaded byRuchie Etolle
- RualesArchjonCElawsmidtermpenaltycodeUploaded byLester Bugos
- case study 2- ECHRUploaded bySusy Varghese
- 44132382-People-vs-Pimentel-Case-Digest.pdfUploaded byAlfredo C. Navarro Jr.
- Washingtonblade.com, Volume 45, Issue 3, January 17, 2014Uploaded byBlade
- Cyber CareUploaded byBCruz67
- BarBri - Class 01Uploaded bySean Chiwawa
- 1bUploaded byapi-306687159
- The complete sherlock homes.pdfUploaded byMRMAKBAR
- Rule 114 CasesUploaded byEa Gabot
- JoyUploaded byAbhishek Nandi
- 21 creba v sec darUploaded byMil Lorono
- d41586-018-05029-9Uploaded byDarkoPolšek
- Taxi Driver Shot by Shot AnalysisUploaded bymattsaracusa
- Moorestown_1113Uploaded byelauwit
- MRTU & PULPUploaded byvrj1091
- Kidnapping Mikheev Case Interrogation of KLUEV EngUploaded byrussianuntouchables
- INDECT_Deliverable_D8.1_v20120116Uploaded byResearch Guy
- Some Psychological Aspects of Sexual PromiscuityUploaded byrentedtrappings
- BOYDSTON, et al v . BOMBARDIER AEROSPACE, et al Motion for AbeyanceUploaded bybombardierwatch
- WDR15_Chapter_2 (1).pdfUploaded bydessalegn Guluma
- People vs. ClaraUploaded byGem Martle Pacson
- abortionroughdraftUploaded byapi-356697350
- LCA LINES | Volume II, Issue No. 12Uploaded byHoward Chan
- Sunni Deobandi-Shi`i Sectarian Violence in Pakistan: Explaining the Resurgence Since 2007Uploaded byArif Rafiq
- Press Release Regarding Subpeona of Mayor for TrialUploaded byandoatnp
- 03. the Security Monitoring and Attack Detection Planning GuideUploaded byfl050
- Young v. Reed Elsevier, Inc. et al - Document No. 43Uploaded byJustia.com
- Edmondson 8-9-17Uploaded byPrice Lang
- The SloganUploaded byMananJain