Change to use public_key rather than private key