In [2]:
import numpy as np
import matplotlib.pyplot as plt
In [45]:
x = np.linspace(1e8, 1e11, 300)
y = 1.0 - np.exp(-x*(x-1)/2/(2.0**64))
plt.plot(x, y, 'r')
plt.xscale('log')
plt.xlabel("Number of Hashes, $s$")
plt.ylabel("Probability of Collision, $p_c(s)$")
plt.savefig("prob-hash-collision.svg")
In [ ]: