move refresh_key method into PublicKey#key