Skip to content

Commit 09ba820

Browse files
committed
fixup! Initial support for dehydrated devices
1 parent 8b673ef commit 09ba820

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

crates/matrix-sdk-crypto/src/dehydrated_devices.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -341,12 +341,11 @@ impl DehydratedDevice {
341341
///
342342
/// To combat the IV reuse, we're going to create a per-dehydrated-device unique
343343
/// pickle key by expanding the key itself with the device ID used as the salt.
344-
///
345-
/// TODO: Perhaps we should put this into vodozemac with a new pickle
346-
/// minimalistic pickle format using the [`matrix_pickle`] crate.
347-
///
348-
/// [`matrix_pickle`]: https://docs.rs/matrix-pickle/latest/matrix_pickle/
349344
fn expand_pickle_key(key: &[u8; 32], device_id: &DeviceId) -> Box<[u8; 32]> {
345+
// TODO: Perhaps we should put this into vodozemac with a new pickle
346+
// minimalistic pickle format using the [`matrix_pickle`] crate.
347+
//
348+
// [`matrix_pickle`]: https://docs.rs/matrix-pickle/latest/matrix_pickle/
350349
let kdf: Hkdf<Sha256> = Hkdf::new(Some(device_id.as_bytes()), key);
351350
let mut key = Box::new([0u8; 32]);
352351

0 commit comments

Comments
 (0)