Chapters from The Handbook of Applied Cryptography