Skip to content

Commit 1ffa068

Browse files
committed
fix(crypto): Rename the decrypt method on the RecoveryKey struct
The new backup algorithm reuses the same key but uses a different construct to encrypt/decrypt room keys. This reflects that our decrypt method uses the v1 algorithm.
1 parent 670e212 commit 1ffa068

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

crates/matrix-sdk-crypto/src/backups/keys/recovery.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,13 @@ impl RecoveryKey {
287287
}
288288

289289
/// Try to decrypt the given ciphertext using this `RecoveryKey`.
290-
pub fn decrypt(
290+
///
291+
/// This will use the [`m.megolm_backup.v1.curve25519-aes-sha2`] algorithm
292+
/// to decrypt the given ciphertext.
293+
///
294+
/// [`m.megolm_backup.v1.curve25519-aes-sha2`]:
295+
/// https://spec.matrix.org/unstable/client-server-api/#backup-algorithm-mmegolm_backupv1curve25519-aes-sha2
296+
pub fn decrypt_v1(
291297
&self,
292298
mac: String,
293299
ephemeral_key: String,

0 commit comments

Comments
 (0)