trait Serialize/Parse cleanup
Currently, when we serialize a Signature
, we get a full packet with CTB and length, even though we didn't really ask for that.
Now, if we want to create an embedded signature, we need to use the special interface Signature::serialize_naked()
to get it without framing.
Also consider Key
. Here, we don't know whether it is supposed to be primary or subkey, or public or secret. Therefore, we have SerializeKey
, which is like Serialize
, but also gets a tag. Now, if Key::serialize()
would only emit the body, it wouldn't need to know what kind of key to emit.
Now if we serialize a Packet
, we get the framing.
Edited by Justus Winter