You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 29, 2022. It is now read-only.
Parsing the pyasn1 objects generated by the converter modules in Uptane's TUF fork and Uptane itself is a nightmare.
The structure of the ASN1 data doesn't quite match the structure of the JSON data.
This can be simplified substantially.
Part of this complexity is because of the fact that the ASN.1 definition for signed metadata employs a choice of four relatively complex objects (timestamp, snapshot, targets, root, delegated targets). As a result, the pyasn1 objects for metadata include quite a bit of unnecessary information about the structure of other metadata types.
Let's consider an example. The below is a single Timestamp role translated into ASN.1 with our
current translators (metadata_asn1_definitions.py, asn1_codec.py, and timestamp_asn1_coder.py).
Note that this piece of Timestamp metadata TWICE defines what Root metadata looks like, what Snapshot metadata looks like, and what Targets metadata looks like....
I think I should dispose of structure SignedBody (see tuf/encoding/metadata_asn1_definitions.py, uptane/encoding/asn1_definitions.py, uptane/encoding/asn1_definitions.asn1).
This will be resolved by the switch to asn1crypto upcoming for the main TUF repo (theupdateframework/tuf), which Uptane will move to using instead of the forked awwad/tuf.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
There are two issues here:
This can be simplified substantially.
Part of this complexity is because of the fact that the ASN.1 definition for signed metadata employs a choice of four relatively complex objects (timestamp, snapshot, targets, root, delegated targets). As a result, the pyasn1 objects for metadata include quite a bit of unnecessary information about the structure of other metadata types.
Let's consider an example. The below is a single Timestamp role translated into ASN.1 with our
current translators (
metadata_asn1_definitions.py
,asn1_codec.py
, andtimestamp_asn1_coder.py
).Note that this piece of Timestamp metadata TWICE defines what Root metadata looks like, what Snapshot metadata looks like, and what Targets metadata looks like....
Encoded in DER, the above pyasn1 object yields this:
The text was updated successfully, but these errors were encountered: