CS 599 - Spring 2024 - Formal Methods in Security and Privacy


Lecture time and location: Tu-Th 11:00am-12:15pm - MCS B33
EasyCrypt Lab (on Zoom): F 10:15-11:30am
Instructors: Marco Gaboardi and Alley Stoughton
e-mail: gaboardi@bu.edu and stough@bu.edu

Office Hours: on Zoom by appointment
Discussion forums: Piazza
Reading material: We will base the class on a working draft of a book by Gilles Barthe (MPI and IMDEA) that is available at the following link:
http://software.imdea.org/~gbarthe/__introrelver.pdf
Note: The draft above is a work in progress. Please, feel free to contact Gilles with any feedback, typos, etc.

Overview

Security and privacy breaches are constantly on the news. Often these breaches are due to vulnerabilities in the design and implementations of software components. In this class we will study some of the formal tools that have been developed to formally support the correctness of software with respect to security and privacy requirements. We will focus on a few security and privacy properties such as: information flow control and non-interference, provable security, and differential privacy.

The course consists of a series of lectures on different formalisms that have been developed to reason about security and privacy properties. The basic formalism we will use is the one provided by relational program logics. We will first study a deterministic logic which is useful for reasoning about information flows and non-interference. Then, we will study a probabilistic extension of this logic which supports reasoning about cryptographic security and differential privacy. We will see how different natural proofs from cryptography and differential privacy can be expressed using this formalism. We will also experiment practically with these topics on different examples by using the EasyCrypt tool, which you can find here.

Course prerequisites

The course has a significant component based on analysis of algorithms, and formal techniques. So, the following are required classes: CAS CS 237 or equivalent; CAS CS 320 or equivalent; CAS CS 330 or equivalent; or consent of instructor. Additionally, some rudimentary understanding of probability and statistics is expected.

Course requirements

The course has two main requirements:

Grading

The final grade will be composed as:

Projects

Projects can take different forms depending on the interest of each student but all the projects must have a research component. Some examples of what would constitute a good project are:

The instructors will provide some specific ideas for possible projects but other ideas may be accepted if well motivated and discussed with the instructors. Students may work on their projects alone or they may collaborate with others. Groups can be composed by at most two students. Each group is invited to meet with the instructors regularly (3-4 times during the term) to check on the advancements and directions of the project.

Class material

The class will be based on lecture slides that will be posted on this website. Every student will also be invited to engage on a project and to present the results at the end of the course. Discussion about all the aspects of the course will also take place on Piazza.

Lecture Schedule

Date Topic Notes
Thu 1/18 Introduction to the topic + basic logic recap
Slides
Notes: Section 1.1.1
Tu 1/23 While language and Hoare Triples
Slides
Thu 1/25 Hoare Logic
Slides
Tu 1/30 Hoare Logic
Slides
Thu 2/1 Non-interference
Slides
Tu 2/6 Non-interference and RHL
Slides
Thu 2/8 RHL and Probabilistic Computations
Slides
Thu 2/15 Probabilistic Noninterference
Slides
Tu 2/20 Formal Proofs for Cryptography
Slides
Thu 2/22 Formal Proofs for Cryptography
Slides (same as previous)
Tu 2/27 Formal Proofs for Cryptography
Slides (same as previous)
Thu 2/29 Differential Privacy
Slides
Tu 3/5 Approximate Probabilistic Relational Hoare Logic
Slides
Thu 3/7 More differential privacy
Slides
Thu 3/19 Differential privacy in EasyCrypt
Code
Thu 3/21 More differential privacy
Slides
Thu 3/26 More differential privacy
Slides (same as the previous ones)
Thu 3/28 Proofs of Protocol Security in Real/Ideal Paradigm
Slides
Tu 4/2 Proofs of Protocol Security in Real/Ideal Paradigm
Slides (same as previous)
Tu 4/4 Project presentation
Tu 4/9 Quantitative Information Flow
Slides
Tu 4/11 More Quantitative Information Flow
Slides
Thu 4/18 Applying Real/Ideal Paradigm to Programming Language-Based Security
Slides

EasyCrypt Lab Schedule

Date Topic Notes
Week 1: F 1/19 Installing EasyCrypt and EasyCrypt's Ambient Logic
EasyCrypt installation instructions
check-install.ec
EasyCrypt Reference Manual
Slides on EasyCrypt's Ambient Logic
logic-examp-fill.ec logic-examp.ec
Week 2: F 1/26 EasyCrypt's Ambient Logic
Slides on EasyCrypt's Ambient Logic
logic-examp2-fill.ec logic-examp2.ec
rewriting-fill.ec rewriting.ec
int-div-examp-fill.ec int-div-examp.ec
Week 3: F 2/2 EasyCrypt's While Language and Hoare Logic
Slides on EasyCrypt's While Language and Hoare Logic
fast-expon-fill.ec fast-expon.ec
Week 4: F 2/9 Noninterference and EasyCrypt's Relational Hoare Logic
Slides on EasyCrypt's Relational Hoare Logic and Noninterference
noninter-fill.ec noninter.ec
Week 5: F 2/16 Noninterference and EasyCrypt's Relational Hoare Logic
xor-loop-fill.ec xor-loop.ec
Week 6: F 2/23 Probabilistic Noninterference and EasyCrypt's Probabilistic Relational Hoare Logic
Slides on EasyCrypt's Probabilistic Relational Hoare Logic and Probabilistic Noninterference
prob-noninter-fill.ec prob-noninter.ec
Week 7: F 3/1 EasyCrypt's Probabilistic Hoare and Probabilistic Relational Hoare Logics
phl-prhl-fill.ec phl-prhl.ec
Week 8: F 3/8 Secure Message Communication (SMC) in a Real/Ideal Paradigm Style
SMC-fill.ec SMC.ec

Assignments

Assignment Topic Files
Assignment 1: Due Friday, February 2 EasyCrypt's Ambient Logic Ass1-fill.ec
Ass1-answers.ec
Assignment 2: Due Thursday, February 15 EasyCrypt's Hoare Logic Ass2-fill.ec
Ass2-answers.ec
Assignment 3: Due Tuesday, February 27 EasyCrypt's Relational Hoare Logic and Noninterference Ass3-fill.ec
Ass3-answers.ec
Assignment 4: Due Saturday, March 9 EasyCrypt's Probabilistic Relational Hoare Logic and Probabilistic Noninterference Ass4-fill.ec
Ass4-answers.ec