CSE 291-E, Fall 2020
Applied Cryptography

  Nadia Heninger (nadiah at cs dot ucsd dot edu)
  Office hours: Tuesday 12:30 until there are no more questions on Zoom

  Keegan Ryan (kryan at eng dot ucsd dot edu)
  Office hours: Friday 1:00-2:00pm on Zoom (meeting information posted on Canvas)

  Tuesday/Thursday 11:00am-12:20pm, via Zoom (meeting information posted on Canvas; email for details if you are not enrolled in the course)

Class Resources:
  Lecture information and gradebook on Canvas
  Q&A on Piazza

  80%: Homework assignments
  20%: Exam

Course Overview

This is a course on applied cryptography, with a significant focus on cryptanalysis. Topics to be covered include


There are no formal prerequisites, but you should have mathematical maturity equivalent to having taken graduate algorithms, and we will have programming assignments in Python/Sage. This course is independent of CSE 207, modern cryptography. Some of the material will overlap, but neither is a prerequisite for the other.

Enrollment and waitlist

If you are still on the waitlist or if I haven't seen your EASy request to enroll as an undergraduate, email me to tell me your background for the prerequisites.

If you want to audit the class, email me for Zoom information.

Tentative Schedule

Topic References Assignments
10/1 Introduction, one-time pad

Lecture slides
Boneh & Shoup Ch. 2.1

Further reading:
Communication theory of secrecy systems Shannon 1949
Cryptanalysis of the Lorenz cipher (video)
Did a broken random number generator in Cuba help expose a Russian espionage network? by Matt Blaze 2020
A History of US Communications Security by David Boak 1973

Homework 1 Available
10/6 PRGs and stream cipher encryption

Lecture slides
Boneh & Shoup Ch. 2.2, Ch. 3.1-3.3

Further reading/Research directions:
All Your Biases Belong To Us: Breaking RC4 in WPA-TKIP and TLS by Vanhoef and Piessens
Attacks Only Get Better: Password Recovery Attacks Against RC4 in TLS by Garman, Paterson, and Van der Merwe
On the security of RC4 in TLS and WPA by AlFardan, Bernstein, Paterson, Poettering, and Schuldt 2013
The ChaCha family of stream ciphers by Bernstein
Security analysis of pseudo-random number generators with input: /dev/random is not robust by Dodis Pointcheval Ruhault Vergnaud Wichs 2013
10/8 Block ciphers

Lecture slides
Boneh & Shoup Ch. 4.1-4.2

Further reading/Research directions:
Biclique Cryptanalysis of the Full AES by Bogdanov, Khovratovich, and Rechberger 2011
Homework 2 Available
10/13 PRFs, chosen plaintext attacks, block cipher modes of operation

Lecture slides
Boneh & Shoup Ch. 4.4, Ch. 5

Further reading/research:
Stealthy Dopant-Level Hardware Trojans by Becker, Regazzoni, Paar, Burleson 2013
Homework 1 Due
10/15 Message authentication codes and message integrity; problems with CBC mode

Lecture slides
Boneh & Shoup Ch. 6

Further reading:
Security Flaws Induced by CBC Padding Applications to SSL, IPSEC, WTLS... by Vaudenay 2002
Here come the xor ninjas by Duong and Rizzo 2011
Compression and information leakage of plaintext by Kelsey 2002
The CRIME attack by Rizzo and Duong 2012
Homework 3 Available
10/20 Hash functions

Lecture slides
Boneh & Shoup Ch. 8

Further reading/research directions:
A cryptanalytic time-memory tradeoff by Hellman 1980
Parallel collision search with cryptanalytic applications by van Oorschot and Wiener 1999
The making of Keccak by Bertoni, Daemen, Peeters, Van Assche 2015
MD5 to be considered harmful today by Sotirov, Stevens, Appelbaum, Lenstra, Molnar, Osvik, de Weger 2009
Counter-cryptanalysis by Stevens 2013
Speeding up detection of SHA-1 collision attacks using unavoidable attack conditions by Stevens and Shumow 2017
The first collision for full SHA-1 by Stevens, Bursztein, Karpman, Albertini, Markov 2017
Homework 2 Due
10/22 Hash functions, MACs, and authenticated encryption

Lecture Slides
Boneh & Shoup Ch. 8.7, 9

Further reading:
This POODLE Bites: Exploiting The SSL 3.0 Fallback by Möller, Duong, Kotowicz 2014
Homework 4 Available
10/27 Computational number theory: Modular arithmetic, groups, rings, fields, efficient algorithms and hard problems
Boneh & Shoup Appendix A.

Further reading:
A Computational Introduction to Number Theory and Algebra, Ch. 3, 6 by Shoup
Fast multiplication and its applications by Bernstein
Homework 3 Due
10/29 Diffie-Hellman, elementary discrete log cryptanalysis
New Directions in Cryptography by Diffie and Hellman 1976
Boneh & Shoup Ch. 10
HAC Ch. 3.6
On Diffie-Hellman Key Agreement with Short Exponents by van Oorschot and Wiener
Chinese Remainder Theorem, Pohlig-Hellman algorithm, public-key cryptography, RSA
Boneh & Shoup Ch. 11
A method for obtaining digital signatures and public-key cryptography by Rivest, Shamir, and Adleman 1978

Further reading:
A personal view of average-case complexity by Impagliazzo 1995
Homework 4 Due
11/5 Elementary factoring algorithms and RSA cryptanalysis
Boneh & Shoup Ch. 12

Further reading/Research directions:
Why Textbook ElGamal and RSA Encryption Are Insecure by Boneh, Joux, and Nguyen 2000
Chosen Ciphertext Attacks Against Protocols Based on the RSA Encryption Standard PKCS #1 by Bleichenbacher 1998
DROWN: Breaking TLS using SSLv2 by Aviram et al. 2016
11/10 Digital signatures
Boneh & Shoup Ch. 13
Mining Your Ps and Qs: Detection of Widespread Weak Keys in Network Devices by Heninger, Durumeric, Wustrow, and Halderman 2012
11/12 Elliptic curve cryptography
Boneh & Shoup Ch. 15

Further reading/Research directions:
A riddle wrapped in an enigma by Koblitz and Menezes 2015
Curve25519: new Diffie-Hellman speed records by Bernstein 2006
11/17 Authenticated Key Exchange; TLS
Boneh & Shoup Ch. 21

Further reading/research directions:
A Messy State of the Union: Taming the Composite State Machines of TLS by Beurdouche, Barghavan, Delignat-Lavaud, Fournet, Kohlweiss, Pironti, Strub, and Zinzindohoue 2015
SMACK: State Machine AttaCKs against TLS
Triple Handshakes and Cookie Cutters: Breaking and Fixing Authentication over TLS by Bhargavan et al. 2014
A Cross-Protocol Attack on the TLS Protocol by Mavrogiannopoulos, Vercauteren, Velichkov, Preneel 2012
11/19 Random number generation

Further reading/research directions:
An Analysis of the NIST SP 800-90A Standard by Woodage and Shumow 2019
Security Analysis of Pseudo-Random Number Generators with Input: /dev/random is not Robust by Dodis et al. 2013
When Private Keys are Public: Results from the 2008 Debian OpenSSL Vulnerability by Yilek et al. 2009
Authentication Failures in NIST version of GCM by Joux
Nonce-Disrespecting Adversaries: Practical Forgery Attacks on GCM in TLS by Bock et al. 2016
On the Practical Exploitability of Dual EC in TLS Implementations by Checkoway et al. 2014
A Systematic Analysis of the Juniper Dual EC Incident by Checkoway et al. 2016
Cryptanalytic Attacks on Pseudorandom Number Generators by Kelsey Schneier Wagner and Hall 1998
Practical state recovery attacks against legacy RNG implementations by Cohney Green Heninger 2018
11/24 Index calculus for factoring and discrete log

Imperfect Forward Secrecy: How Diffie-Hellman Fails in Practice by Adrian, Bhargavan, Durumeric, Gaudry, Green, Halderman, Heninger, Springall, Thome, Valenta, VanderSloot, Wustrow, Zanella-Beguelin, Zimmermann

Further reading:
A new index calculus algorithm with complexity L(1/4 + o(1)) in small characteristic by Joux 2013
A quasi-polynomial algorithm for discrete logarithm in finite fields of small characteristic by Barbulescu Gaudry Joux and Thome 2013
11/26 No class; Thanksgiving
12/1 Lattice-based cryptanalysis

Daniele Micciancio lecture notes 1 2
Oded Regev lecture notes
Factoring Polynomials with Rational Coefficients by Lenstra Lenstra and Lovasz 1982
The two faces of lattices in cryptology by Nguyen 2001
Using LLL-reduction for solving RSA and factorization problems: a survey by May 2007
12/3 More lattice-based cryptanalysis

Further reading/research directions:

Hardness of computing the most significant bits of secret keys in Diffie-Hellman and related schemes by Boneh and Venkatesan 1996
Cryptanalysis of RSA with private key d less than N0.292 by Boneh and Durfee 2000
The Return of Coppersmith's Attack: Practical Factorization of Widely Used RSA Moduli by Nemec, Sys, Svenda, Klinec, and Matyas 2017
Biased Nonce Sense: Lattice Attacks against Weak ECDSA Signatures in Cryptocurrencies by Breitner and Heninger 2019
12/8 Side-channel attacks Further reading/research directions:
Timing Attacks on Implementations of Diffe-Hellman, RSA, DSS, and Other Systems by Kocher 1996
On the importance of checking cryptographic protocols for faults by Boneh 1997
Differential Power Analysis by Kocher, Jaffe, and Jun 1998
Remote Timing Attacks are Practical by Brumely and Boneh 2003
Cache-timing attacks on AES by Bernstein 2005
RSA Key Extraction via Low-Bandwidth Acoustic Cryptanalysis by Genkin, Shamir, and Tromer 2014
CacheBleed: A Timing Attack on OpenSSL Constant-Time RSA by Yarom, Genkin, and Heninger 2016
12/10 TBD


There will be approximately eight homework assignments, each involving both programming and written exercises. Many of the programming exercises have been inspired by the Cryptopals challenges. Of course I expect you to produce your own independent implementations. But if you're really enthusiastic and want more fun exercises, you are more than welcome to work through the Cryptopals challenges yourself.