generate _public_key into JSON rather than asking the user to copy and paste.