From da8fcf8bd6b01053e6ef12588bba87a81827e0a8 Mon Sep 17 00:00:00 2001 From: Jazz Turner-Baggs <473256+jazzz@users.noreply.github.com> Date: Thu, 12 Feb 2026 15:08:07 -0800 Subject: [PATCH] Update SymmetricKey usage --- conversations/src/conversation/privatev1.rs | 2 +- conversations/src/inbox/handshake.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conversations/src/conversation/privatev1.rs b/conversations/src/conversation/privatev1.rs index b67661f..2711436 100644 --- a/conversations/src/conversation/privatev1.rs +++ b/conversations/src/conversation/privatev1.rs @@ -68,7 +68,7 @@ impl PrivateV1Convo { // TODO: Danger - Fix double-ratchets types to Accept SymmetricKey32 // perhaps update the DH to work with cryptocrate. // init_sender doesn't take ownership of the key so a reference can be used. - let shared_secret: [u8; 32] = seed_key.as_bytes().to_vec().try_into().unwrap(); + let shared_secret: [u8; 32] = seed_key.DANGER_to_bytes(); let dr_state = RatchetState::init_sender(shared_secret, remote); Self { diff --git a/conversations/src/inbox/handshake.rs b/conversations/src/inbox/handshake.rs index 5d8d0f3..8da581a 100644 --- a/conversations/src/inbox/handshake.rs +++ b/conversations/src/inbox/handshake.rs @@ -63,7 +63,7 @@ impl InboxHandshake { /// Derive keys from X3DH shared secret fn derive_keys_from_shared_secret(shared_secret: SymmetricKey32) -> SymmetricKey32 { let seed_key: [u8; 32] = Blake2bMac256::new_with_salt_and_personal( - shared_secret.as_slice(), + shared_secret.as_bytes(), &[], // No salt - input already has high entropy b"InboxV1-Seed", )