CS409m: Introduction to Cryptography

台☯


Symmetric-key encryption, public-key encryption and zero-knowledge proofs

  • Instructor: Chethan Kamath
  • When and where: Slot 5 (08:00-09:25, Wednesdays and Fridays) in CC101
  • Teaching assistants: Shawn Koshy (24B1214), Ravi Prakash (24M2131), Priyanshu Singh (24M2101), Harshit Somani (24B1282) and Reuben Toppo (24B3302)
  • Office hours with instructor: After lectures, and by appointment (via e-mail)
  • Office hours with TAs: Mondays 17:00-18:00 and Fridays 18:00-19:00 (after polling)
  • Announcements and online discussion: Moodle

[+]

Overview


Description

Cryptography is the science of securely carrying out tasks (e.g., communication) in presence of adversaries (e.g., eavesdroppers). In this course, we will first study certain basic tasks in cryptography (e.g., secure communication), with an emphasis on precise modelling of the adversary's capabilities and goal -- the threat model -- and formally proving security in this model -- the security proof. Then, we will see how more complex applications you use everyday (e.g., HTTPS, secure messaging, time-based one-time password) can be built on top of these. Additionally, we will also have hands-on sessions aimed at exposing you to real world cryptographic libraries like OpenSSL.

Prerequisites

Discrete structures and probability theory are soft prerequisites. This course will involve some amount of theory, and thus we will expect mathematical maturity.

Who can credit?

Since the course is a minor, it is open to all non-CS, non-freshmen UGs.

Grading and Attendance

Weightage Towards
35% End-sem
28% Mid-sem
20% Two (out of three) quizzes
10% Two CTFs
5% Class participation, pop-quizzes
2% Feedback

Attendance is not mandatory (but encouraged). There will be four ungraded assignments to help you with quizzes and exams.


[+]

Course Material


# Date Slides + Topics Covered
L01 29/Jul [↗] -
  • Administrivia
  • What is cryptography?
  • Course overview: what happens when you do netbanking?
Module I: Secure Communication in the Shared-Key Setting
L02 31/Jul [↗] -
  • What can we learn from history?
  • Historical ciphers and their cryptanalysis
  • Modern principles
L03 05/Aug - [↗]
  • Basic probability theory
  • Primer 1: randomised algorithms
L04 07/Aug [↗] -
  • Perfect secrecy against eavesdroppers
  • One-time pad
  • Limitations of perfect secrecy: Shannon's impossibility
CTF0 07/Aug - [↗] "CTF" 0
A1 10/Aug - [↗] Assignment 1
L05 12/Aug [↗] [↗]
  • Primer 2: Turing machine and other models of computation
  • Probabilistic polynomial time (PPT) and negligible functions
  • The security parameter
  • Demo: how Turing machines work (courtesy turingmachine.io)
L06 14/Aug [↗] -
  • How to encrypt messages longer than the key?
  • Computational secrecy against eavesdroppers
  • Pseudo-random generators (PRG) and Computational OTP
  • Main tool: reduction algorithm
L07 19/Aug [↗] [↗]
  • How to construct a PRG?
  • Stream ciphers and unpredictability
  • Theoretical constructions
Q1 19/Aug - [↗] Quiz 1: 17:00-18:00 in CC101+CC103
L08 21/Aug [↗] [↗] [↗]
  • How to (statefully) encrypt multiple messages?
  • Length-extension of PRG
  • Main tool: hybrid argument
CTF1 24/Aug [↗] CTF 1: due 06/Sep EoD
H 26/Aug No lecture: Id-e-Milad
L09 28/Aug [↗] [↗]
  • How to (statelessly) encrypt multiple messages?
  • Random oracles and pseudo-random functions (PRFs)
  • Demo: how to watermark LLMs using a PRF (courtesy declaude.org)
A2 31/Aug - [↗] Assignment 2
L10 02/Sep [↗] [↗]
  • How to construct a PRF?
  • Chosen-plaintext attack (CPA)
  • CPA-secure SKE from PRF
L11 04/Sep [↗] [↗] [↗]
  • How to efficiently encrypt long messages?
  • Block ciphers
  • Modes of Operation
  • Demo: aes-128-ecb and aes-128-cbc mode in OpenSSL
Q2 07/Sep - [↗] Quiz 2: 08:15-09:25 in CC103
L12 09/Sep [↗] [↗] [↗]
  • How to deal with an active adversary? Part I
  • Message authentication code (MAC)
  • How to construct a fixed-length MAC?
  • Domain-extension and CBC-MAC
  • Demo: MAC in OpenSSL
L13 11/Sep [↗] -
  • How to deal with an active adversary? Part II
  • A chosen-ciphertext attack (CCA): padding-oracle attack
  • How to construct an IND-CCA-secure SKE?
  • Authenticated encryption: AES-256-GCM
Module II: Secure Communication in the Public-Key Setting
L14 23/Sep [↗] -
  • How to share a key?
  • Primer 3: Basic group theory
  • Key exchange
L15 25/Sep [↗] [↗] [↗]
  • Diffie-Hellman key exchange (DHKE)
  • Public-key encryption (PKE)
  • Elgamal encryption
  • Demo: how to "simulate" DHKE using OpenSSL
L16 30/Sep [↗] [↗]
  • Primer 4: Basic number theory
  • Goldwasser-Micali encryption
  • RSA encryption
  • Demo: how to generate RSA key-pair using OpenSSL
A3 30/Sep - [↗] Assignment 3
H 05/Oct No lecture: Mahatma Gandhi Jayanti
L17 07/Oct [↗] -
  • What to do when quantum computers arrive
  • Primer 5: quantum computing
  • Learning with errors (LWE)
  • Regev PKE
L18 09/Oct [↗] [↗]
  • How to authenticate in the public-key setting? Part I
  • Identification schemes
  • Schnorr identification protocol
  • Demo: how to set up SSH identification using public keys
M 11/Oct - [↗] Mid-sem: 14:00-16:00 in LC301 and LT303
L19 14/Oct [↗] [↗]
  • How to authenticate in the public-key setting? Part II
  • Digital signatures
  • Schnorr signature and Fiat-Shamir transform
  • Demo: how to side-load Signal
L20 16/Oct [↗] [↗]
  • How to signing very long messages?
  • Hash functions and collision resistance
  • Domain extension: Merkle-Damgård Transform and Merkle Tree
  • Demo: how to verify Debian ISO
A4 16/Oct [↗] Assignment 4
Module III: Applications
L21 21/Oct - [↗]
L22 23/Oct - [↗]
  • Application 2: Secure messaging
  • Signal protocol a/k/a the double ratchet
  • Tools used: DHKE, KDF, DS, AEAD
Q3 23/Oct - [↗] Quiz 3: 17:00-18:00 in CC103

L23 28/Oct - [↗]
  • Application 3: eVoting
  • How Helios Voting works assuming semi-honest parties
  • Tools used: homomorphic PKE, distributed PKE
L24 30/Oct - [↗]
  • Application 3: eVoting, continued
  • How Helios Voting deals with malicious parties
  • Tools used: Non-interactive zero-knowledge proof of knowledge (NIZKPoK)
CTF2 23/Oct [↗] CTF 2
L25 04/Nov - [↗]
  • Application 3: eVoting, continued
  • NIZKPoK for Helios
L26 06/Nov - [↗]
E 17/Nov - [↗] End-sem: 17/Nov, 09:00-12:00 in LA201

[+]

Resources


Listed below are the resources relevant to this course. The list of per-lecture resources (e.g., further reading) can be found at the end of the respective lecture slide.

Textbooks Background Material
The following background will be useful to have. However, since this is a minor course, we will gently introduce most of it over the course of the course.
  • Basic probability theory, which can be found in §A.3 of Katz-Lindell or the first recitation of MIT6875.
  • Basic number theory, which can be found in §B of Katz-Lindell or the third recitation of MIT6875.
  • Basic theory of computation and computational complexity, which can be found in the second recitation of MIT6875.
Related Courses Prior Iterations