Skip to content

Serialize vs export

The tentative c interface has the following functions:

sop_err
sop_keys_export (const sop_keys *keys,
                 bool armor, sop_buf **out);

[...]

sop_err
sop_certs_export (const sop_certs *certs,
                  bool armor, sop_buf **out);

It occurs to me that there is a subtle difference between serializing an object like a cert, and exporting it. The difference is the intent: in the former setting the object is kept in local storage, whereas in the latter it is distributed, say uploaded to a public key server.

(At least that is our interpretation: https://docs.rs/sequoia-openpgp/latest/sequoia_openpgp/serialize/trait.Serialize.html#method.export )