Docsity

Introduction 1 Introduction 2 Private Key Encryption system, Slides of Cryptography and System Security

Toggle sidebar
bg1
COM S 687 Introduction to Cryptography August 24, 2006
Lecture 1: Introduction
Instructor: Rafael Pass Scribe: Muthu
1 Introduction
The word cryptography comes from the Greek words krypt´os which means “hidden” and
gr´afein which means “ to write”. Let us begin with the classical problem studied in
cryptography - secure communication.
1.1 Secure Communication
Alice wants to send Bob a message privately over an insecure channel. By an insecure
channel, we mean there is an adversary, say Eve ( or eavesdropper), who listens everything
on this channel. How do we achieve this?
A possible solution: Alice and Bob agree on some “secret code”. A secret code
consists of a key, an algorithm to encrypt (scramble) text and an algorithm to decrypt
(descramble) text. This way Alice using the key can encrypt text and send it to Bob.
Bob on receiving the message, using the key, can decrypt it to the original text.
Let us try to formalize this solution. It is clear that we need an algorithm to generate
keys (Gen), an encryption algorithm (Enc) and a decryption algorithm (Dec). We also
need to decide what is known by everyone (public) and what is kept secret (private) .
Kerchoff’s principle (1884) states that the only thing that has to be private is the key
and the rest, that is, the key generation, encryption and decryption algorithms should
be public. One way to look at this principle is that, this way the scheme is more secure,
so why not! Secondly, it is quite unreasonable to assume that Eve is unaware of these
algorithms as it can leak easily.
An immediate upshot of this principle is that all the algorithms can not be deterministic,
because Eve can do everything that Alice and Bob do, as they use the same algorithms.
Some of them have to be randomized and in particular the key generation algorithm,
Gen must be randomized, otherwise Eve can do everything that Bob does.
2 Private Key Encryption system
Definition 1 A triplet (Gen, E nc, Dec)of algorithms, a message space Mand a keyspace
K, is called a private-key encryption scheme if:
1-1
pf3
pf4
pf5

Partial preview of the text

Download Introduction 1 Introduction 2 Private Key Encryption system and more Slides Cryptography and System Security in PDF only on Docsity!

COM S 687 Introduction to Cryptography August 24, 2006

Lecture 1: Introduction

Instructor: Rafael Pass Scribe: Muthu

1 Introduction

The word cryptography comes from the Greek words krypt´os which means “hidden” and gr´afein which means “ to write”. Let us begin with the classical problem studied in cryptography - secure communication.

1.1 Secure Communication

Alice wants to send Bob a message privately over an insecure channel. By an insecure channel, we mean there is an adversary, say Eve ( or eavesdropper), who listens everything on this channel. How do we achieve this?

A possible solution: Alice and Bob agree on some “secret code”. A secret code consists of a key, an algorithm to encrypt (scramble) text and an algorithm to decrypt (descramble) text. This way Alice using the key can encrypt text and send it to Bob. Bob on receiving the message, using the key, can decrypt it to the original text.

Let us try to formalize this solution. It is clear that we need an algorithm to generate keys (Gen), an encryption algorithm (Enc) and a decryption algorithm (Dec). We also need to decide what is known by everyone (public) and what is kept secret (private). Kerchoff’s principle (1884) states that the only thing that has to be private is the key and the rest, that is, the key generation, encryption and decryption algorithms should be public. One way to look at this principle is that, this way the scheme is more secure, so why not! Secondly, it is quite unreasonable to assume that Eve is unaware of these algorithms as it can leak easily.

An immediate upshot of this principle is that all the algorithms can not be deterministic, because Eve can do everything that Alice and Bob do, as they use the same algorithms. Some of them have to be randomized and in particular the key generation algorithm, Gen must be randomized, otherwise Eve can do everything that Bob does.

2 Private Key Encryption system

Definition 1 A triplet (Gen, Enc, Dec) of algorithms, a message space M and a keyspace K, is called a private-key encryption scheme if:

  1. The key-generation algorithm: Gen is a randomized algorithm that returns a key k, denoted by k ← Gen, such that k ∈ K.
  2. The encryption algorithm: Enc is an algorithm (potentially randomized) that takes a key k and a plain-text message m ∈ M, and outputs a ciphertext c ← Enck(m).
  3. The decryption algorithm: Dec is a algorithm that takes a key k and a cipher-text c and outputs a plaintext m.
  4. The scheme should satisfy the following property: For all m ∈ M and k ∈ K, P r[Deck(Enck(m)) = m] = 1.

We are not done yet. We have not answered what is means to say it is secure. We shall leave the definition as stated and later in the course, define formally what a secure encryption scheme is.

3 Examples of Private Key Encryption System

Having defined what an encryption scheme let us see some examples.

Caesar Cipher

  • The message space M = {A, B,... , Z}∗^ and key space K = { 0 , 1 , 2 ,... , 25 }.
  • Gen: k R ← K.^1
  • Enck(m 1 m 2... mn) = c 1 c 2... cn, where ci = mi + k mod 26.
  • Deck(c 1 c 2... cn) = m 1 m 2... mn, where mi = ci − k mod 26.

The encryption scheme can be thought of as a cyclic shift of the same length (k) on each letter in the message and the decryption is a cyclic shift in the opposite direction.

Proposition 1 Caesar Cipher is a private-key encryption scheme.

A first glance one would think this is a good scheme, because the message will “look”” scrambled. To break such a scheme we would have to know k to shift the letters back. But there are only 26 values that k can take. Hence, we can try all possible values for k and see if the message decrypts to something readable. Thus, we have broken the scheme. Let us try and modify the Caesar cipher that handle this attack.

(^1) This means k is an element chosen from K, uniformly at random.

5 Modern Cryptography

Modern Cryptography is the transition from cryptography as an “art” to cryptography as a “science”. Instead of inventing ingenious ad-hoc schemes, modern cryptography relies on the following paradigm:

  • Provide a mathematical definition of security.
  • Provide precise mathematical assumptions. (eg. “factoring is hard”, where hard is formally defined). These can be viewed as axioms.
  • Provide proof of security. Prove that, if the scheme can be broken, then it contra- dicts our assumptions (or axioms). In other words, if the assumptions were true, the scheme cannot be broken.

These are the topics that the course is going to address. Despite the conservative nature of this approach, we shall see that we can obtain solutions to very paradoxical problems.

6 Beyond Secure Communication

In the original motivating problem of secure communication, we had two honest parties, Alice and Bob and a malicious eavesdropper Eve. Suppose, Alice and Bob in fact do not trust each other but wish to perform some computation. For instance, Alice and Bob have a list and wish to find the intersection of, i.e find items that occur in both lists without revealing their entire list. An example would be the CIA with a terrorist list and an airline company with the passenger list trying to find the intersection. Both the parties have reasons to hide the entire list from the other. One “trivial” solution would be to have a trusted center that does the computation and reveals only the answer to both parties. The problem here is that there can not be a trusted center that the CIA would trust with such information.

Using cryptography, a solution can be provided without a trusted party. This problem is known as secure two-party computation.

Secure two-party computation - informal definition: A secure two-party compu- tation allows two parties A and B with private inputs a and b respectively, to compute f (a, b) while guaranteeing the same correctness and privacy as if a trusted party had per- formed the computation for them, even if either A or B tries to deviate in any possible malicious way.

Under certain number theoretic assumptions (such as “factoring is hard”), there exists a protocol for secure two-party computation. The problem can be extended to multi- ple parties (eg. electronic voting) and based on similar assumptions protocols can be constructed.

6.1 A toy example: The match-making game

Consider Alice and Bob who wish to know if they are made for each other. Each of them have two choices: either they love the other person or they don’t. At the end of the game, each of them wishes to learn if there is match or not, and no more. For instance, if Alice loves Bob and there is no match, Alice does not want to reveal the information that she loves Bob, as it could affect the chances that Bob will love her in future. Stating it formally, if love and no-love were the inputs and match and no-match were the outputs, the function they want to compute is:

f (love, love) = match f (love, no − love) = no − match f (no − love, love) = no − match f (no − love, no − love) = no − match

In terms of boolean circuits, f can be viewed as an and gate.

Solution: Let us pick five cards, three identical hearts(♥) and two identical clubs(♣). We give one heart and one club each to Alice and Bob and put the remaining heart on the table turned over.

All the five cards are placed on a table turned over: Alice places the first two depending, the third one is the heart that is already on the table and the last two are placed by Bob.

The order in which Alice and Bob place their heart and club depend on whether they love the other person or not. Alice places in the following manner

  • love - ♣♥, club followed by a heart.
  • no-love - ♥♣, heart followed by a club.

Bob places in the following manner

  • love - ♥♣, heart followed by a club.
  • Primitives: Primitives are basic cryptographic tasks that are usually non-interactive like private key encryption, public key encryption, pseudo-random generators and digital signatures. Today all of these can be defined formally and designed based on appropriate hard problems.
  • Basic protocols: Zero knowledge proofs, Identification protocols.
  • Advanced protocols: Examples are oblivious transfer, private information re- trieval, auction, electronic-voting, general secure computation. These protocols are still within the realm of formal definitions, and usually rely on more basic protocols or primitives.
  • Secure systems: This deals with all mechanism necessary to build systems taking into account “real-life” attacks. It is much harder to formally define all real-life considerations and provide solutions handling them.

In this course, we are going to focus on the first three layers and also a little on the fourth layer.