Releases: wireapp/core-crypto
Releases · wireapp/core-crypto
Release v0.6.0
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.
- To generate such a certificate, use the
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 JavaScriptError
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
- all errors are now instances of
- On other platforms, the FFI has gained a
proteus_last_error_code
method.
- WASM:
- 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.
- To do this, CoreCrypto finds the first "free" ID within the
- 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 thehasEpochChanged
field
- The
- 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
toclient_is_existing_group_user
- BREAKING WASM: Omitted in last build;
CoreCrypto.deferredInit
now takes an object with the parameters much likeinit()
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 likeinit()
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 JavaScriptError
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
- all errors are now instances of
- On other platforms, the API is unchanged, but now works.
- WASM:
[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
- Before:
- 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.
- On WASM, the JS Error contains a
- 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 aCryptoboxMigrationError::ProvidedPathDoesNotExist
error - Other platforms: If the provided cryptobox folder at
path
is missing, we now throw aCryptoboxMigrationError::ProvidedPathDoesNotExist
error - Likewise, on all platforms, if the Cryptobox Identity is not present, we now throw a
CryptoboxMigrationError::IdentityNotFound
error and abort the process
- WASM: If the provided store
- 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 ...
Release v0.6.0-rc.8
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
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 likeinit()
for consistency reasons.
Release v0.6.0-rc.6
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 JavaScriptError
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
- all errors are now instances of
- On other platforms, the API is unchanged, but now works.
- WASM:
Release v0.6.0-rc.5
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
- Before:
- 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.
- On WASM, the JS Error contains a
- 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
- 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 aCryptoboxMigrationError::ProvidedPathDoesNotExist
error - Other platforms: If the provided cryptobox folder at
path
is missing, we now throw aCryptoboxMigrationError::ProvidedPathDoesNotExist
error - Likewise, on all platforms, if the Cryptobox Identity is not present, we now throw a
CryptoboxMigrationError::IdentityNotFound
error and abort the process
- WASM: If the provided store
- Tooling: Added a custom WASM test runner based on WebDriver (BiDi interactive test progress reporting in progress still)
Release v0.6.0-rc.3
- 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.
- To do this, CoreCrypto finds the first "free" ID within the
- 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
- Decrypting or Encrypting messages, as ratcheting key material can be produced and as such must be persisted
- Previously undocumented change, but since
Release v0.6.0-rc.2
- 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
- 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
- Expose a
v0.6.0-pre.4
What's Changed
- fix: Publication of swift packages [CL-49] by @augustocdias in #165
- fix: Make tags have semantic versioning names and downgrading to swift 5.5 - CL-49 by @augustocdias in #166
- feat: Expose session exists through the ffi - CL-101 by @augustocdias in #167
- chore: fix new clippy warnings in 1.65 by @beltram in #170
- fix: consistent commits by @beltram in #169
- fix!: Incorrect handling of enums across WASM FFI [CL-104] by @OtaK in #168
- test: pure ciphertext by @beltram in #160
- Release 0.6.0-pre.4 by @augustocdias in #171
Full Changelog: https://github.com/wireapp/core-crypto/blob/develop/CHANGELOG.md