Skip to content

zksecurity/timing-notebook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Kocher's Timing Attack: A Three-Act Tutorial

This repository contains an interactive Jupyter notebook demonstrating Paul Kocher's 1996 timing attack on cryptographic implementations. The tutorial takes you on a journey from theory to practice through three progressive implementations.

Overview

Paul Kocher's seminal paper showed how microsecond differences in execution time could leak private keys from RSA implementations. This tutorial recreates that journey:

  • Part 1: Clean signal demonstration using instruction cost modeling
  • Part 2: Real-world challenges with wall-clock timing measurements
  • Part 3: Engineering solutions to extract signal from noise

Educational Purpose

This is a didactic implementation designed to illustrate the principles behind Kocher's attack. It includes simplifications and limitations that make it suitable for learning but not for production cryptanalysis. The focus is on understanding the mathematical foundations and practical challenges of timing side-channel attacks.

Requirements

  • Python 3.x
  • Jupyter Notebook
  • NumPy
  • Matplotlib (for visualizations)

Usage

jupyter notebook Kochers-Three-Act-Tutorial.ipynb

Citation

Original paper: Paul C. Kocher. "Timing Attacks on Implementations of Diffie-Hellman, RSA, DSS, and Other Systems." CRYPTO 1996.

About

Tutorial on timing side-channels as a Python notebook

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published