-
Notifications
You must be signed in to change notification settings - Fork 334
WPB-19575: Drop Cryptobox #4719
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
base: develop
Are you sure you want to change the base?
Conversation
e102880 to
ed52c10
Compare
a427565 to
b6a7e7e
Compare
| -- = Format Specification | ||
| -- | ||
| -- The input is expected to be a serialized CBOR Map adhering to the rules defined in __RFC 8949__. | ||
| -- | ||
| -- The structure of the map is expected to be as follows: | ||
| -- | ||
| -- * **Root Object**: CBOR Map (Major Type 5). | ||
| -- * **Key 0** (@Unsigned Int@): Protocol Version or Algorithm Identifier. | ||
| -- * **Key 1** (@Unsigned Int@): **The Prekey ID** (Target of extraction). | ||
| -- * **Key 2** (@Map@): The raw Public Key material (often a nested COSE-like structure). | ||
| -- | ||
| -- = References | ||
| -- | ||
| -- * <https://www.rfc-editor.org/rfc/rfc8949.html RFC 8949>: Concise Binary Object Representation (CBOR) | ||
| -- * <https://www.rfc-editor.org/rfc/rfc9052.html RFC 9052>: CBOR Object Signing and Encryption (COSE) - /Contextual/ | ||
| -- |
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.
Instead of this comment, can we please write a type and parse things into it? Then the comment could just be a link to the spec.
This would also make the code much simpler because we're now parsing into a generic CBOR term.
| -- == Errors | ||
| -- | ||
| -- This function returns a 'Left String' in the following cases: | ||
| -- | ||
| -- 1. The input is not valid base64 data. | ||
| -- 2. The input is not valid CBOR data. | ||
| -- 3. The root object is not a Map. | ||
| -- 4. The key @1@ is missing from the Map. | ||
| -- 5. The value associated with key @1@ is not an integer. |
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.
This is gonna go stale as soon as someone touches it. If we really want this, we should create an error type. Otherwise, I'm also ok with just deleting this part.
b6a7e7e to
f00fc9f
Compare
f6fd80a to
38aabc0
Compare
https://wearezeta.atlassian.net/browse/WPB-19575
Checklist
changelog.d