Skip to content

Use bytes encoding for aggregate signature in certificate message #3379

Description

@jpraynaud

Why

The certificate aggregate signature is far larger than the expected 13KB. On a certificate produced by the end to end tests, the IVC multi-signature measures around 39KB (around 79KB as hex text), for an actual proof content of around 13KB. Before that, when serialized as JSON-hex, the same field measured around 47KB (around 95KB as hex text).

What

Encode the aggregate signature through the ProtocolKey codec (JSON-hex for concatenation proofs, bytes for SNARK and IVC proofs) and emit CBOR byte strings for the proof byte vectors, to bring the IVC multi-signature down to around 13KB plus the accumulator size.

How

  • Encode the aggregate signature by type in the ProtocolKey codec: JSON-hex for concatenation, bytes for SNARK and IVC
  • Encode the certificate message crypto fields through the ProtocolKey codec instead of hardcoded encoding calls
  • Keep the certificate hash computation on JSON-hex so certificate hashes stay byte identical

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions