Closed richvdh closed 4 days ago
We might want to make initCrypto
an alias for initRustCrypto
first, to save updating the docs twice
We might want to make initCrypto an alias for initRustCrypto first, to save updating the docs twice
Rust Crypto hasn't reached feature parity yet, so I'm against this.
Rust Crypto hasn't reached feature parity yet, so I'm against this.
We're planning to remove the old code soon, rather than maintaining two crypto stacks indefinitely. If you're aware of any specific blockers, could you raise them as issues so we can prioritise them?
One that has massively impacted me personally due to switching HS:
Hi ! Any news about this issue ? I have multiple blocking point with rust crypto like "One time key signed_curve25519:AAAAAAAAAA8 already exists" and unable to decrypt message. Maybe I'm missing something on client creation side or whatever but the documentation related to e2ee is very poor actually and the README explain that the old fashionned way for encryption is deprecated. Any help is welcome. Thank you !
I have multiple blocking point with rust crypto like "One time key signed_curve25519:AAAAAAAAAA8 already exists" and unable to decrypt message.
Just been through the headache of updating matrix-js-sdk and getting e2e encryption working again with the rust crypto... I was running into that error when I had disabled indexedDB in initRustCrypto:
const client = sdk.createClient({
// ...
cryptoStore: new LocalStorageCryptoStore(path)
})
await client.initRustCrypto({ useIndexedDB: false })
To fix this you need to enabled indexedDB and provide an implementation as your crypto store using: IndexedDBCryptoStore
, i.e. :
/**
* This part is to load an implementation of indexedDB in nodejs:
*/
// @ts-expect-error Missing types.
import dbManager from 'node-indexeddb/dbManager'
async function loadModule (): Promise<void> {
await dbManager.loadCache().catch(console.error)
// @ts-expect-error Missing types.
await import('node-indexeddb/auto')
}
await loadModule()
/**
* This part is to use the indexedDB
*/
const idbFactory = new IDBFactory()
const client = sdk.createClient({
// ...
cryptoStore: new IndexedDBCryptoStore(idbFactory, path)
})
await client.initRustCrypto()