Use ASN.1 DER instead of MessagePack #111
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is supposed to replace MessagePack with ASN.1 DER as the preferred binary format.
There are several problems though:
serde_asn1_deris semi-abandoned and reports the format as human-readable, causing storage inefficiencies.picky-asn1-der, a fork ofserde_asn1_der, which is used in this PR, does not supportOptionalfields (or rather, it does not serializeNone, so a subsequent deserialization fails - let's wait for the resolution on Support forOptionalin ASN.1 Devolutions/picky-rs#201)picky-asn1-derdoes not support mappings, which is not critical for this crate, butnucypher-corehas those in its data structures.Since the whole point of this change is to use a "standard" format, we should establish whether the lack of support for
Optionaland mappings is a limitation of the standard, or just a lack of a feature inpicky-asn1-der. In the latter case we can make a PR to it, adding that support. Evidently, mappings do occur in formats that use ASN.1, e.g.VarBindhere encoded as a sequence of 2-tuples.