export_public_key
ret = export_public_key(file, NULL, &(kp.pub_key), RAWBIN);
ret = export_public_key(file, kname, &(kp.pub_key), DOTH);