Source: https://math.nyu.edu/~hausner/cryptography.pdf