Skip to content

Commit

Permalink
🐛 Fix decryption error after receiving long (quic) header that requir…
Browse files Browse the repository at this point in the history
…ed key derivation (#33)

Close jawah/niquests#116
  • Loading branch information
Ousret authored May 8, 2024
1 parent 9525118 commit f5f51e8
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
1.0.7 (2024-05-08)
=====================

**Fixed**
- Decryption error after receiving long (quic) header that required key derivation.

1.0.6 (2024-05-06)
=====================

Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "qh3"
version = "1.0.6"
version = "1.0.7"
edition = "2021"
rust-version = "1.75"
license = "BSD-3"
Expand Down
2 changes: 1 addition & 1 deletion qh3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from .quic.packet import QuicProtocolVersion
from .tls import CipherSuite, SessionTicket

__version__ = "1.0.6"
__version__ = "1.0.7"

__all__ = (
"connect",
Expand Down
4 changes: 3 additions & 1 deletion qh3/quic/crypto.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,9 @@ def next_key_phase(self: CryptoContext) -> CryptoContext:
crypto = CryptoContext(key_phase=int(not self.key_phase))
crypto.setup(
cipher_suite=self.cipher_suite,
secret=hkdf_expand_label(algorithm, self.secret, b"quic ku", b"", algorithm),
secret=hkdf_expand_label(
algorithm, self.secret, b"quic ku", b"", int(algorithm / 8)
),
version=self.version,
)
return crypto
Expand Down

0 comments on commit f5f51e8

Please sign in to comment.