Handbook of applied cryptography. (via @CompSciFact)