Repository navigation
Immutable
release. Only release title and notes can be modified.
Read the short migration guide: https://github.com/Snazzah/davey/wiki/Migrating-to-0.2.0
Breaking:
DaveSession.get_user_ids()now returnsList[int]instead ofList[str]DaveSession.process_commit()andDaveSession.process_welcome()no longer update keys. CallDaveSession.prepare_transition()with the transition ID andprotocol_versionafterwards, and the key used to encrypt packets is only switched once that transition is executed withDaveSession.execute_transition(), unless the transition ID is 0. (parity with libdave's sample)DaveSession.reinit()now keeps the current encryption and decryption keys until the next transition replaces them, soreadystaysTrue. (parity with libdave)DaveSession.process_commit()now returnsTrueif the transition should be prepared, orFalseif the commit was ignored because there is no established group or queued proposals, instead of raising. (ref: discord/libdave@68f7c02)
Added:
DaveSession.process_welcome()now has an optionalrecognized_user_idsargument that gets checked against the users in the welcome group. (parity with libdave v1.2.0)DaveSession.prepare_transition()andDaveSession.execute_transition()for handling opcodes 21 and 22. Preparing a downgrade to protocol version 0 keeps the current decryption keys usable for 10 seconds.DaveSession.can_encryptto check whether the session has a key to encrypt with.EncryptionStats.missing_keysandDecryptionStats.missing_keysfor the number of encryptions and decryptions that failed due to a missing key, andDecryptionStats.invalid_noncesfor the number of decryptions that failed due to an invalid nonce.
Fixed:
- Enabling passthrough mode now also applies to decryptors created afterwards.
- Group IDs are now checked when processing welcomes. (parity with libdave v1.2.0 & v1.2.1)
- Welcomes are now only accepted for the most recently created key package. (parity with libdave)
- Own commits are only accepted if they exactly match the pending commit.
- Passthrough mode can now only shorten the cipher manager expiry, not extend it. (ref: discord/libdave@48e6232)
- Decrypting with a newer key generation can now only shorten the expiry of older generations, not extend it. (parity with libdave)
- Missing nonces that arrive early are now tracked. (ref: discord/libdave@65be1a4)
- Missing nonces are now limited to 1000 tracked nonces instead of a window of the last 1000 nonces, so older frames can still be decrypted. (ref: discord/libdave@3bdd9fd)
- Fixed LEB128 not being read correctly in some cases.
DecryptionStats.attemptsnow only counts actual decryption attempts, not every key ratchet that was tried. (parity with libdave)- Duplicate key ratchet installs are now ignored. (ref: discord/libdave@8de72b1)
- Re-installing the encryption key of the current epoch no longer restarts the nonce sequence, which reused nonces. (ref: discord/libdave@d3bac61)
__repr__()ofDaveSessionandSigningKeyPairno longer leaks memory. (whoops)- Duplicate user IDs are now rejected in proposals, welcomes and commits. (parity with libdave)
- Proposals and commits are now checked for their wire format, epoch, content type and sender, and commits are rejected without queued proposals or with non-reference proposals. (parity with libdave)
- Welcomes are no longer lost when the members being added were proposed before the latest batch of proposals.
- The newest key is now tried first when decrypting.
- Only Opus audio silence packets are passed through.
- Encrypting with an unknown codec now encrypts the full frame instead of panicking. (parity with libdave)
- Encryption and decryption stats no longer overflow past 32-bit values.
- Reduced buffer allocations in encryption and decryption. (#18)