Presentation is loading. Please wait.

Presentation is loading. Please wait.

Cryptography, part 2.

Similar presentations


Presentation on theme: "Cryptography, part 2."— Presentation transcript:

1 Cryptography, part 2

2 Types of Cryptography Shared secret cryptography
“Conventional” cryptography “Symmetric” cryptography Public key cryptography “Asymmetric” cryptography

3 Shared Secret Crypto secret key ciphertext plaintext plaintext
If the key is generated at the message source, then it must also be provided to the destination by means of some secure channel. A 3rd party could generate the key and securely deliver it to both source and destination. [s23] ciphertext Encryption algorithm Decryption algorithm plaintext plaintext

4 Requirements The algorithm must be strong enough that it is impractical to decrypt a message on the basis of the ciphertext alone. Shared secret crypto depends on the secrecy of the key, not the algorithm. Key security is the greatest problem in shared secret crypto (i.e., the key distribution problem).

5 Public-Key Cryptography
Based on special highly “asymmetric” mathematical functions Requires the use of two keys that are inverses of one another The basis for the digital signature

6 A Simple Example Public key Private key ciphertext plaintext plaintext
Decryption algorithm Encryption algorithm plaintext plaintext

7 Requirements Infeasible to determine the decryption key given only the algorithm and encryption key The algorithms must be powerful enough so that it is impractical to decrypt a message on the basis of the ciphertext alone.

8 Differences (1) Shared Secret Public Key
The same algorithm with the same key is used for encryption and decryption. The sender and receiver must share the same algorithm and key. Public Key One algorithm is used for encryption and decryption with a pair of keys, one for encryption and one for decryption. The send and receiver must each have one of the matching pairs of keys.

9 Differences (2) Shared Secret Public Key The key must be kept secret.
It is impossible or at least impractical to decipher a message if no other information is available. Knowledge of the algorithm plus samples of ciphertext must be insufficient to determine the key. Public Key One of the two keys must be kept secret. It is impossible or at least impractical to decipher a message if no other information is available. Knowledge of the algorithm plus one of the keys plus samples of ciphertext must be insufficient to determine the other key.

10 Foundation of PK Security
Difficulty in factoring large primes Example: 18,206,927 408,508,091 Number of possible primes (hence keys) 2048 bits (standard for RSA) = 617 digits = possible primes 1082 atoms in the universe 18313 and 22307 220 digits (729 bits) factored in 2016

11

12 One-way functions Most common functions are invertible; for any F(x) = y, there is an F-1(y) = x. Multiplication and division DES A function which is easy to compute in one direction, but hard to compute in the other, is known as a one-way function. Hashing, modular arithmetic. A one-way function that can be easily inverted with an additional piece of knowledge is called a trapdoor one-way function.

13 One-way functions Public key encryption is based on the existence of trapdoor one-way functions. Encryption with the public key is easy. Decryption is computationally hard. Knowledge of the private key opens the trapdoor, making inversion easy. Password systems also use one-way functions.

14 Overview of RSA RSA is the most common and well-known public key cryptosystem Basic notation: a key pair (e,d) contains two keys: e is the public key (used to encrypt documents) d is the private key (used to decrypt documents) M is the plaintext message. Let R be the encryption function. R(e,M) = C. R(d,C) = M. - encryption R(d,M) = C’ R(e,C’) = M - signing R(e,R(d,M)) = M = R(d,R(e,M)) Same function is used for both operations.

15 The RSA Algorithm Pick two large (100 digit) primes p and q.
Let n = pq Select a relatively small integer d that is prime to (p-1)(q-1) Find e, the multiplicative inverse of d mod (p-1)(q-1) (d,n) is the public key. To encrypt M, compute En(M) = Me(mod n) (e,n) is the private key. To decrypt C, compute De(C) = Cd(mod n)

16 Strengths of RSA No prior communication needed
Highly secure (for large enough keys) Well-understood Allows both encryption and signing

17 Weaknesses of RSA Large keys needed (1024 bits is current standard)
Relatively slow Not suitable for very large messages Public keys must still be distributed safely.

18 Security and Problem Difficulty

19 Security and Problem Difficulty
RSA-155 (512 bit asymmetric-key) broken in 1999. Estimate: capability grows by ~4.25 digits per year. (approx bits per year) 1024-bit RSA should be “secure” until 2037. Using Moore’s Law – 1024-bit is 7 million times harder than 512-bit So, we need a 7 millionX speedup to crack 1024-bit RSA with the same relative computational power. Also about 34 years. Question: How long does your data need to be secure?

20 Security Security of RSA based on difficulty of factoring
Widely believed Best known algorithm takes exponential time In 1999, 512-bit challenge factored in 4 months using 35.7 CPU-years MHz SGI and Sun 8 250 MHz SGI Origin MHz Pentium II 4 500 MHz Digital/Compaq In 2005, a team of researchers factored the RSA-640 challenge number using GHz CPU years In 2004, the prize for factoring RSA-2048 was $200,000 Estimated resources needed to factor a number within one year Length (bits) PCs Memory 430 1 128MB 760 215,000 4GB 1,020 342106 170GB 1,620 1.61015 120TB

21 Quantum Cryptography

22 Elements of the Quantum Theory
Light waves are propagated as discrete quanta called photons. They are massless and have energy, momentum and angular momentum called spin. Spin carries the polarization. If on its way we put a polarization filter a photon may pass through it or may not. We can use a detector to check of a photon has passed through a filter.

23 Heisenberg Uncertainty Principle
Certain pairs of physical properties are related in such a way that measuring one property prevents the observer from knowing the value of the other. When measuring the polarization of a photon, the choice of what direction to measure affects all subsequent measurements. If a photon passes through a vertical filter it will have the vertical orientation regardless of its initial direction of polarization.

24 Quantum Cryptography Process 1

25 Polarization by a filter
A pair of orthogonal filters such as vertical/horizontal is called a basis. A pair of bases is conjugate if the measurement in the first basis completely randomizes the measurements in the second basis. As in the previous slide example for =45deg.

26 Sender-receiver of photons
Suppose Alice uses 0-deg/90-deg polarizer sending photons to Bob. But she does not reveal which. Bob can determine photons by using filter aligned to the same basis. But if he uses 45deg/135 deg polarizer to measure the photon he will not be able to determine any information about the initial polarization of the photon. The result of his measurement will be completely random

27 Photon Polarization Tilted filter at the angle Vertical filter The probability of a photon appearing after the second filter depends on the angle and becomes 0 at = 90 degrees. The first filter randomizes the measurements of the second filter.

28 Quantum Cryptography 2

29 Eavesdropper Eve If Eve uses the filter aligned with Alice’s she can recover the original polarization of the photon. If she uses the misaligned filter she will receive no information about the photon . Also she will influence the original photon and be unable to retransmit it with the original polarization. Bob will be able to deduce Ave’s presence.

30 Quantum Cryptography 3

31 Binary information A user can suggest a key by sending a stream of randomly polarized photons. This sequence can be converted to a binary key. If the key was intercepted it could be discarded and a new stream of randomly polarized photons sent.

32 Quantum key distribution
(a)Alice communicates with Bob via a quantum channel sending him photons. (b) Then they discuss results using a public channel. (c) After getting an encryption key Bob can encrypt his messages and send them by any public channel.

33 Security of quantum key distribution
Quantum cryptography obtains its fundamental security from the fact that each qubit is carried by a single photon, and each photon will be altered as soon as it is read. This makes impossible to intercept message without being detected.

34 Noise The presence of noise can impact detecting attacks.
Eavesdropper and noise on the quantum channel are indistinguishable. (1) Malicious eavesdropper can prevent communication. (2) Detecting eavesdropper in the presence of noise is hard.


Download ppt "Cryptography, part 2."

Similar presentations


Ads by Google