fixed private key generation

now 1 <= a <= p-2