Implements https://git.glasklar.is/sigsum/project/documentation/-/blob/main/proposals/2023-03-28-cosignature-serialization.md