add crypto method for dumping the public key

Adds dump_publickey for #136