Skip to content

Commit 3222754

Browse files
authored
DTLS1.3 chacha20poly1305 and x25519 support
1 parent dd142cb commit 3222754

15 files changed

Lines changed: 758 additions & 53 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Unreleased
22

3+
* DTLS1.3 chacha20poly1305 and x25519 support #64
34
* Fix panic in auto DTLS version selection #65
45
* Add `Error::HandshakePending` for auto-sense pending state (breaking) #65
56
* DTLS 1.2 ECDSA determine curve from certificate, not hash algorithm #57

Cargo.lock

Lines changed: 113 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@ default = ["aws-lc-rs", "rcgen"]
2020
aws-lc-rs = ["dep:aws-lc-rs", "_crypto-common"]
2121

2222
# Pure Rust crypto provider
23-
rust-crypto = ["dep:aes-gcm", "dep:p256", "dep:p384", "dep:sha2", "dep:hmac", "dep:hkdf", "dep:ecdsa", "dep:generic-array", "dep:rand_core", "_crypto-common"]
23+
rust-crypto = [
24+
"dep:aes-gcm", "dep:chacha20poly1305", "dep:chacha20", "dep:p256",
25+
"dep:p384", "dep:x25519-dalek", "dep:sha2", "dep:hmac", "dep:hkdf",
26+
"dep:ecdsa", "dep:generic-array", "dep:rand_core",
27+
"_crypto-common"
28+
]
2429

2530
# Internal for all cryptos
2631
_crypto-common = ["dep:der", "dep:pkcs8", "dep:sec1", "dep:signature", "dep:spki", "dep:x509-cert"]
@@ -61,6 +66,9 @@ hkdf = { version = "0.12", optional = true }
6166
ecdsa = { version = "0.16", optional = true, features = ["signing", "verifying"] }
6267
generic-array = { version = "0.14", optional = true }
6368
rand_core = { version = "0.6", optional = true }
69+
chacha20poly1305 = { version = "0.10", optional = true }
70+
chacha20 = { version = "0.9", optional = true }
71+
x25519-dalek = { version = "2", optional = true, features = ["static_secrets"] }
6472

6573
# certificate generation
6674
rcgen = { version = "0.14.5", default-features = false, features = ["aws_lc_rs"], optional = true }

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ Three constructors control which DTLS version is used:
3636
- **Cipher suites (TLS 1.3 over DTLS)**
3737
- `TLS_AES_128_GCM_SHA256`
3838
- `TLS_AES_256_GCM_SHA384`
39-
- **AEAD**: AES‑GCM 128/256 only (no CBC/EtM modes).
40-
- **Key exchange**: ECDHE (P‑256/P‑384)
39+
- `TLS_CHACHA20_POLY1305_SHA256`
40+
- **AEAD**: AES‑GCM 128/256, ChaCha20‑Poly1305 (no CBC/EtM modes).
41+
- **Key exchange**: ECDHE (P‑256/P‑384), X25519
4142
- **Signatures**: ECDSA P‑256/SHA‑256, ECDSA P‑384/SHA‑384
4243
- **DTLS‑SRTP**: Exports keying material for `SRTP_AEAD_AES_256_GCM`,
4344
`SRTP_AEAD_AES_128_GCM`, and `SRTP_AES128_CM_SHA1_80` ([RFC 5764], [RFC 7714]).

0 commit comments

Comments
 (0)