-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Description
Create a reader for CBOR (Concise Binary Object Representation), as defined in IETF RFC 7049.
- Initial implementation should be done directly into a test project
- Assume a new, netstandard2.0-based package (hedged bet)
- After the reader and writer are stable and feature complete, schedule an API review
- After API review, and associated changes, split things into ref/src/test with the declared package.
Rough project plan (approximately a PR for each stage, and 3-5 days of work)
- Support reading "unsigned" (positive) integers, negative integers, definite-length byte strings, definite-length text strings, as well as content-agnostic structure (e.g. "what kind of thing is next" and "skip this value").
- Support reading definite length arrays.
- Support reading definite length maps
- Note that maps are like
Dictionary<object, object>... key types are heterogeneous.
- Note that maps are like
- Support reading indefinite-length byte strings and text strings
- Nesting is not permitted
- Support reading indefinite-length arrays and maps
- Nesting is permitted, but mean distinct objects.
- Support reading major type 7 (float: half, single, double; boolean: true false; null; undefined; and "not yet defined" values
- Support reading tags, especially with Skip and as map keys.
- What does the read method return? Where is the reader positioned after reading the tag?
- Support important tagged types
- The two DateTimeOffset types
- Maybe the two BigInteger types
- The "Self-describing" type
- Add support for reader "conformance levels" / "canonicalization modes"
- To start: lax, IETF RFC 7049 section 3.9, and CTAP2 canonical CBOR encoding form (https://fidoalliance.org/specs/fido-v2.0-ps-20190130/fido-client-to-authenticator-protocol-v2.0-ps-20190130.pdf, section 6)
The reader is needed before the writer, so writing/testing the writer should not hold up a functioning reader.
samsosa and am11