generate the key pair