# Blockchain Commons ## Wolf McNally Progress Update ## March 23, 2023 * CBOR Tags * [Planned renumbering of CBOR tags](https://hackmd.io/@bc-community/BkuQSI21n) in preparation for initial IANA application. * Tags likely to already be in use by developer community [are now marked “Fixed.”](https://github.com/BlockchainCommons/BCSwiftSecureComponents/blob/master/Sources/SecureComponents/Implementation/CBORTags.swift) I did not renumber any of these. * Tags 200-206 are now the “core” envelope tags: these are the ones we are going to apply to IANA for. * Actually submitting the application is still To Do. * Tags 207-212 are for distributed function calls. * Tags 300-323 are related to Bitcoin or SecureComponents. * Tags 400-410 are used as output descriptor types. * Tag 500 is used as response type for `OutputDescriptorResponse`. * Changed two UR type names: * [`crypto-digest` is now just `digest`.](https://github.com/BlockchainCommons/BCSwiftSecureComponents/blob/84de2287c88c3dc0e3fee94739f07f2a801f67dc/Sources/SecureComponents/Implementation/CBORTags.swift#L28) * [`crypto-msg` is now just `encrypted`.](https://github.com/BlockchainCommons/BCSwiftSecureComponents/blob/84de2287c88c3dc0e3fee94739f07f2a801f67dc/Sources/SecureComponents/Implementation/CBORTags.swift#L29) * [Updated Registry of UR Types to reflect recent changes and additions.](https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2020-006-urtypes.md) * Implemented these type and tag assignments in all our code and examples. * Research Repo * Updated [registry of UR types](https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2020-006-urtypes.md) to reflect changes to CBOR tags and UR types. * Deprecated [description of transaction requests/responses](https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2021-001-request.md) in favor of Gordian Envelope-based request/responses. * Updated doc on [Secure Messages](https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2022-001-secure-message.md) to reflect change in UR type and CBOR tag. * Updated doc on [CIDs](https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2022-001-secure-message.md) to reflect change in CBOR tag. * Envelope compression * [Designed and added eighth case to envelope specs: `compressed`.](https://blockchaincommons.github.io/WIPs-IETF-draft-envelope/draft-mcnally-envelope.html#name-compressed-case-format) * Behaves very much like `encrypted` and `elided` cases. * Together, all three are now consistently referred to in code and specs as the “obscured” cases. * [Implemented this across all our code and examples.](https://github.com/BlockchainCommons/BCSwiftEnvelope/blob/7b057fe1dca4e538c347c5084ecaa534c2f483dd/Sources/Envelope/Core/Envelope.swift#L30) * dCBOR Internet Draft * Removed requirement that map entries be non-`null`. * [Deployed to GitHub Pages.](https://blockchaincommons.github.io/WIPs-IETF-draft-deterministic-cbor/draft-mcnally-deterministic-cbor.html) * Envelope internet Draft * [Designed and added eighth case to envelope specs: `compressed`.](https://blockchaincommons.github.io/WIPs-IETF-draft-envelope/draft-mcnally-envelope.html#name-compressed-case-format) * ![](https://i.imgur.com/kdMobmB.png) * Updated to reflect renumbered tags. * [Deployed to GitHub Pages.](https://blockchaincommons.github.io/WIPs-IETF-draft-envelope/draft-mcnally-envelope.html) * BCSwiftCrypto * Created [BCSwiftCrypto](https://github.com/BlockchainCommons/BCSwiftCrypto), which exposes a uniform API for the cryptographic primitives used in higher-level Blockchain Commons projects. * Moved all crypto-related functions from higher up the stack into this package. * Refactored everything higher in the stack to use this package. * BCSwiftDCBOR * Removed requirement that map entries be non-`null`. * [Tagged as 0.8.0](https://github.com/BlockchainCommons/BCSwiftDCBOR/tree/0.8.0) * bc-dcbor-rust * Removed requirement that map entries be non-`null`. * [Tagged as 0.6.0](https://github.com/BlockchainCommons/bc-dcbor-rust/tree/0.6.0) and published to [crates.io](https://crates.io/crates/dcbor) * BCSwiftSecureComponents * Renumbered numerous envelope-related tags, and propagated these changes throughout our code and docs. * Added [`Compressed` component](https://github.com/BlockchainCommons/BCSwiftSecureComponents/blob/master/Sources/SecureComponents/Compressed.swift), used by envelope. * [Tagged as 4.0.3.](https://github.com/BlockchainCommons/BCSwiftSecureComponents/tree/4.0.3) * BCSwiftEnvelope * Implemented tag changes. * Added [envelope compression.](https://github.com/BlockchainCommons/BCSwiftEnvelope/blob/master/Sources/Envelope/Features/Compress.swift) * Added unit tests to test [cases of transforming between obscured envelopes.](https://github.com/BlockchainCommons/BCSwiftEnvelope/blob/master/Tests/EnvelopeTests/ObscuringTests.swift) * For instance, you can’t encrypt an already-encrypted or elided envelope, but you can encrypt a compressed envelope. * Added [capability for elision via target set to elide, encrypt, or compress.](https://github.com/BlockchainCommons/BCSwiftEnvelope/blob/7b057fe1dca4e538c347c5084ecaa534c2f483dd/Sources/Envelope/Features/Elide.swift#L7) * Updated all documentation and examples. * [Tagged as 0.8.2.](https://github.com/BlockchainCommons/BCSwiftEnvelope/tree/0.8.2) * BCSwiftFoundation * Aligned to all changes in dependencies. * [Tagged as 7.0.3.](https://github.com/BlockchainCommons/BCSwiftFoundation/tree/7.0.3) * envelope-cli-swift * Added compression and uncompression commands. * ![](https://i.imgur.com/so5inEB.png) * In accordance with current [dCBOR I-D draft](https://blockchaincommons.github.io/WIPs-IETF-draft-deterministic-cbor/draft-mcnally-deterministic-cbor.html), Updated envelope command line tool so it no longer distinguishes between numeric types. The `--float` and `--int` options are gone and now there is just `--number`for both insertion and extraction. * ![](https://i.imgur.com/WN3zhiG.png) * Added ability to elide, compress, or encrypt by set of target digests. * ![](https://i.imgur.com/CaZL0TM.png) * Updated all documentation and examples, including adding examples of compression. * [Tagged as 0.6.1.](https://github.com/BlockchainCommons/envelope-cli-swift/tree/0.6.1) * Upcoming IETF Dispatch meeting * Registered for attendance. * Prepared [slide deck.](https://www.dropbox.com/s/kh6rwei3cmuizmq/Envelope%20IETF%20Presentation%20Mar%202023.key?dl=0) * Submitted [slide deck PDF.](https://www.dropbox.com/s/iqzz80a5se8ul9i/Envelope%20IETF%20Presentation%20Mar%202023.pdf?dl=0) * Gordian repo. * Updated [Envelope docs](https://github.com/BlockchainCommons/Gordian/tree/master/Envelope#articles), including writing [a script](https://github.com/BlockchainCommons/Gordian/blob/master/Envelope/create_output_formats.sh) to completely regenerate the [OutputFormats.md](https://github.com/BlockchainCommons/Gordian/blob/master/Envelope/OutputFormats.md) document when necessary. * ![](https://i.imgur.com/XDtb6kT.png) * Updated [Swift module dependencies.](https://github.com/BlockchainCommons/Gordian/blob/master/SwiftDependencies.md) * Went back to using Flying Logic to export a graphic; it's just too difficult to maintain as Mermaid right now.