Create a new pair of public and private key pair to use.

def newkeys(nbits=1024):
        """
        Create a new pair of public and private key pair to use.
        """
        pubkey, privkey = rsa.newkeys(nbits, poolsize=1)
        return pubkey, privkey