1 of 54

QKD = Quantum Key Distribution

Alice Flarend, Bellwood-Antis High School

Bob Hilborn, University of Maryland

SLIDESMANIA.COM

SLIDESMANIA.COM

2 of 54

Agenda

  • What is cryptography?
  • Current methods- RSA
  • Breaking RSA with Shor
  • Quantum cryptography BB84

SLIDESMANIA.COM

SLIDESMANIA.COM

3 of 54

News Alert:

Quantum Computers can break internet security

SLIDESMANIA.COM

4 of 54

What is Cryptography

Image: https://bjc.edc.org/Aug2016/bjc-r/cur/programming/3-lists/6-encryption/2-secret-keys.html?topic=nyc_bjc%2F3-lists.topic&course=bjc4nyc.html&novideo&noassignment

SLIDESMANIA.COM

SLIDESMANIA.COM

5 of 54

Engage: Cryptograms – examples of cryptography

https://www.word-game-world.com/easy-cryptograms.html

Try to solve this riddle about weather:

CIPHER:

ANLE VK L EJOXLGJ'K PLZJOVEM ULQM?

EAVKEMO

KEY Hint: A = W E = T

SLIDESMANIA.COM

6 of 54

Discuss: What was your strategy for solving these?�

SLIDESMANIA.COM

7 of 54

How to break a cipher - frequency analysis

Frequency of letters in English

There’s a PATTERN!!

SLIDESMANIA.COM

8 of 54

Historical Connection: Enigma machine from WWII

  • Allies broke both German and Japanese codes
    • helped with Midway battle that turned the tide of the Pacific War
    • helped with D-Day
  • How did the allies get the key? Many different ways
  • Traffic Analysis: https://www.youtube.com/watch?v=mXZNayEPFKc      

There was a PATTERN!!

SLIDESMANIA.COM

9 of 54

Traditional Cryptography�The KEY is the key to breaking the cipher

SLIDESMANIA.COM

10 of 54

RSA Cryptography

Riverst, Shamir, and Adleman – 1977

A purely classical algorithm – no quantum

SLIDESMANIA.COM

11 of 54

RSA

Alice and Bob set up an encryption code that they make public. (public encryption, asymmetric code – one code used for encryption, another code for unencryption)

They keep private some additional information that is needed to unencrypt a message.

SLIDESMANIA.COM

12 of 54

Number Theory (Positive Integers)

Prime Numbers

A number is a prime number if it is evenly divisible only by 1 and the number itself.

Which of the following numbers are prime?

SLIDESMANIA.COM

13 of 54

Number Theory (Positive Integers)

Prime Factors

Create a number that is the product of two prime numbers: N = pq.

The Fundamental Theorem of Arithmetic asserts that those prime factors are unique.

Greatest Common Divisor

What are the prime factors of 77?

GCD of 15 and 12?

GCD of 14 and 15?

SLIDESMANIA.COM

14 of 54

Number Theory (Positive Integers)

Cryptography

Use two relatively large prime numbers to create a product that is a very large number.

Use that number and its prime factors to create cryptographic scheme that is difficult to break.

SLIDESMANIA.COM

15 of 54

Number Theory (Positive Integers)

The mod function

quotient

remainder

divisor

dividend

What time is it?

SLIDESMANIA.COM

16 of 54

Mod Examples

SLIDESMANIA.COM

17 of 54

Modular Exponentiation

What does this look like as a function of b?

SLIDESMANIA.COM

18 of 54

Modular Exponentiation

What is r for this example?

a = 5

On the web:

Power Mod Calculator

Modular Exponentiation Calculator

SLIDESMANIA.COM

19 of 54

RSA Algorithm

  1. Alice creates large number N = pq, where p and q are the prime factors of N.

  • Alice creates encryption key K < N and assures that K has no common factors (other than 1) with (p-1)(q-1). She sends K and N to Bob but keeps p and q secret.

  • Bob has message m (expressed as an integer) to send to Alice. He uses m, K and N to calculate

and sends c to Alice.

  1. Alice has calculated another integer d such that

  • To decode the message. Alice solves

Modular Inverse

Mod Expon.

Mod Expon.

GCD(K,y) in Excel

SLIDESMANIA.COM

20 of 54

RSA Algorithm Example

  1. Alice creates large number N = pq, where p and q are the prime factors of N.

  • Alice creates encryption key K < N and assures that K has no common factors (other than 1) with (p-1)(q-1). She sends K and N to Bob but keeps p and q secret.

  • Bob has message m (expressed as an integer) to send to Alice. He uses m, K and N to calculate

and sends c to Alice. Bob chooses m = 73.

  1. Alice has calculated another integer d such that

K and (p-1)(q-1) must be “co-prime.”

  1. To decode the message. Alice solves

Modular exponentiation

The Modular Inverse

(Extended Euclid method)

Modular exponentiation

Greatest common divisor

(Euclid method)

SLIDESMANIA.COM

21 of 54

RSA Cryptography

To crack the RSA encryption, you would need to find the prime factors of N =pq.

For large N (more than 1000 bits), impossible to do in a reasonable amount of time with traditional computers.

The Shor algorithm shows how to use some quantum “tricks” to find those factors.

SLIDESMANIA.COM

22 of 54

The Shor Algorithm

How to use the properties of quantum states to find the prime factors of large numbers. Once you know those prime factors, you can unencrypt the coded messages.

Set b = 0

If you can find the period r, then you get p and q.

How to find the period: Quantum Fourier Transform makes use of superposition to speed up finding the period.

If r is even

SLIDESMANIA.COM

23 of 54

The Shor Algorithm

If the Shor Algorithm can be implemented with enough qubits, then encryption codes which depend on knowing prime factors will be vulnerable.

Better idea: Devise a way to detect if anyone has been eavesdropping on your communications channel.

SLIDESMANIA.COM

24 of 54

Quantum Cryptography with polarized photons

SLIDESMANIA.COM

25 of 54

Picket Fence Analogy:

Wave Model

But what about polarization at an angle?

SLIDESMANIA.COM

26 of 54

Classical Explanation – Vector Components

https://www.sciencefacts.net/malus-law.html

http://www.physicshandbook.com/laws/maluslaw.htm

I = Io cos θ

SLIDESMANIA.COM

27 of 54

Light Polarization can also be explained using Quantum and Photons!

SLIDESMANIA.COM

28 of 54

Quickest introduction to quantum mechanics EVER Thanks to IQC

  • RULE 1 – Quantum superposition principle: A quantum object can be in multiple states at once = superposition

  • RULE 2 – Quantum measurement principle: The act of measuring a quantum state will collapse the superposition and may change the state.

If a particle can be “here” or “there”…

quantum physics allows it to be “here” AND “there

AND

Rule #1 works… as long as you don’t look!

If you measure it, you can change it

OR

SLIDESMANIA.COM

29 of 54

Rule #1 Superposition BEFORE measurement

  • Because the photon does not match the 45°polarizer before reaching it, the photon is in a superposition of both + 45 ° and – 45 °.
  • Whether it passes through will be determined probabilistically

SLIDESMANIA.COM

30 of 54

Rule #2 Measurement

  • After it reaches the 45 °polarizer, the photon is in a definite state of either matching the polarizer OR being absorbed

SLIDESMANIA.COM

31 of 54

Photons & Polarizers https://quantumatlas.umd.edu/entry/measuring-polarization/�Superposition depends on measurement basis

SLIDESMANIA.COM

32 of 54

Sending a message with binary using polarized photons

What if basis and photon do not match? Ex with + basis SUPERPOSITION

Randomly (flip a coin) determine bit

SLIDESMANIA.COM

33 of 54

BB84 Protocol with polarized photons

SLIDESMANIA.COM

SLIDESMANIA.COM

34 of 54

St. Andrews QuVis site

SLIDESMANIA.COM

35 of 54

WHY do Alice & Bob only keep the bits where the basis is the same?

  • Hint: What are the answers if you measure

with a + basis versus a X basis.

Can you explain using a

Golden Rule?

Rule #1

Superposition

A photon can behave�as if it is both

“here” AND “there”

Rule #2

Measurement uncertainty

When asked, the photon will be found either “here” OR “there”

SLIDESMANIA.COM

36 of 54

Why is the key made only when preparation and measurement basis are the same?

  • No superposition = same result every time

SLIDESMANIA.COM

37 of 54

Steps for quantum cryptography

37

Alice chooses bits for key

Bob chooses basis to measure Alice’s photons

Alice chooses basis to encode bits

Alice generates photons using bits and basis

Detector generates bits for Bob from Alice’s photons & Bob’s basis

Alice & Bob compare basis and keep only those bits where they match as the key

SLIDESMANIA.COM

38 of 54

Try it with spreadsheets��Player chooses first ten then the next 90 are generated randomly

SLIDESMANIA.COM

39 of 54

Alice Chooses Bits, Base and generates photons��https://bit.ly/OPTYCSQKD

SLIDESMANIA.COM

40 of 54

Bob chooses measuring Bases

SLIDESMANIA.COM

41 of 54

Key Generation: Alice and Bob PUBLICLY share basis

SLIDESMANIA.COM

42 of 54

Why is this unbreakable?

  • What is shared publicly?

  • Why is that the only things needed to share?
  • Is there any pattern to make it hackable?

SLIDESMANIA.COM

43 of 54

What comes next after choosing key?

Use the key & XOR to encrypt a message

Then Bob uses key and XOR to decrypt

0 0 1 0 0 0 0 1 1 1 0 0 0 0 0 0

0 0 1 0 0 0 0 1 1 1 0 0 0 0 0 0

SLIDESMANIA.COM

SLIDESMANIA.COM

44 of 54

There is another advantage

You can catch an eavesdropper

This Photo by Unknown Author is licensed under CC BY-NC-ND

SLIDESMANIA.COM

SLIDESMANIA.COM

45 of 54

Eve Intercepts the photons from Alice

  • must measure and send a photon to Bob.
  • To measure: choose a random basis
  • Photon is destroyed
  • Eve sends Bob a new photon prepared with her basis

Discuss: What if Eve’s basis is different from Alice’s?

  • What do the Golden Rules say?

SLIDESMANIA.COM

46 of 54

Golden Rule

Rule 1: Superposition Principle

  • Wave-like property
  • Exist in >1 state until measurement

Rule 2: Measurement Principle

  • Particle-like property
  • Measure it you change it
  • Cannot know everything

46

SLIDESMANIA.COM

47 of 54

Eve can change the photon

If Eve’s basis does not match Alice’s basis,

The photon is in a state of superposition

There is a 50% chance of reading a different bit

Eve will transmit a photon in her different basis

50% chance Eve will transmit a photon representing a different bit

47

SLIDESMANIA.COM

48 of 54

How is EVE caught?

Alice and Bob publicly share subset of their KEY bits and check that they match

IF they don’t match = EAVESDROPPING

Note: those shared bits are then NOT part of the key

48

SLIDESMANIA.COM

49 of 54

Overview with St. Andrews Quvis website��

SLIDESMANIA.COM

50 of 54

Detecting Eve:

50

SLIDESMANIA.COM

51 of 54

Detecting Eavesdropping -Comparing part of the key

51

Alice & Bob have the same bases

But they have different bits

someone “listened” (measured) who changed the photon

SLIDESMANIA.COM

52 of 54

Sometimes Eve gets away with it!!

52

Alice & Bob compare many bits, but still a small part of the overall key which is millions of bits

Eve is caught

Eve succeeds

SLIDESMANIA.COM

53 of 54

SLIDESMANIA.COM

54 of 54

Department of Shameless Commerce

SLIDESMANIA.COM

SLIDESMANIA.COM