87
CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY Badran Awad Computer Department Palestine Technical college

CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Embed Size (px)

Citation preview

Page 1: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

CHAPTER 1INTRODUCTION TO CRYPTOGRAPHY

Badran Awad

Computer Department

Palestine Technical college

Page 2: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

CHAPTER 1

• Introduction

• Historical ciphers

• Information theoretic security

• Computational security

• Cryptanalysis techniques

• Security of Algorithms

Page 3: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

INTRODUCTION

• Who has used cryptography?• Within the last 10 minutes

• Today?

• In your whole life?

Page 4: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter
Page 5: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter
Page 6: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter
Page 7: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Cryptography: Multi-Disciplinary

Page 8: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Cryptography: Multi-Disciplinary

Algebraic Geometry

Probability

Coding Theory

Security

Complexity

Engineering

Number Theory

Page 9: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Algebraic Geometry

Probability

Coding Theory

Security

Complexity

Engineering

Number Theory

Cryptography: Multi-Disciplinary

Page 10: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

What is cryptography about?

• Adversary: a clever person with powerful computer

• Main goals:• Data privacy.

• Data integrity.

Page 11: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Data Privacy

• Adversary: does not learn any information about m.

• Example: m is a credit-card number sent to Bob, we want to make a sure Adversary does not learn it.

Page 12: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Data Integrity

• Goal:• m really comes from Alice

• m has not modified in transit

Page 13: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Ideal World

• Kryptonite pipe: cannot see inside or alter content.

• All our goals would be achieved.• But: hard to implement in practice.

Kryptonite pipe

Page 14: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Cryptography!!!

Page 15: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Cryptographic Schemes

• Enc: encryption algorithm.• Dec: decryption algorithm• Ke: encryption key• Kd: decryption key

Page 16: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Cryptographic Schemes

• Cryptographer goals:• How to define security goals?

• How to define Enc, Dec?

• How to gain confidence that Enc, Dec achieve goals?

Page 17: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Encryption Schemes

Page 18: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Encryption Schemes

Page 19: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Encryption Schemes

Page 20: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Encryption Schemes

Page 21: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Encryption Schemes

Page 22: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Encryption Schemes

Page 23: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Encryption Schemes

Page 24: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Provable security

Page 25: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Provable security

Page 26: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Provable security

Page 27: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Provable security – the motivation

Page 28: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Provable security – the motivation

Page 29: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Provable security – the motivation

Page 30: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Provable security – the motivation

Page 31: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Provable security – the motivation

Page 32: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Provable security – the motivation

Page 33: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Kirchhoff's principle

Page 34: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Kirchhoff's principle

Page 35: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

A more refined picture

Page 36: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

A more refined picture

Page 37: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

A more refined picture

Page 38: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Kirchhoff's principle

Page 39: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Kirchhoff's principle

Page 40: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Kirchhoff's principle

Page 41: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Kirchhoff's principle obscurity

Page 42: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

A more mathematical view

Page 43: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

A more mathematical view

Page 44: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

A more mathematical view

Page 45: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

A more mathematical view

Page 46: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

A more mathematical view - refined

Page 47: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Shift Cipher

Page 48: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Shift Cipher

Page 49: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Security of the shift cipher

Page 50: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Security of the shift cipher

Page 51: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Security of the shift cipher

Page 52: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Substitution Cipher

Page 53: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Substitution Cipher

Page 54: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Substitution Cipher

Page 55: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

How to break the substitution cipher?

• First successful formal attack on ciphers was

established by Al-Kindi (801-873).

• It was probably religiously motivated textual

analysis of the Qur'an which led to the

invention of the frequency analysis technique

for breaking monoalphabetic substitution

ciphers by al-Kindi sometime around AD 800.

Page 56: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

How to break the substitution cipher?

• Brute force attack: 26! ≈ 1026

• Use statistical patterns of the language.

• For example: the frequency tables

• Texts of 50 characters can be usually be

broken this way.

• Look at the example from the textbook.

Page 57: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Other famous historical cipher

Page 58: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

The Vigenere Cipher (Polyalphabetic)

• The Vigenere Cipher (Polyalphabetic)

• It uses 2 or more cipher alphabets, switching

between them during encryption, thereby

confusing potential cryptanalysis. Able to

produce different cipher for same alphabet.

• The Vigenere square can be used for

encryption and decryption.

Blaise de Vigenere(1523 ‐ 1596)

Leon Battista Alberti(1404 - 1472)

Page 59: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

The Vigenere Cipher

• First one choose akeyword, exampleLEMON.

• Then one writes it overand over again on theplaintext.

PLAINTEXT: ATTACKATDAWN

KEYWORD: LEMONLEMONLE

CIPHERTEXT: LXFOPVEFRNHR

Page 60: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

The Vigenere Cipher

• So, is it still secure????• No. In 1854 Charles Babbage developed a test that

succeeded to attack this cipher.

• In 1863 Friedrich Kasiski was the first to publish asuccessful attack on the Vigenere cipher.

• The primary weakness of the Vigenere cipher is therepeating nature of its key.

• This cipher was secure from about 1553 till 1854(301 years!!!)

• What’s next????

Page 61: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

The Enigma machine.

Page 62: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

The Enigma machine.

Page 63: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

The Enigma machine.

Page 64: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Exercises

• Write a program that can encrypt and decrypt using the general Caesar cipher.

• Write a program that can perform a letter frequency attack on an additive cipher without human intervention. Your software should produce possible plaintexts in rough order of likelihood. It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts.”

• Write a program that can perform a letter frequency attack on any mono-alphabetic substitution cipher without human intervention. Your software should produce possible plaintexts in rough order of likelihood. It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts.”

Page 65: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

How to define security of an encryption scheme?

Page 66: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

How to define security of an encryption scheme?

Page 67: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

How to define security of an encryption scheme?

Page 68: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

How to define security of an encryption scheme?

Page 69: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Idea 1

Page 70: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Idea 1

Page 71: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Idea 2

Page 72: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Idea 2

Page 73: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Idea 3

Page 74: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Idea 3

Page 75: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Idea 4

Page 76: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Idea 4

Page 77: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

How to formalize the “Idea 4”?

Page 78: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

What does it mean to achieve secure encryption?

• Adversary cannot find the secret key.

• Adversary cannot find plaintext corresponding to ciphertext.

• Adversary cannot determine any character of plaintext that

corresponds to the ciphertext.

• Adversary cannot determine any meaningful information about

plaintext from ciphertext.

• Adversary cannot compute any function of plaintext from

ciphertext.

Page 79: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Cryptographic goals

• Confidentiality – to keep the content of information

from al but those who are authorized to have them.

• Data integrity – to be able to detect alteration of data.

• Authentication – to be able to identify entities in

communication.

• Non-repudiation – to prevent an entity from denying

previous commitments or actions.

Page 80: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Types of attacks (cryptanalysis techniques)

1. Ciphertext only attack• The cryptanalyst has the ciphertext of several messages,

which are encrypted using the same algorithm. Thecryptanalyst job is to:• Deduce the plaintext

• Or better deduce the key used to encrypt the message in orderto decrypt other messages encrypted with the same keys.

• That is,

Given : 𝐶1 = 𝐸𝑘 𝑃1 , 𝐶2 = 𝐸𝑘 𝑃2 , … , 𝐶𝑖 = 𝐸𝑘(𝑃𝑖)

Deduce : 𝑃1, 𝑃2, … , 𝑃𝑖 𝑜𝑟 𝑘

Page 81: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Types of attacks (cryptanalysis techniques)

2. Known plaintext attack

• The cryptanalyst has access to not only the ciphertext of several

messages, but also to the plaintext of those messages. The cryptanalyst

job is to:

• Deduce the key(s) used to encrypt the messages.

• Deduce the algorithm to decrypt any new messages encrypted with the same

key (from step (a))

• That is,

Given: 𝑃1, 𝐶1 = 𝐸𝑘 𝑃1 , … , 𝑃𝑖, 𝐶𝑖 = 𝐸𝑘(𝑃𝑖)

Deduce : Either k or an algorithm to infer 𝑃𝑖 + 1 from

𝐶𝑖 + 1 = 𝐸𝑘(𝑃𝑖+ 1)

Page 82: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Types of attacks (cryptanalysis techniques)

3. Chosen plaintext attack• The cryptanalyst not only has access to the ciphertext and

associated plaintext for several messages, but he alsochooses the plaintext to be encrypted. The cryptanalystjob is to:• Deduce the key(s) used to encrypt the messages• Deduce the algorithm to decrypt any new messages encrypted

with the same key (from step (a))• That is,Given: 𝑃1, 𝐶1 = 𝐸𝑘 𝑃1 , … , 𝑃𝑖, 𝐶𝑖 = 𝐸𝑘 𝑃𝑖 Where the cryptanalystgets to choose 𝑃1, 𝑃2, … , 𝑃𝑖

Deduce: Either k or an algorithm to infer 𝑃𝑖 + 1 from𝐶𝑖 + 1 = 𝐸𝑘(𝑃𝑖

+ 1)

Page 83: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Types of attacks (cryptanalysis techniques)

4. Chosen ciphertext attack

• The cryptanalyst can choose different ciphertext to be

decrypted and has access to the decrypted plaintext.

The cryptanalyst job is to:

• Deduce the key

• That is,

Given : 𝐶1, 𝑃1 = 𝐷𝑘 𝐶1 , … , 𝐶𝑖, 𝑃𝑖 = 𝐷𝑘(𝐶𝑖)

Deduce : 𝑘

Page 84: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Types of attacks (cryptanalysis techniques)

5. Chosen key attack

• The cryptanalyst has SOME knowledge about the relationship

between different keys. Not practical.

6. Brute force attack

• The cryptanalyst will try every possible key one-by-one and

checking whether the resulting plaintext is meaningful.

7. Rubber hose attack

• Torture, blackmail etc.

Page 85: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Security of Algorithms

• Different algorithms offer different degrees of security.

• Cost to break algorithm > value of data (SAFE)

• Time to break algorithm > time encrypted data must

remain secret (SAFE)

• Amount of data encrypted with a single key < amount of

data necessary to break the algorithm (SAFE)

Page 86: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Complexity of an attack

• One can measure the complexity of an attack in

different ways:

• Data complexity: The amount of data needed as input to

the attack.

• Processing complexity: The time needed to perform the

attack. Also known as work factor.

• Storage requirements: The amount of memory needed to

do the attack.

Page 87: CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY - … · It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts. ... can perform a letter

Exercises

• Read about ‘The Wassenaar Arrangement andInternational Traffic in Arms Regulation (ITAR) then answerthese questions.• Has it always been legal for American to teach cryptography outside

of US? And Why?• Give me a Case Study.

• From regulations mentioned in question 1, what is themaximum key length allowed to be embedded on exportedcryptography machine?

• What is the minimum key length for a cryptography systemsto be secure if based on the Discrete Log Problem?

• Solve the exercises at the end of chapter 1.