Migrating from v9.x to v10.0
This page covers breaking changes that are identical across all platforms. For platform-specific migration steps, see the sub-pages:
MLS Initialization
-
mlsInit()was decoupled from key package creation. To create key packages after initializing MLS, callCoreCryptoContext.generateKeyPackage()in a transaction. -
Removed
CoreCrypto.provideTransport(), addedtransportparameter toCoreCryptoContext.mlsInit(). Instead of providing transport separately from MLS initialization, provide it when callingmlsInit().
Key Packages
-
We removed
CoreCryptoContext.clientKeypackages(). To generate a desired amount of key packages, make repeated calls toCoreCryptoContext.generateKeyPackage(). -
We removed
CoreCryptoContext.clientValidKeypackagesCount(). To count remaining key packages, callCoreCryptoContext.getKeyPackages(), filter the results as desired, and count the remaining items. -
We aligned key package spelling to
KeyPackage:- renamed
Keypackage→KeyPackage - renamed
KeypackageRef→KeyPackageRef - renamed
generateKeypackage→generateKeyPackage - renamed
getKeypackages→getKeyPackages - renamed
removeKeypackage→removeKeyPackage - renamed
removeKeypackagesFor→removeKeyPackagesFor
- renamed
-
We aligned cipher suite spelling to
CipherSuite:- renamed
Ciphersuite->CipherSuite
- renamed
Higher-Level Newtypes
-
GroupInfo.new()andWelcome.new()are now fallible constructors. Previously, both accepted any byte sequence unconditionally. They now validate the input as a TLS-encoded MLS structure at construction time and throw if the bytes are malformed. -
We removed
GroupInfo.copyBytes()andWelcome.copyBytes(). The underlying types no longer store raw bytes and cannot be round-tripped back to a byte array. -
Added
Welcome::serialize(). We had test functions which required the serialized bytes given aWelcomeinstance, so we added the ability to recreate those bytes. -
GroupInfoandWelcomeno longer support equality comparisons, hashing, or hex string display in generated bindings. -
exportSecretKey()now returns aSecretKeyobject instead of a byte array. To access the raw bytes, callsecretKey.copyBytes().
MlsTransport Interface
Instead of returning an MlsTransportResponse to communicate the reason why a message was rejected by the DS, throw an
MlsTransportError instead. MlsTransportResponse was removed.
No More Buffering of Unmerged Changes While Decrypting
During decryption, CoreCrypto would previously automatically replay previously executed but unmerged (i.e., not yet accepted by the delivery service) operations. This behavior has changed: the responsibility of replaying any unmerged operations is delegated to the consumer.
Other Changes
-
CoreCrypto.e2eiIsEnvSetup()can’t throw anymore and will always return a boolean. -
removed
.proteusFingerprintPrekeybundle()and.proteusLastResortPrekeyId()fromCoreCryptoContext. Both are available as static methods onCoreCrypto.