- Update matrix-rusk-sdk to
e99939db857ca
. - The published package is now a proper dual CommonJS/ESM package.
- The WebAssembly module is now loaded using
fetch
on Web platforms, reducing the bundle size significantly, as well as the time it takes to compile it. (#167), (#174), (#175)
BREAKING CHANGES
- The WebAssembly module is no longer synchronously loaded on Web platforms
when used. This means that the
initAsync
function must be called before any other functions are used. The behaviour is unchanged and still available on Node.js.
- Update matrix-rust-sdk to
70bcddfba5e19
.
BREAKING CHANGES
- Remove
SignedCurve25519
variant ofDeviceKeyAlgorithm
.
- Update matrix-rust-sdk to
ce9dc73376b4ee
- Update other dependencies
BREAKING CHANGES
-
Rename
DecryptionErrorCode.SenderIdentityPreviouslyVerified
toSenderIdentityVerificationViolation
(in line with changes to matrix-rust-sdk). -
Rename
UserIdentity
toOtherUserIdentity
(in line with changes to matrix-rust-sdk). -
Update matrix-rust-sdk to
3558886b9
.
-
Update matrix-rust-sdk to
866b6e5f
, which includes:
BREAKING CHANGES
- The
SenderIdentityNotTrusted
value in theDecryptionErrorCode
was replaced withUnknownSenderDevice
,UnsignedSenderDevice
, andSenderIdentityPreviouslyVerified
to allow the application to distinguish between the different reasons that the sender identity is not trusted.
Other changes
-
Add
OlmMachine.markAllTrackedUsersAsDirty
to invalidate the device lists for all known users. This is required for MSC4186 clients as the server may give up trying to persist device list updates for the client at some point, after which the client must treat all devices as dirty. -
Update matrix-rust-sdk to
2408df8bf
. No changes relevant to these bindings.
BREAKING CHANGES
- The format for
EncryptionSettings.sharingStrategy
has changed. It must now be created using theCollectStrategy.deviceBasedStrategy(...)
orCollectStrategy.identityBasedStrategy()
functions. (#141) - The
OlmMachine.decryptRoomEvent
has a newDecryptionSettings
parameter that allows specifying the required sender trust level. If the trust level is not met, the decryption will fail. To replicate the old behaviour, use a sender trust level ofTrustRequirement.Untrusted
. (#141)
Security Fixes
- Fix
UserIdentity.isVerified
to take into account our own identity #d8d9dae (Moderate, GHSA-4qg4-cvh2-crgg).
Other changes
-
Add
(Own)UserIdentity.wasPreviouslyVerified()
,(Own)UserIdentity.withdrawVerification()
, and(Own)UserIdentity.hasVerificationViolation()
to check and manage the state of users who were previously verified but are no longer verified. (#141) -
Add
UserIdentity.pinCurrentMasterKey()
andUserInfo.identityNeedsUserApproval()
to manage user identity changes. (#141) -
ShieldState
has a newcode
property that is set when the shield state is notNone
. (#141) -
Add a new API
Device.encryptToDeviceEvent
to encrypt a to-device message using Olm. (#101) -
Update matrix-rust-sdk to
07aa6d7bc
, which includes:-
NOTE: this version causes changes to the format of the serialised data in the CryptoStore, meaning that, once upgraded, it will not be possible to roll back applications to earlier versions without breaking user sessions.
-
Miscellaneous improvements to logging for verification and
OwnUserIdentity
updates. (#3949) -
Add message IDs to all outgoing encrypted to-device messages. (#3776)
-
BREAKING CHANGES
EncryptionSettings.onlyAllowTrustedDevices
has been replaced withEncryptionSettings.sharingStrategy
, which adds the ability to share only with cross-signed devices. (#134)
Other changes
-
Add
OlmMachine.registerRoomKeysWithheldCallback
to notify when we are told that room keys have been withheld. (#136) -
Update matrix-rust-sdk to
d9b2b53f8
, which includes:
- Update matrix-rust-sdk to
7b25a1c2f
, which includes fixes to bugs introduced in v6.2.0. (#3651)
-
Update matrix-rust-sdk to
09d53a52a
, which includes:- Improve the efficiency of objects stored in the crypto store. (#3645)
-
Set "creation time" of
OlmAccount
s which were migrated from legacy libolm data to the unix epoch, instead of "now". Fixes element-hq/element-web#27590. (#128) -
Update matrix-rust-sdk to
a2235d50c
. No changes relevant to these bindings.
BREAKING CHANGES
-
Rename the
QrCodeData
related methods so they use camel case. (0d58c688d) -
Rename the
QrCodeData.homeserver_url
method toQrCodeData.server_name
to reflect the changed data stored in the QR code. (#124) -
Update matrix-rust-sdk to
9b05d0d82
, which includes:
BREAKING CHANGES
OlmMachine.importBackedUpRoomKeys
now takes abackupVersion
argument.
Other changes
-
Update matrix-rust-sdk to
7e44fbca7
, which includes:-
Avoid emitting entries from
identities_stream_raw
anddevices_stream
when we receive a/keys/query
response which shows that no devices changed. (#3442). -
Fix to a bug introduced in matrix-sdk-crypto-wasm v4.10.0 which caused keys that had been imported from key backup to be backed up again, when using the in-memory datastore.
-
-
Improve the return types of
OlmMachine.{import,export}exportSecretsBundle()
. (#123)
-
Expose new constructor function
OlmMachine.openWithKey()
. (#119) -
Add
OlmMachine.importSecretsBundle()
andOlmMachine.exportSecretsBundle()
methods as well as theSecretsBundle
class to import end-to-end encryption secrets in a bundled manner. -
Expose the vodozemac ECIES support, which can be used to establish the secure channel required for QR code login described in MSC4108.
-
Add
QrCodeData
andQrCodeMode
classes which can be used to parse or generate QR codes intended for the QR code login mechanism described in MSC4108. -
Add a constructor for the
Curve25519PublicKey
type. This allows us to create aCurve25519PublicKey
from a Base64 string on the Javascript side. -
Update matrix-rust-sdk to
d7a887766c
, which includes:
-
Update matrix-rust-sdk to
ab9e4f73b
. -
Add
OlmMachine.deviceCreationTimeMs
. (#112)
-
Update matrix-rust-sdk to
6aee1f62bd
, which includes: -
Add
OlmMachine.dehydratedDevices()
andDehydratedDevices
class to support dehydrated devices. (#104) -
Fix a problem when using matrix-sdk-crypto-wasm in a webapp running in the webpack dev server; when rebuilding, the server would throw an error. (#109)
- Update dependencies, including matrix-rust-sdk to
88a8a7007ca34408af21c7e0bee81b2c344b155c which provides the
_disable-minimum-rotation-period-ms
feature flag.
- Update dependencies, including matrix-rust-sdk to dcf00697539321cf4eac5cd4929d45347b947da7 Use the new export_room_keys_stream method to reduce one copy of the keys made during export.
- Update dependencies, including matrix-rust-sdk to 5957d9603bd8a3f00ddd9a52bda80224c853bcd1 to get matrix-org/matrix-rust-sdk#3095 which speeds up the schema upgrade v8->v10 again. See element-hq/element-web#26948
- Update dependencies, including matrix-rust-sdk to 87a07d9ee32e576963c2e55889bbb504d4bb4ede to get matrix-org/matrix-rust-sdk#3090 which speeds up the schema upgrade v8->v10. See element-hq/element-web#26948
- Update
matrix-rust-sdk
version (f64af126f1a618969737f6eacc87427db106224e) to get matrix-org/matrix-rust-sdk#3073 which improves Indexed DB performance by moving to schema v10.
- Update
matrix-rust-sdk
version (f5f8f47667f686d7937d4d31040032281fcf2cfc)
-
Add
Unknown
toEncryptionAlgorithm
, representing unsupported algorithms coming from matrix-sdk-crypto'sEventEncryptionAlgorithm
. (#92) -
Add new methods
OlmMachine.{get,set}RoomSettings
. (#95) -
Add
OlmMachine.registerDevicesUpdatedCallback
to notify when devices have been updated. (#88)
-
PickledInboundGroupSession.sender_signing_key
is now optional. (#89) -
Properly encode missing and
Duration
parameters in requests. (#72)
BREAKING CHANGES
-
Rename
OlmMachine.init_from_store
introduced in v3.6.0 toOlmMachine.initFromStore
. (#84) -
Functions/methods that take a JavaScript
Array
as argument now invalidate the items within that array so that they cannot be re-used as soon as they are received by the functions/methods. See the patch for affected methods. (#82)
Other changes
-
Update
wasm-bindgen
to 0.2.89. It allows to remove thedowncast
method. It fixes #51, thus the resulting JavaScript code ofmatrix-rust-sdk-crypto-wasm
can be minified with no issue now. (#82) -
Report failures to callback when importing backed-up room keys. The
progress_listener
callback in theOlmMachine.importBackedUpRoomKeys
function is now called with a third argument, giving the number of invalid room keys. (#85)
-
Add a
Migration
class, supporting importing account and session data from libolm. (#77) -
Add a
StoreHandle
class which can be used to hold a connection to a crypto store, and thus improve performance when doing multiple operations on the store. (#76) -
Update
matrix-rust-sdk
version, with changes including:- Fix for an issue which caused the same keys to be repeatedly backed up. (matrix-rust-sdk#2937)
- Performance improvement in
markRequestAsSent
. (matrix-rust-sdk#2977) - Logging for the open sequence for indexeddb store. (matrix-rust-sdk#2983)
-
Update matrix-rust-sdk version, providing several changes including a fix for occasional freezes (element-hq/element-web#26488).
-
New API
OlmMachine.requestMissingSecretsIfNeeded
that creates an outgoing secret request to other sessions. -
Verification cancel codes for
cancelWithCode
andcancelInfo.cancelCode
are now passed as strings rather than an enum.
- Include Rust symbol names in the generated wasm output. (#65)
- Add new properties
roomKeyRequestsEnabled
androomKeyForwardingEnabled
to OlmMachine. (#60, (matrix-rust-sdk#2902)
-
Add
timeout_secs
parameters toOlmMachine.get_user_devices
andOlmMachine.get_device
. (#60) -
Improve efficiency of IndexedDB storage of
inbound_group_sessions
. (matrix-rust-sdk#2885)
-
Improve performance of
OlmMachine.shareRoomKey
. (matrix-rust-sdk#2862) -
OlmMachine.getMissingSessions
: Don't block waiting for/keys/query
requests on blacklisted servers, and improve performance. (matrix-rust-sdk#2845) -
Various clarifications to the log messages written during encryption operations. (matrix-rust-sdk#2859)
-
OlmMachine.importRoomKeys
is now deprecated in favour of separate methods for importing room keys from backup and export,OlmMachine.importBackedUpRoomKeys
andOlmMachine.importExportedRoomKeys
. -
Minor improvements to the formatting of messages logged to the console.
BREAKING CHANGES
-
OlmMachine.bootstrapCrossSigning
no longer returns an array of request objects. Rather, it returns a new class (CrossSigningBootstrapRequests
) which contains the request objects within it.As part of this work,
SigningKeysUploadRequest
(which was one of the types formerly returned bybootstrapCrossSigning
) has been renamed toUploadSigningKeysRequest
for consistency with the underlying SDK.
-
Devices which have exhausted their one-time-keys will now be correctly handled in
/keys/claim
responses (we will register them as "failed" and stop attempting to send to them for a while.) -
Olm decryption operations will no longer log large quantities of data about the data
Store
.
Do not use this release. It has a critical bug.
- Added bindings versions details to
getVersions()
. Two new fieldsgit_sha
andgit_description
have been included in the returnedVersions
struct.
-
Clean up the logging of to-device messages in
share_room_key
. Also fixes somepanic
errors which were introduced in v2.1.0. -
Remove spurious "Unknown outgoing secret request" warning which was logged for every outgoing secret request.
-
Various other changes.
-
Attach message IDs to outgoing to-device messages, and log the IDs on incoming messages.
-
Improve logging output to include more information, including data that is attached to tracing spans. Remove the
tracing
feature: tracing support is now always included. -
BugFix:
ToDeviceRequest
returned byshareRoomKey(..)
always had anundefined
id
field.
- Updated rust sdk version to revision c2bb76029ae6d99c741727e0f87abcd734377016, including:
- API Break:
RoomId.localpart
andRoomId.serverName
have been removed. - Add new secrets API
OlmMachine.registerReceiveSecretCallback
,OlmMachine.getSecretsFromInbox
,OlmMachine.deleteSecretsFromInbox
.
- Add
OlmMachine.registerUserIdentityUpdatedCallback
. - Expose new method
OlmMachine.getRoomEventEncryptionInfo
. - Update
IndexeddbCryptoStore
to use a single store for outgoing secret requests.
OlmMachine.decrypt_room_event()
now throws a typedMegolmDecryptionError
instead of genericError
.
- Expose
version
field ofKeysBackupRequest
.
-
The
BackupKeys
structure returned byOlmMachine.getBackupKeys
now contains adecryptionKey
property which is is aBackupDecryptionKey
instance. -
Expose
SignatureVerification.trusted
method.
- Expose bindings for secure key backup.
- Expose
OwnUserIdentity.isVerified
.
- Mark our
OwnUserIdentity
as verified if we successfully import the matching private keys.
No functional changes. Fixes for the release process which prevented v1.0.0 being released.
Project renamed to matrix-sdk-crypto-wasm
. No functional changes.
- Add method
OlmMachine.queryKeysForUsers
to build an out-of-band key request.
- Fix bug introduced in v0.1.2 which caused an undocumented change to the results of
OlmMachine.receiveSyncChanges
.
- Fix a bug which could cause generated one-time-keys not to be persisted.
WARNING: this version had a breaking change in the result type of OlmMachine.receiveSyncChanges
.
This is corrected in v0.1.3.
- Add
Qr.state()
method to inspect the current state of QR code verifications.
- Fix handling of SAS verification start events once we have shown a QR code.
- Add
verify
method toDevice
.
-
In
OlmMachine.getIdentity
, wait a limited time for any in-flight device-list updates to complete. -
Add
VerificationRequest.timeRemainingMillis()
.
- When rejecting a key-verification request over to-device messages, send the
m.key.verification.cancel
to the device that made the request, rather than broadcasting to all devices.
- Simplify the response type of
Sas.confirm()
. - Add
VerificationRequest.registerChangesCallback()
,Sas.registerChangesCallback()
, andQr.registerChangesCallback()
. - Add
VerificationRequest.phase()
andVerificationRequest.getVerification()
.
-
Add support for the
hkdf-hmac-sha256.v2
SAS message authentication code. -
Ensure that the correct short authentication strings are used when accepting a SAS verification with the
Sas::accept()
method.
- Add
masterKey
,userSigningKey
,selfSigningKey
toUserIdentity
andOwnUserIdentity
- Extend
OlmDevice.markRequestAsSent
to accept responses toSigningKeysUploadRequest
s. - Add a missing
const
for compatibility with ECMAScript Module compatibility mode. - Fix the body of
SignatureUploadRequest
s to match the spec. - Add a constructor for
SigningKeysUploadRequest
.
importCrossSigningKeys
: change the parameters to be individual keys rather than aCrossSigningKeyExport
object.- Make
unused_fallback_keys
optional inMachine.receive_sync_changes
- Add new accessors
Device.algorithms
andDevice.isSignedByOwner
- In
OlmMachine.getUserDevices
, wait a limited time for any in-flight device-list updates to complete.
- Add new accessor
InboundGroupSession.senderKey
. - Add a new API,
OlmMachine.registerRoomKeyUpdatedCallback
, which applications can use to listen for received room keys.