Skip to content

Releases: wireapp/core-crypto

Release v0.6.0

13 Feb 09:43
Compare
Choose a tag to compare
git-conventional changelog {{git-cliff tag="v0.6.0" unreleased=true }}

Platform support status:

  • x86_64-unknown-linux-gnu ✅
  • x86_64-apple-darwin ✅
  • armv7-linux-androideabi ✅
  • aarch64-linux-android ✅
  • i686-linux-android ✅
  • x86_64-linux-android ✅
  • aarch64-apple-ios ✅
  • aarch64-apple-ios-sim ✅
  • x86_64-apple-ios ✅
  • wasm32-unknown-unknown ✅

0.6.0 Release changes

  • [BREAKING CHANGE] E2EI solution API overhauled from pre-release versions
    • This was made to fix some incompatibilities between the DPoP RFC and our code; The API had to be changed as a consequence
    • Please refer to the following point to see the changes
  • First stable version of Wire's end-to-end identity client library. It allows a MLS client to generate a x509 certificate proving possession of its userId, clientId and displayName for a given domain/backend. This certificate will later be used as a MLS credential in place of the only currently supported "basic" one which consists of a public key.
    • To generate such a certificate, use the new_acme_enrollment method on a partially initialized CoreCrypto instance. This will generate a temporary key material for the enrollment session with the ACME server. Note that only Ed25519 signature scheme is supported at the moment.
    • Only the "enrollment" flow is defined for the moment. Later on, "refresh" and "revocation" flows will be added.
    • This library is heavily opinionated and only suited for Wire custom flow, with our fork of the acme server. Any attempt to use it as a generic purpose acme client library will fail terribly.
    • To make sure this works as expected, this library has been tested against the actual acme-server thanks to testcontainers. Only the OIDC provider has been mocked for the moment due to the fact that the target provider Dex does not yet support Ed25519 signatures.

0.6.0 pre-release changes tl;dr, for information

Changes

  • Added support for externally-generated MLS clients
    • This allows you to generate a standalone Credential/KeyPair, submit it to your MLS Authentication Service, and then update this credential with a newly-attributed Client ID.
  • Added APIs to support Proteus Last Resort Prekeys
  • Added support for Proteus error codes
    • WASM:
      • all errors are now instances of CoreCryptoError which extends the standard JavaScript Error but with additional properties:
        • rustStackTrace contains the original Rust error string.
        • proteusErrorCode contains the error code for Proteus calls. If it's 0, no error, otherwise it contains the code
      • WASM/TS now has access to the CoreCrypto.proteusLastErrorCode() method which allows to retrieve the last-occured proteus error and thus brings it to parity with other FFIs
    • On other platforms, the FFI has gained a proteus_last_error_code method.
  • Fixed a bug where the keystore would not execute its IndexedDB upgrade handler on WASM, leading to older stores and/or new tables not being structurally consistent
  • Added missing Proteus APIs to bindings and FFI:
    • proteus_new_prekey_auto: generates a new PreKeyBundle with an automatically incremented ID
      • To do this, CoreCrypto finds the first "free" ID within the 0..u16::MAX - 1 range and creates a PreKey using this ID.
  • Added Proteus compatibility layer support
  • Added API to export secret key derived from the group and client ids from the members
  • Change DecryptedMessage signature
    • The decrypt API now returns if the decrypted message changed the epoch through the hasEpochChanged field
  • Members can now rejoin group by external commits
    • Validate received external commits
    • Added clear_pending_group_from_external_commit
    • External commit returns a bundle containing the PGS

Breaking changes

  • [BREAKING CHANGE] Changed callbacks to be async
    • This allows consumers to perform async I/O within the callbacks
    • Note this doesn't affect the Kotlin/Swift bindings as UniFFI does not support async yet.
  • BREAKING Renamed callback client_id_belongs_to_one_of to client_is_existing_group_user
  • BREAKING WASM: Omitted in last build; CoreCrypto.deferredInit now takes an object with the parameters much like init() for consistency reasons.
  • BREAKING No one was probably using it, but the C-FFI has been removed

There has been an extensive pre-release period (with many -pre and -rc releases), the original changelog for those has been collapsed below:

0.6.0 pre-releases changelog

[0.6.0-rc.8] - 2023-02-09

git-conventional changelog {{git-cliff tag="v0.6.0-rc.8"}}
  • Added support for externally-generated MLS clients
    • This allows you to generate a standalone Credential/KeyPair, submit it to your MLS Authentication Service, and then update this credential with a newly-attributed Client ID.
  • [BREAKING CHANGE] Changed callbacks to be async
    • This allows consumers to perform async I/O within the callbacks
    • Note this doesn't affect the Kotlin/Swift bindings as UniFFI does not support async yet.
  • Added APIs to support Proteus Last Resort Prekeys

[0.6.0-rc.7] - 2023-02-06

git-conventional changelog {{git-cliff tag="v0.6.0-rc.7"}}
  • Fixed WASM build when imported from the outside
    • Made sure we're not leaking internal/private interfaces anymore and causing issues
    • Also added a test to our JS E2E suite to make sure importing the package with TS is successful and we do not encounter regressions like these anymore
  • BREAKING WASM: Omitted in last build; CoreCrypto.deferredInit now takes an object with the parameters much like init() for consistency reasons.

[0.6.0-rc.6] - 2023-02-01

git-conventional changelog {{git-cliff tag="v0.6.0-rc.6"}}

IMPORTANT: The previous release (0.6.0-rc.5) is non-functional in general. The proteus error reporting does NOT work

There's a post mortem available here: #230 (comment)

  • Fixed support for Proteus error codes
    • WASM:
      • all errors are now instances of CoreCryptoError which extends the standard JavaScript Error but with additional properties:
        • rustStackTrace contains the original Rust error string.
        • proteusErrorCode contains the error code for Proteus calls. If it's 0, no error, otherwise it contains the code
      • WASM/TS now has access to the CoreCrypto.proteusLastErrorCode() method which allows to retrieve the last-occured proteus error and thus brings it to parity with other FFIs
    • On other platforms, the API is unchanged, but now works.

[0.6.0-rc.5] - 2023-01-25

git-conventional changelog {{git-cliff tag="v0.6.0-rc.5"}}
  • BREAKING: Changed the signature of the client_is_existing_group_user callback to add the group id as the first argument
    • Before: client_is_existing_group_user(client_id: ClientId, existing_clients: Vec<ClientId>) -> bool
    • After: client_is_existing_group_user(conversation_id: ConversationId, client_id: ClientId, existing_clients: Vec<ClientId>) -> bool
  • Added support for Proteus error codes
    • On WASM, the JS Error contains a proteusError method that returns the error code as an integer. If there's no error it returns 0.
    • On other platforms, the FFI has gained a proteus_last_error_code method.
  • Fixed a bug where the keystore would not execute its IndexedDB upgrade handler on WASM, leading to older stores and/or new tables not being structurally consistent
  • Updated RustCrypto dependencies
  • Tooling: moved code coverage CI from Tarpaulin to LLVM-Cov
    • This lowered the execution time of our codecov CI from ~25-30 minutes down to ~15-20 minutes
    • This leads to more accurate code coverage as well - along with some false negatives such as #[derive] statements

[0.6.0-rc.4] - 2023-01-20

git-conventional changelog {{git-cliff tag="v0.6.0-rc.4"}}
  • First bytes of end to end identity exposed. Thanks to the ACME protocol, it allows requesting a x509 certificate from an authority and then use it to create a MLS Credential.
  • Fixed cargo-make Makefile.toml to allow building JVM bindings whatever the platform you're running
    • This is done by adding tests to the relevant tasks, allowing to conditionally execute them.
  • Added a Makefile task to build the core_crypto_ffi Kotlin binding docs (via Dokka) and integrate them into the doc package
  • Updated UniFFI to 0.22
  • Other minor improvements on internal build/release tools (mainly our cargo xtask command)
  • Semi-breaking: Behavior change on ProteusCentral::import_cryptobox (aka Cryptobox import).
    • WASM: If the provided store path is missing or doesn't have the expected tables, we now throw a CryptoboxMigrationError::ProvidedPathDoesNotExist error
    • Other platforms: If the provided cryptobox folder at path is missing, we now throw a CryptoboxMigrationError::ProvidedPathDoesNotExist error
    • Likewise, on all platforms, if the Cryptobox Identity is not present, we now throw a CryptoboxMigrationError::IdentityNotFound error and abort the process
  • Tooling: Added a custom WASM test runner based on WebDriver (BiDi interactive test progress reporting in progress still)

[0.6.0-rc.3] - 2022-12-15

git-conventional changelog {{git-cliff tag="v0.6.0-rc.3"}}
  • Added missing Proteus APIs to bindings and FFI:
    • proteus_new_prekey_auto: generates a new PreKeyBundle ...
Read more

Release v0.6.0-rc.8

09 Feb 17:07
Compare
Choose a tag to compare
Release v0.6.0-rc.8 Pre-release
Pre-release
git-conventional changelog

Features

  • Added support for Proteus Last Resort PreKeys (boooo!)
  • [breaking] Async callbacks
  • Externally-generated clients

Miscellaneous Tasks

  • Updated webdriver version to chrome 110
  • Added support for externally-generated MLS clients
    • This allows you to generate a standalone Credential/KeyPair, submit it to your MLS Authentication Service, and then update this credential with a newly-attributed Client ID.
  • [BREAKING CHANGE] Changed callbacks to be async
    • This allows consumers to perform async I/O within the callbacks
    • Note this doesn't affect the Kotlin/Swift bindings as UniFFI does not support async yet.
  • Added APIs to support Proteus Last Resort Prekeys

Release v0.6.0-rc.7

06 Feb 16:38
Compare
Choose a tag to compare
Release v0.6.0-rc.7 Pre-release
Pre-release
git-conventional changelog

Bug Fixes

  • TS/WASM build issues & test
  • Fixed WASM build when imported from the outside
    • Made sure we're not leaking internal/private interfaces anymore and causing issues
    • Also added a test to our JS E2E suite to make sure importing the package with TS is successful and we do not encounter regressions like these anymore
  • BREAKING WASM: Omitted in last build; CoreCrypto.deferredInit now takes an object with the parameters much like init() for consistency reasons.

Release v0.6.0-rc.6

02 Feb 17:38
Compare
Choose a tag to compare
Release v0.6.0-rc.6 Pre-release
Pre-release
git-conventional changelog

Bug Fixes

  • Proteus error system not working (at all)
  • Force cargo to use git cli to avoid intermittent CI failures

Miscellaneous Tasks

  • Updated rstest_reuse to 0.5
  • Updated spinoff to 0.7
  • Added codecov settings
  • Update node to LTS 18 & enable JS e2e testing
  • Make npm build run wasm-opt in Os
  • Update JVM publish workflow to build on native platforms (#229)

IMPORTANT: The previous release (0.6.0-rc.5) is non-functional in general. The proteus error reporting does NOT work

There's a post mortem available here: #230 (comment)

  • Fixed support for Proteus error codes
    • WASM:
      • all errors are now instances of CoreCryptoError which extends the standard JavaScript Error but with additional properties:
        • rustStackTrace contains the original Rust error string.
        • proteusErrorCode contains the error code for Proteus calls. If it's 0, no error, otherwise it contains the code
      • WASM/TS now has access to the CoreCrypto.proteusLastErrorCode() method which allows to retrieve the last-occured proteus error and thus brings it to parity with other FFIs
    • On other platforms, the API is unchanged, but now works.

Release v0.6.0-rc.5

25 Jan 12:39
Compare
Choose a tag to compare
Release v0.6.0-rc.5 Pre-release
Pre-release
git-conventional changelog

Bug Fixes

  • [breaking] Added conversation id to clientIsExistingGroupUser callback
  • Increment IndexedDB store version when crate version changes

Features

  • Added support for Proteus error codes

Miscellaneous Tasks

  • Moved codecov from tarpaulin to llvm-cov
  • Updated RustCrypto primitives & git dep in xtask
  • BREAKING: Changed the signature of the client_is_existing_group_user callback to add the group id as the first argument
    • Before: client_is_existing_group_user(client_id: ClientId, existing_clients: Vec<ClientId>) -> bool
    • After: client_is_existing_group_user(conversation_id: ConversationId, client_id: ClientId, existing_clients: Vec<ClientId>) -> bool
  • Added support for Proteus error codes
    • On WASM, the JS Error contains a proteusError method that returns the error code as an integer. If there's no error it returns 0.
    • On other platforms, the FFI has gained a proteus_last_error_code method.
  • Fixed a bug where the keystore would not execute its IndexedDB upgrade handler on WASM, leading to older stores and/or new tables not being structurally consistent
  • Updated RustCrypto dependencies
  • Tooling: moved code coverage CI from Tarpaulin to LLVM-Cov
    • This lowered the execution time of our codecov CI from ~25-30 minutes down to ~15-20 minutes
    • This leads to more accurate code coverage as well - along with some false negatives such as #[derive] statements

Release v0.6.0-rc.4

25 Jan 10:39
Compare
Choose a tag to compare
Release v0.6.0-rc.4 Pre-release
Pre-release
  • First bytes of end to end identity exposed. Thanks to the ACME protocol, it allows requesting a x509 certificate from an authority and then use it to create a MLS Credential.
  • Fixed cargo-make Makefile.toml to allow building JVM bindings whatever the platform you're running
    • This is done by adding tests to the relevant tasks, allowing to conditionally execute them.
  • Added a Makefile task to build the core_crypto_ffi Kotlin binding docs (via Dokka) and integrate them into the doc package
  • Updated UniFFI to 0.22
  • Other minor improvements on internal build/release tools (mainly our cargo xtask command)
  • Semi-breaking: Behavior change on ProteusCentral::import_cryptobox (aka Cryptobox import).
    • WASM: If the provided store path is missing or doesn't have the expected tables, we now throw a CryptoboxMigrationError::ProvidedPathDoesNotExist error
    • Other platforms: If the provided cryptobox folder at path is missing, we now throw a CryptoboxMigrationError::ProvidedPathDoesNotExist error
    • Likewise, on all platforms, if the Cryptobox Identity is not present, we now throw a CryptoboxMigrationError::IdentityNotFound error and abort the process
  • Tooling: Added a custom WASM test runner based on WebDriver (BiDi interactive test progress reporting in progress still)

Release v0.6.0-rc.3

15 Dec 17:41
Compare
Choose a tag to compare
Release v0.6.0-rc.3 Pre-release
Pre-release
  • Added missing Proteus APIs to bindings and FFI:
    • proteus_new_prekey_auto: generates a new PreKeyBundle with an automatically incremented ID
      • To do this, CoreCrypto finds the first "free" ID within the 0..u16::MAX range and creates a PreKey using this ID.
  • Added missing documentation when it comes to Proteus eager Session persistence.
    • Previously undocumented change, but since 0.6.0-rc.1, CoreCrypto eagerly persists Proteus Sessions (much like it does with MLS groups) when needed:
      • Decrypting or Encrypting messages, as ratcheting key material can be produced and as such must be persisted
        • We'll add a more "manual" API later on if you want to control when data is persisted (because it is performance heavy)
      • Initializing Sessions through PreKeyBundles or incoming Messages

Release v0.6.0-rc.2

15 Dec 16:41
Compare
Choose a tag to compare
Release v0.6.0-rc.2 Pre-release
Pre-release
  • This is a maintenance release that contains no functional changes compared to 0.6.0-rc.1
  • Fixed Android CI release process targeting NDK 21.

Release v0.6.0-rc.1

15 Dec 11:03
Compare
Choose a tag to compare
Release v0.6.0-rc.1 Pre-release
Pre-release
  • Fixed a compilation issue related to the sha1 crate's ASM
  • Added a restore_from_disk API to enable using CoreCrypto from various instances
  • Various internal improvements to testing to increase resistance to uncommon scenarios
  • Proteus:
    • Expose proteus prekey fingerprint
    • Fixed the TypeScript exposed types
    • Fixed Cryptobox import
    • Fixed broken Proteus implementation that led to decryption errors after key import
  • MLS:
    • Expose a WrongEpoch error
    • Added an error when trying to break PFS
    • BREAKING: Tweaked the configuration format, removed and added some options

v0.6.0-pre.4

07 Nov 10:31
Compare
Choose a tag to compare
v0.6.0-pre.4 Pre-release
Pre-release

What's Changed

Full Changelog: https://github.com/wireapp/core-crypto/blob/develop/CHANGELOG.md