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