Encryption and Integrity

Slides:



Advertisements
Similar presentations
L8. Reviews Rocky K. C. Chang, May Foci of this course 2 Rocky K. C. Chang  Understand the 3 fundamental cryptographic functions and how they are.
Advertisements

Session 5 Hash functions and digital signatures. Contents Hash functions – Definition – Requirements – Construction – Security – Applications 2/44.
Introduction to Modern Cryptography Lecture 5 Number Theory: 1. Quadratic residues. 2. The discrete log problem. Intro to Public Key Cryptography Diffie.
How cryptography is used to secure web services Josh Benaloh Cryptographer Microsoft Research.
Network Security. Contents Security Requirements and Attacks Confidentiality with Conventional Encryption Message Authentication and Hash Functions Public-Key.
CSCI 172/283 Fall 2010 Public Key Cryptography. New paradigm introduced by Diffie and Hellman The mailbox analogy: Bob has a locked mailbox Alice can.
Public Key Model 8. Cryptography part 2.
Introduction to Modern Cryptography Lecture 5 Number Theory: 1. Quadratic residues. 2. The discrete log problem. Intro to Public Key Cryptography Diffie.
ECE 454/CS 594 Computer and Network Security Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall.
CS526: Information Security Prof. Sam Wagstaff September 16, 2003 Cryptography Basics.
CMSC 414 Computer and Network Security Lecture 5 Jonathan Katz.
Network Security David Lazăr.
CS555Topic 251 Cryptography CS 555 Topic 25: Quantum Crpytography.
CS 4803 Fall 04 Public Key Algorithms. Modular Arithmetic n Public key algorithms are based on modular arithmetic. n Modular addition. n Modular multiplication.
Page 1 COMPSCI 290.2: Computer Security “Quantum Cryptography” including Quantum Communication Quantum Computing.
1 Authenticated Key Exchange Rocky K. C. Chang 20 March 2007.
1 Diffie-Hellman (Key Exchange) Protocol Rocky K. C. Chang 9 February 2007.
Diffie-Hellman Key Exchange first public-key type scheme proposed by Diffie & Hellman in 1976 along with the exposition of public key concepts – note:
1 Diffie-Hellman (Key Exchange) Protocol Rocky K. C. Chang 9 February 2007.
Key Exchange in Systems VPN usually has two phases –Handshake protocol: key exchange between parties sets symmetric keys –Traffic protocol: communication.
15-853Page 1 COMPSCI 290.2: Computer Security “Quantum Cryptography” Including Quantum Communication Quantum Computing.
CS480 Cryptography and Information Security Huiping Guo Department of Computer Science California State University, Los Angeles 14. Digital signature.
Reviews Rocky K. C. Chang 20 April 2007.
Key Exchange References: Applied Cryptography, Bruce Schneier
COMPSCI 290.2: Computer Security
Network Security.
Public Key Encryption and Digital Signatures
Chapter 8 Network Security.
Quantum Cryptography Quantum Computing
Group theory exercise.
Chapter 30 Cryptography Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Cryptography and Network Security
ICS 454 Principles of Cryptography
Topic 25: Discrete LOG, DDH + Attacks on Plain RSA
Diffie-Hellman Secure Key Exchange 1976.
Network Security (contd.)
刘振 上海交通大学 计算机科学与工程系 电信群楼3-509
Quantum Cryptography Alok.T.J EC 11.
Asymmetric Cryptography
Diffie-Hellman Key-Exchange Algorithm
Cryptography Lecture 24.
Cryptography Lecture 25.
Cryptography: Basics (2)
Security Of Wireless Sensor Networks
Practical Aspects of Modern Cryptography
Symmetric-Key Encryption
ICS 454 Principles of Cryptography
Key Management Network Systems Security
Efficient Short-Password Key Exchange (ESP-KE)
El Gamal and Diffie Hellman
Lecture 10: Network Security.
El Gamal and Diffie Hellman
Security of Wireless Sensor Networks
Topic 13: Message Authentication Code
CSCE 715: Network Systems Security
Chapter 29 Cryptography and Network Security
Introduction to Modern Cryptography
One Way Functions Motivation Complexity Theory Review, Motivation
Asymmetric Cryptographic Algorithms
Quantum Cryptography Quantum Computing
刘振 上海交通大学 计算机科学与工程系 电信群楼3-509
Quantum Cryptography Quantum Computing
Diffie-Hellman Key Exchange
Cryptography Lecture 23.
Key Exchange, Man-in-the-Middle Attack
Review of Cryptography: Symmetric and Asymmetric Crypto Advanced Network Security Peter Reiher August, 2014.
Secret-Key Encryption
Lecture 6.2: Protocols - Authentication and Key Exchange II
Cryptography and Network Security
Presentation transcript:

Encryption and Integrity

Example-IPSec(ESP) Packet Encrypted IP ESP TCP / UDP Payload HMAC Authenticated

Example - continued HMAC computed over ciphertext (advantages…) HMAC doesn’t cover IP header (unlike AH). Can’t cover mutable fields. ESP header and IP header can’t be encrypted Encrypting TCP/UDP/ICMP… headers has advantages and disadvantages. HMAC is not encrypted

Example 2 - CBC MAC IV P1 Pn … Ek Ek Ek C1 Cn MAC

CTR Mode Encryption Stream cipher mode (like OFB) IV is a pair <nonce, counter> The nonce should be random Counter is incremented for each block encrypted Encryption of block number j, Pj by: Ek(nonce, counter+i)  , Pj

CCM Mode Encryption and authentication together with block cipher Authentication by CBC MAC Encryption of message and of MAC by CTR mode Used in WiMAX communication

Public-Key Cryptography

Quadratic Residues Definition: An element x is a quadratic residue modulo n if there exists y such that y2x mod n If x is a quadratic residue and y is one of its roots, then so is –y mod n Claim: if p is a prime there are exactly (p-1)/2 quadratic residues in Zp Claim: if p is a prime, and g is a generator of the multiplicative group, the quadratic residues are even powers of g.

Quadratic Residues Claim: an element x in Zp is a quadratic residue if and only if x(p-1)/21 mod p

Generic Discrete Log Let G be a group and g a set element. g is called the base. Let y=gx x is called the discrete log of y Example: y=gx mod p in Zp Example: y=gx mod p in the multiplicative group of Zp

Giant Step-Baby Step Goal: recover the discrete log in O(|G|1/2) steps Input: y, g Output: x such that gx=y Let k |G|1/2 Compute and store gik for i=0,…,k-1 For every j=0,…,k-1 test if yg-j is one of the stored elements

Standard Discrete Log y=gx mod p in the multiplicative group of Zp Computation takes O(log3p) steps Standard discrete log is believed to be a one-way function Can it be used as a hash function?

Key Exchange Idea was first presented by Diffie and Hellman Goal: two parties who do not share a secret perform a protocol and derive the same key Eve who is listening in cannot obtain the new shared key if she has limited computational resources.

Classic Scheme Each party generates a key pair: a private key and a public key. The public keys are exchanged. Both parties derive the same shared key from two public keys and a single private key.

Properties of Key Exchange Necessary security condition: the public key is a one way function of the private key. Necessary “algebraic” condition: an appropriate combination of public and private keys to form a shared key is required Key exchange by itself is effective only against a passive adversary. Man-in-the-middle attack is lethal

Security Requirements Is the one-way relationship between public key and private key sufficient? A one-way function may leak some bits of its arguments. Example: gx mod p Shared key may be compromised Example: gx+y mod p

Security Requirements (cont.) The full requirement is: given all the communication recorded throughout the protocol, computing any bit of the shared key is hard Note that the “any bit” requirement is especially important

Diffie-Hellman Algorithm Public parameters: a prime p, and an element g (possibly a generator of the multiplicative group of Zp) Alice chooses x at random from the multiplicative group and sends gx mod p Bob chooses y at random from the multiplicative group and sends gy mod p Alice and Bob compute the shared key gxy mod p

Computing DH Computation time O(log3p) 1-10 key exchanges a second in real-world SW Up to 10 times that in HW. Beyond that- a heavy penalty in gate count Useful as key exchange, but not as block encryption

Other DH Systems The DH idea can be used with any group structure Limitation: groups in which the discrete log can be easily computed are not useful Example: additive group of Zp Currently useful DH systems: the multiplicative group of Zp and elliptic curve systems

Quantum Key Exchange

Some Properties of Photons Photons may be polarized, e.g: Rectilinear basis: Diagonal basis: Assume a single photon is transmitted with a certain polarization The act of measuring its polarization may change it A filter with the same polarization will receive the photon

Properties (cont.) A filter with the orthogonal polarization will receive nothing A filter in a different basis will receive the photon with 0.5 probability

Qubits Each photon represents one bit. The value of the bit is determined by polarization In each basis, one filter direction represents 1 and the other represents 0 If both sides choose the same basis a qubit (bit passed by photon) is passed correctly If both sides choose different bases there is a 50% chance that it is passed correctly and 50% that it is passed incorrectly

Eavesdropping If Eve chooses correctly the basis by which a qubit is sent she obtains the bit If she chooses incorrectly, she obtains the correct bit with 0.5 probability Eve must retransmit the qubit to Bob By obtaining the qubit, she may have changed it. If the qubit is changed, Bob gets the wrong bit

Brassard-Bennett Key Exchange Alice chooses random n-bit key k Alice chooses n random bases Alice sends k as n qubits. The i-th qubit is transmitted using the i-th base Bob chooses n random bases and measures the qubits Bob tells Alice what bases he chose Alice tells Bob which of these bases is correct Shared key – bits for which Bob chose correctly Bob’s message to Alice has to be authenticated. Does not have to be encrypted.