Have you considered a practical example like teaching PGP email encryption?
Keybase.io has a browser based crypto solution for doing encryption / decryption and while I don't recommend for "real" crypto, it is a great convenience tool for showing how public/private key encryption works without the need to address pgp tools installed on a machine or access to a key server.
An example lesson based scenario would look like:
- Explain the basics of PGP and Key based Cryptography - the "Art of the Problem" video linked elsewhere on the answers I agree is the definitive explanation of the Diffie-Hellman Key Exchange theory. This should be sufficient to work practically with encrypting /decrypting with PGP.
- Students create a set of keys: public key for sharing, private key for keeping.
- Students share their public keys in a place where everyone can see them and know who's is who's. This is where Keybase would be
useful, but you could also just put them all in a public gist or
paste bin. It is safe to share a public key.
- Students can now use the public keys to send messages to each other and publish the encrypted messages in another public place
(same pastebin, eg) or via email.
Some interesting activities and discussions:
- How can I decrypt a message meant for me?
- What happens if I take a
message encrypted for someone else and use my private key to decrypt?
- What practical use cases could this type of encryption (key exchange)
solve? (TLS/SSL probably the easiest reach).
- What challenges does
this type of technology create for law enforcement and regulators to
protect against fraud or other nefarious activities (terrorism, money
laundering, etc). How can this type of activity improve the
transparency and accuracy of information (PGP signatures of code
commits on open source projects, eg). If there are both nefarious and
good uses of this technology, how do you decide if it should be
legal, or illegal to use it?