suit-wg / manifest-spec Public
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Misc from manifest 12 review #33
Conversation
Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
To avoid confusion (I first thought it was a typo). Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
The nil / bstr [...] line is ambiguous with the above line. This change simplifies parsing (no backtracking). Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
4.2.3. Length-First Map Key Ordering Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
The previous definition could give rise to unordered keys if some severable members were provided verbatim and some via digest. This also prevents duplicate keys (both member and digest). Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
Place all severable members before all unseverable members. Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
…on info compression info is a bstr-wrapped map that contains the algorithm. Note: Only the long example is fixed. Fixes suit-wg#19 Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
| @@ -76,8 +76,8 @@ h'00112233445566778899aabbccddeeff0123456789abcdeffedcba9876543210' | |||
| h'0123456789abcdeffedcba987654321000112233445566778899aabbccddeeff' | |||
| ]), | |||
| / image-size / 14:76834, | |||
| / compression-info / 19:bstr .cbor ({1:1 / "gzip"}) /, | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't parse that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure it's not quite correct. Maybe @bremoran can help?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe there's a better way to express what this means. What you'd normally see here is:
/ compression-info / 19 : h'A10101' / {
\ suit-compression-algorithm \ 1 : 1 \ gzip \
} /
This is quite similar to what you see in RFC8152:
/ protected / h'a10126' / {
\ alg \ 1:-7 \ ECDSA 256 \
} / ,
However this appears so much in SUIT and the bstrs are so large that this quickly becomes unmanagable. I proposed this notation at IETF108, and there was support for simplifying the printing, however it looks like I had an action item to adopt CDDL's version of diagnostic notation for encoded CBOR items that I didn't follow up. I'll make a PR that adopts https://datatracker.ietf.org/doc/html/rfc8610#appendix-G.3 so that this is more readable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #34
| suit-run = 12 | ||
| suit-text = 13 | ||
| suit-coswid = 14 | ||
| suit-text = 10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why this section was reordered.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bremoran Because text and coswid appear before validate, load, and run in the manifest (severable member appear before unseverable).
Some of the text fixes required changes to CDDL as well, which were not included in the text PRs. Those changes are included in this commit. In addition, many of the changes from #33 are included in this commit. Also fixed one typo in spec.
Various fixes/improvements/proposals, mostly in the CDDL. Look at the individual commit messages for more info.