Cryptography 1: Difference between revisions

From Adam Colton
Jump to navigation Jump to search
Line 92: Line 92:
G (the PRG) must be unpredictable, otherwise the whole system is insecure.
G (the PRG) must be unpredictable, otherwise the whole system is insecure.


G is predictable if ∃ efficient algorithm A that given the first i digits from a random key, make a better than even prediction (even .5 + 1/1E9) of what the next digit will be.
G is predictable if ∃ efficient algorithm A that given the first i digits (for any i) from a random key, make a better than even prediction (even .5 + 1/1E9) of what the next digit will be.
 
We consider an event at a probability of 1/2<sup>30</sup> to be non-negligible because it could happen in 1GB of data. But 1/2<sup>80</sup> is considered negligible. In formal systems (theory) negligibility is a function of the constraints of the system.


==== Real-World Stream Ciphers ====
==== Real-World Stream Ciphers ====

Revision as of 20:02, 6 January 2014

Keywords: Crypto Class Coursera Cryptogrophy

Video Lectures

Week 1 : Introduction

Overview

Crypto is everywhere. This course will cover symmetric encryption.

A cipher consists of E and D - the encryption and decryption algorithm. They should be know algorithms, not proprietary.

What is Crypto

Uses:

  • Digital signatures
  • Mix net - allows anonymous communications
  • Digital currency
  • Elections
  • Private auctions
  • Secure multi-party computation
  • Privately outsourcing computation
  • Zero knowledge: can show proof of having some piece of information without revealing the information

Theorm: Anything that can be done with a trusted authority can also be done without a trusted authority.

Crypto Analysis

  1. Precisely specify threat model
  2. Propose a construction
  3. Prove that breaking construction under threat model will solve an underlying hard problem

History of Crypto

Symmetric ciphers: use the same key for encryption and decryption.

Historic Ciphers
Substitution cipher

Simplest form is the Caesar Cipher which only uses a shift. A substitution cipher uses a random mapping of letters as it's key. The key space is about 288 which is sufficiently large, but the cipher is subject to frequency analysis. It is subject to a cipher-text only attack.

Vigener Cipher

Key is some sequence of letters. Key is repeated until it is the same length as the plain text. Each position is then summed and mod26. If we know the length of the key, we can still use a frequency analysis. If the key length is not known, the same attack can be run for an assumed key size (starting at 1) and incremented. If the key size is wrong, the frequency distribution will be even, when the key size is correct, the frequency distribution will be correct. Again, cipher-text only attack (though a larger sample is needed).

Rotor Machines

Uses substitution ciphers encoded on spinning disks. Changes the cipher based on the last letter used. Still subject to frequency based, cipher-text only attacks. The Enigma machine was the most advanced rotor machine.

DES (1974)

Key space was 256 and the block size was 64.

Today

AES (2001), Salsa20(2008) and others.

Discrete Probability 1

Review of notations and concepts in discrete mathematics and probability. Nothing here that I don't remember.

Discrete Probability 2

More review. Independence of events. XOR.

Given Y with a random distribution over {0,1}n (though not necessarily uniform) and X with an independent, uniform distribution over {0,1}n then Z := Y ⊕ X is uniform over {0,1}n. There is a very cool proof of this.

Week 1 : Stream Ciphers

One Time Pad

A cipher is an "efficient" defined over (K, M, C) is a pair of algorithms (E,D) where

 K: key space
 M: message space
 C: cipher space
 E: K x M → C
 D: K x C → M
 ∀ k∈K, m∈M: D(k, E(k,m)) = m

The term "efficient" refers to either complexity or real world time, though in practice, both end up being equivalent. E is often randomized--the same key and message will not always produce the same cipher, but D is always deterministic.

One Time Pad - Vernam 1917

 c:= E(k,m) = k ⊕ m
 m:= D(k,c) = k ⊕ c

But given m and c

 k:= m ⊕ c

Very fast, but requires very long keys and transmitting the keys becomes it's own problem. Claude Shannon state that given the cipher-text, it should reveal no information about the plain text.

According to Shannon, a cipher (E,D) over (K, M, C) has perfect secrecy if

 ∀m0, m1, ∈M where
 (len(m0) == len(1) and ∀c ∈ C
 And k is uniform in K
 Pr[ E(k, m0) == c] == Pr[E(k, m1) == c]

Pr is probability.

Here is a proof that OTP has perfect secrecy. I am not copying it here.

Bad news, Shannon also showed that perfect secrecy requires that the number of keys is greater than or equal to the number of messages. So the key must be as long as the message for perfect secrecy.

Pseudo Random

Pseudo Random Generator (PRG): G(s) → r where s:={0,1}m and r:={0,1}n and n >> m. Also G is deterministic.

Using G, k becomes the seed so:

 c = E(k,m) := m ⊕ G(k)
 m = D(k,c) := c ⊕ G(k)

G (the PRG) must be unpredictable, otherwise the whole system is insecure.

G is predictable if ∃ efficient algorithm A that given the first i digits (for any i) from a random key, make a better than even prediction (even .5 + 1/1E9) of what the next digit will be.

We consider an event at a probability of 1/230 to be non-negligible because it could happen in 1GB of data. But 1/280 is considered negligible. In formal systems (theory) negligibility is a function of the constraints of the system.

Real-World Stream Ciphers

PRG

Semantic Security

SCs are Semantically Secure

Footer