Update SymmetricKey usage

This commit is contained in:
Jazz Turner-Baggs 2026-02-12 15:08:07 -08:00
parent 7abd7f1f80
commit da8fcf8bd6
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View File

@ -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 {

View File

@ -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",
)