parser: improved encode_packet case readability
parser: extracted function c14n_pubkey/1