Skip to content

Commit c0508e7

Browse files
Richard Wheelerclaude
andcommitted
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

File tree

vlib/net/quic/conn.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module quic
22

33
import time
4-
import rand
4+
import crypto.rand
55

66
// RFC 9000/9001 — QuicConn is the top-level connection struct wiring
77
// together every independently-built piece from Phases 0-8: packet/header

0 commit comments

Comments
 (0)