Add functions to serialize an ecdsa public key.