pub fn serialize<S>(
    public_key: &Option<IdentityKey>,
    serializer: S,
) -> Result<S::Ok, S::Error>
where S: Serializer,