write pubkey