Commit c0508e7
net.quic: use crypto.rand instead of rand for connection IDs and TLS random
dial() generated original_dcid, scid, and the TLS 1.3 ClientHello.random
using the plain `rand` module, which defaults to WyRandRNG — a fast,
explicitly non-cryptographic PRNG. RFC 9000 §8.1 expects real entropy in
connection IDs, and ClientHello.random has its own TLS security
properties. Swap to crypto.rand, an OS-backed CSPRNG with an identical
bytes() signature already used elsewhere in the codebase (e.g.
crypto.ecdsa).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent 0ac3868 commit c0508e7
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
0 commit comments