Public and private key generation, for small ints is working. Increasing the starting point for d and e might be a good idea.