Why you shouldn't write crypto functions yourself
summary
A simple RSA powmod becomes a minefield: correct math plus big integers needs GMP, prime generation and a cryptographic RNG, CRT optimizations, and blinding to defeat timing attacks. PKCS#1 padding mistakes and cache side channels leak keys, forcing constant-time copy routines and branchless logic. A working, hardened implementation grows from one call to dozens of functions, dozens of commits over weeks, and a measurable speed versus security tradeoff.
AI-written summary · about
chapters (12)
- 0:00Start
- 1:54Attacks based on poor practices
- 4:42Basic tools needed to implement RSA
- 6:00RSA decryption using GMP
- 6:41Faster RSA decryption
- 7:28Attacks on implementations
- 10:20Blinding
- 11:43Checking
- 12:14One defense from Bleichenbacher
- 12:50Attacks based on CPU architecture
- 14:30Defeating Cache/Timing attacks
- 17:09Example
related talks
01h 00mCS Fundamentals: Why SSL and SSH are Secure
01h 02mCryptographic Side-Channels on Embedded Devices
01h 26mTLS Cryptography for Programmers
52mTales from the Crypt: A Cryptography Primer
47mPractical Security Foundations
28mModern Cryptography
44mCryptography Pitfalls
52mFrom PKC to PKI: Reflections on Standardizing the RSA Algorithm
