Skip to content

Incorrect triple-DH implementation #13

@digal

Description

@digal

crypto_kdf_derive_from_key(subkey, keyLength, salt, infoLabel, secret.bytes);

crypto_kdf_derive_from_key takes const unsigned char key[crypto_kdf_KEYBYTES] as a last argument, where crypto_kdf_KEYBYTES = 32. So this call only uses first 32 bytes from secret (which is 96 or 128 bytes long, when called from - [IRTripleDHService sharedKeyFromReceiverIdentityKey:receiverSignedPreKey:receiverEphemeralKey:]), turning this code into a single DH implementation

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions