pete > courses > Crash Course in System Security (CSCI 1005), Winter 2025 > Day 15
Day 15: Cryptography & Heartbleed
symmetric (DES, 3DES, AES)
assymetric (RSA, ECC)
Diffie-Hellman key exchange
one-way functions
hashing (MD5, SHA)
certificates
PKI
Diagnosis of the OpenSSL Heartbleed Bug (Sean Cassidy)
Exercises
SSH with public-key crypto
SSH is a program that allows you to log into another system over the Internet. You may have used it to log into basin.cs.middlebury.edu remotely. Read the AUTHENTICATION part of the ssh(1) manpage to learn how you can create and use a public/private keypair to authenticate rather than a password. What are the tradeoffs?
(The ssh program comes in the openssh package.)
Browser certificates
Figure out how to find the list of certificate authorities (CAs) that are magically trusted by your browser. Be amazed and afraid at how long the list is. Examine some of the certificates; see what sorts of data they contain.
Visit a few sites available using HTTPS, which adds encryption and certificate verification on top of HTTP. Find the certificate for each, poke around its contents, see the chain of certificate authorities that lead to the root.
Personal certificates
OpenSSL has long been the standard cryptography library (for many platforms). Among other things, it provides programs that can generate certificates, sign certificates, and so on. Using the openssl program, create a certificate for yourself. Also create a certificate authority. Sign your cert with your CA cert, send it to another person in class and get them to validate your cert. (You’ll have to jump through some hoops to make this happen.)
Useful openssl programs for this will be ca(1), req(1), x509(1), and verify(1).
Exploit Heartbleed
Find and download the source code for a vulnerable version of OpenSSL. Modify the source code to trigger the vulnerability. Verify that you have done so using the s_server and s_client programs included in the OpenSSL distribution. No longer referring to the documentation referenced above, fix the vulnerability.