@browsercore/quic 0.2.1 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/README.md +19 -1
  2. package/dist/connection.d.ts +149 -23
  3. package/dist/connection.d.ts.map +1 -1
  4. package/dist/connection.js +543 -66
  5. package/dist/connection.js.map +1 -1
  6. package/dist/crypto/hash-length.d.ts +11 -0
  7. package/dist/crypto/hash-length.d.ts.map +1 -0
  8. package/dist/crypto/hash-length.js +20 -0
  9. package/dist/crypto/hash-length.js.map +1 -0
  10. package/dist/crypto/index.d.ts +8 -0
  11. package/dist/crypto/index.d.ts.map +1 -0
  12. package/dist/crypto/index.js +8 -0
  13. package/dist/crypto/index.js.map +1 -0
  14. package/dist/crypto/key-derivation.d.ts +87 -0
  15. package/dist/crypto/key-derivation.d.ts.map +1 -0
  16. package/dist/crypto/key-derivation.js +123 -0
  17. package/dist/crypto/key-derivation.js.map +1 -0
  18. package/dist/errors.d.ts +27 -0
  19. package/dist/errors.d.ts.map +1 -1
  20. package/dist/errors.js +36 -1
  21. package/dist/errors.js.map +1 -1
  22. package/dist/frame/frame.d.ts.map +1 -1
  23. package/dist/frame/frame.js +2 -2
  24. package/dist/frame/frame.js.map +1 -1
  25. package/dist/handshake/index.d.ts +10 -0
  26. package/dist/handshake/index.d.ts.map +1 -0
  27. package/dist/handshake/index.js +9 -0
  28. package/dist/handshake/index.js.map +1 -0
  29. package/dist/handshake/quic-handshake.d.ts +119 -0
  30. package/dist/handshake/quic-handshake.d.ts.map +1 -0
  31. package/dist/handshake/quic-handshake.js +213 -0
  32. package/dist/handshake/quic-handshake.js.map +1 -0
  33. package/dist/handshake/quic-transport-adapter.d.ts +86 -0
  34. package/dist/handshake/quic-transport-adapter.d.ts.map +1 -0
  35. package/dist/handshake/quic-transport-adapter.js +166 -0
  36. package/dist/handshake/quic-transport-adapter.js.map +1 -0
  37. package/dist/index.d.ts +8 -5
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/index.js +10 -4
  40. package/dist/index.js.map +1 -1
  41. package/dist/packet/packet-protection.d.ts +158 -0
  42. package/dist/packet/packet-protection.d.ts.map +1 -0
  43. package/dist/packet/packet-protection.js +312 -0
  44. package/dist/packet/packet-protection.js.map +1 -0
  45. package/dist/packet/packet.d.ts +2 -2
  46. package/dist/packet/packet.d.ts.map +1 -1
  47. package/dist/packet/packet.js +4 -4
  48. package/dist/packet/packet.js.map +1 -1
  49. package/dist/stream/stream.d.ts +7 -11
  50. package/dist/stream/stream.d.ts.map +1 -1
  51. package/dist/stream/stream.js +16 -28
  52. package/dist/stream/stream.js.map +1 -1
  53. package/dist/transport-params.d.ts +4 -0
  54. package/dist/transport-params.d.ts.map +1 -1
  55. package/dist/transport-params.js +8 -1
  56. package/dist/transport-params.js.map +1 -1
  57. package/dist/types.d.ts +129 -41
  58. package/dist/types.d.ts.map +1 -1
  59. package/dist/types.js +8 -20
  60. package/dist/types.js.map +1 -1
  61. package/package.json +7 -5
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
  [![npm version](https://img.shields.io/npm/v/@browsercore/quic)](https://www.npmjs.com/package/@browsercore/quic)
5
- [![coverage](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/jverneuer/browsercore-quic/coverage/coverage/badge.json)](https://github.com/jverneuer/browsercore-quic/blob/main/COVERAGE.md)
5
+ [![coverage](https://img.shields.io/endpoint?url=https://jverneuer.github.io/browsercore-quic/badge.json)](https://github.com/jverneuer/browsercore-quic/blob/main/COVERAGE.md)
6
6
  [![lint](https://img.shields.io/github/actions/workflow/status/jverneuer/browsercore-quic/ci.yml?label=lint)](https://github.com/jverneuer/browsercore-quic/actions/workflows/ci.yml)
7
7
 
8
8
  QUIC transport (RFC 9000) — packet headers, frames, packet protection, streams,
@@ -111,6 +111,24 @@ control frames (MAX_DATA, MAX_STREAM_DATA, CONNECTION_CLOSE, …) back down to
111
111
  the connection's packetizer. The connection owns the read loop and packs
112
112
  outbound frames into short-header (1-RTT) packets.
113
113
 
114
+ ## Platform threading
115
+
116
+ `QuicOptions` accepts an optional `platform?: Platform` field. When supplied,
117
+ any service not passed as an individual field is resolved from the Platform
118
+ composition root:
119
+
120
+ | Option field | Resolved from |
121
+ | --- | --- |
122
+ | `crypto` | `platform.crypto.provider` |
123
+ | `events` | `platform.events` |
124
+ | `clock` | `platform.time.clock` |
125
+
126
+ Individual fields always take precedence, so existing callers that pass
127
+ `crypto`/`events` directly keep working unchanged. This is the migration path
128
+ toward DI through Platform: callers move from passing individual service fields
129
+ to threading a single Platform (assembled by `browsersmith`) through every
130
+ protocol package. See `@browsercore/contracts` for the `Platform` interface.
131
+
114
132
  ## Known limitations
115
133
 
116
134
  - The TLS 1.3 handshake and packet protection (header protection + AEAD
@@ -1,25 +1,31 @@
1
1
  /**
2
- * QUIC connection lifecycle + datagram read loop (RFC 9000 §5, §12).
2
+ * QUIC connection lifecycle + datagram read loop (RFC 9000 §5, §12) with TLS
3
+ * handshake + packet protection (RFC 9001).
3
4
  *
4
- * Wires packet header parsing/serialization, the frame layer, and the stream
5
- * manager over an injected {@link DatagramTransport} (UDP). The connection owns
6
- * the read loop: it turns inbound datagrams into frames, dispatches each to the
7
- * stream manager, and drains pending stream sends back into outbound packets.
5
+ * Wires packet header parsing/serialization, the frame layer, the stream
6
+ * manager, the TLS 1.3 handshake (over QUIC stream 0), and QUIC's two-layer
7
+ * packet protection (AEAD payload encryption + header protection) over an
8
+ * injected {@link DatagramTransport} (UDP).
9
+ *
10
+ * The connection owns the read loop: it turns inbound datagrams into frames,
11
+ * dispatches each to the stream manager, and drains pending stream sends back
12
+ * into outbound packets. After the TLS handshake completes, every packet is
13
+ * protected with the derived QUIC keys for its key phase:
14
+ *
15
+ * Initial packets → initial keys (derived from DCID)
16
+ * Handshake packets → handshake keys (derived from TLS handshake secrets)
17
+ * 1-RTT packets → application keys (derived from TLS application secrets)
8
18
  *
9
19
  * Honest limitations:
10
- * - The TLS 1.3 handshake and packet protection (header protection + AEAD
11
- * payload encryption) are out of scope. `connectQuic()` returns a connection
12
- * that moves *unprotected* frames over the transport directly — enough to
13
- * drive the data plane and to be tested with a fake datagram transport. A
14
- * production build layers protection + the handshake on top of this.
15
- * - No connection migration beyond PATH_CHALLENGE / PATH_RESPONSE, and no
16
- * liveness PING.
20
+ * - 0-RTT, KeyUpdate, key-phase-bit handling, and connection migration
21
+ * beyond PATH_CHALLENGE / PATH_RESPONSE are out of scope. No congestion
22
+ * controller. No liveness PING.
17
23
  *
18
24
  * Concurrency model: the read loop is a single async task pulling datagrams from
19
25
  * the transport. Outbound frames are produced synchronously by the stream
20
26
  * manager and packed into packets; writes resolve once bytes are buffered.
21
27
  */
22
- import type { EventEmitter } from "node:events";
28
+ import type { CryptoProvider } from "@browsercore/contracts";
23
29
  import { type ConnectionId, type QuicConnection, type QuicFrame, type QuicOptions, type QuicStream, type QuicTransportParameters } from "./types.js";
24
30
  import { type StreamManager } from "./stream/stream.js";
25
31
  import { type TransportParameters } from "./transport-params.js";
@@ -33,20 +39,46 @@ export declare class QuicConnectionImpl implements QuicConnection {
33
39
  private readonly transport;
34
40
  /** The peer's UDP address. */
35
41
  private readonly peer;
36
- /** Stream manager (also an EventEmitter for connection-level signals). */
42
+ /** Stream manager (signals connection-level events via QuicSignalSink). */
37
43
  private readonly manager;
38
44
  /** Our current destination connection id (the one we put on outbound packets). */
39
45
  private readonly dcid;
46
+ /** Random source for connection ids and packet numbers. */
47
+ private readonly random;
48
+ /**
49
+ * Cryptographic provider for QUIC key derivation and packet protection
50
+ * (RFC 9001). Seeded with the injected {@link random} source so the
51
+ * HKDF-based key schedule is reproducible under test.
52
+ */
53
+ private readonly cryptoProvider;
54
+ /** TLS ClientHello configuration for the handshake. */
55
+ private readonly tlsProfile;
40
56
  /**
41
57
  * Our transport parameters encoded for the wire. Produced at handshake
42
58
  * time so a TLS layer can carry them to the peer in the QUIC extension.
43
59
  */
44
60
  private readonly encodedLocalParameters;
61
+ /**
62
+ * EventProvider for the QUIC→TLS transport adapter. Resolved from
63
+ * {@link QuicOptions.events} or {@link QuicOptions.platform}.events —
64
+ * there is no singleton fallback.
65
+ */
66
+ private readonly events;
67
+ /** Result of the TLS handshake — set once the handshake completes. */
68
+ private handshakeResult;
69
+ /**
70
+ * Current key phase for outbound packets. Advances from initial → handshake
71
+ * → application as the handshake progresses. The protection layer selects
72
+ * the correct secrets based on this + the packet's header form.
73
+ */
74
+ private outboundKeyPhase;
75
+ /** Next outbound packet number, per key phase (RFC 9000 §12.3). */
76
+ private readonly nextPacketNumber;
77
+ /** Largest received packet number per key phase (for packet-number decoding). */
78
+ private readonly largestReceivedPn;
45
79
  /**
46
80
  * PATH_CHALLENGEs we have issued and are awaiting a PATH_RESPONSE for,
47
81
  * keyed by the hex-encoded 8-byte challenge data (RFC 9000 §8.2.1).
48
- * A full implementation would also track the address pair being validated
49
- * and retire stale challenges on a timer; this is the data plane only.
50
82
  */
51
83
  private readonly pendingPathChallenges;
52
84
  /** Set once the connection begins graceful shutdown. */
@@ -55,7 +87,20 @@ export declare class QuicConnectionImpl implements QuicConnection {
55
87
  private closed;
56
88
  /** Buffered outbound frames waiting to be packed into the next packet. */
57
89
  private readonly outboundFrames;
58
- constructor(id: string, options: QuicOptions, manager: StreamManager & EventEmitter, dcid: ConnectionId);
90
+ /**
91
+ * @param onPeerClose Register a handler for peer CONNECTION_CLOSE signals.
92
+ * The stream manager calls this through its signal sink;
93
+ * the connection supplies the handler at construction.
94
+ */
95
+ constructor(id: string, options: QuicOptions, manager: StreamManager, dcid: ConnectionId, onPeerClose?: (handler: (errorCode: bigint, reason: string) => void) => void);
96
+ /**
97
+ * Resolve when the QUIC handshake completes and the connection is
98
+ * protected. HTTP/3 SETTINGS exchange may only begin after this resolves.
99
+ *
100
+ * When `skipHandshake` is true in QuicOptions, this resolves immediately
101
+ * since no TLS handshake is performed.
102
+ */
103
+ handshake(): Promise<void>;
59
104
  openBidirectionalStream(): Promise<QuicStream>;
60
105
  acceptBidirectionalStream(): Promise<QuicStream>;
61
106
  openUnidirectionalStream(): Promise<QuicStream>;
@@ -88,6 +133,19 @@ export declare class QuicConnectionImpl implements QuicConnection {
88
133
  receivePeerParameters(peerWireParameters: Uint8Array): void;
89
134
  /** Expose the wire-form peer parameters for inspection (tests, debugging). */
90
135
  toWireParameters(params: QuicTransportParameters): TransportParameters;
136
+ /**
137
+ * Generate a random connection id of `length` bytes (RFC 9000 §5.1). Drawn
138
+ * from the injected random source so connection ids are reproducible under
139
+ * test. Useful for NEW_CONNECTION_ID frames and the endpoint's own source
140
+ * connection ids.
141
+ */
142
+ generateConnectionId(length: number): ConnectionId;
143
+ /**
144
+ * The crypto provider for QUIC key derivation (RFC 9001). A handshake
145
+ * layer uses this to run the HKDF-based key schedule; it is seeded with the
146
+ * injected random source so derived keys are reproducible under test.
147
+ */
148
+ getCrypto(): CryptoProvider;
91
149
  /**
92
150
  * Pack all buffered outbound frames into a short-header packet and send it.
93
151
  * Splits into multiple datagrams if the payload exceeds MAX_DATAGRAM_PAYLOAD.
@@ -95,17 +153,78 @@ export declare class QuicConnectionImpl implements QuicConnection {
95
153
  private flush;
96
154
  /** Serialize frames into a single byte buffer (no packet header). */
97
155
  private packFrames;
98
- /** Wrap a serialized payload in a short (1-RTT) header + packet number. */
156
+ /**
157
+ * Wrap a serialized payload in a packet header + protect it.
158
+ *
159
+ * Selects long vs short header based on the current handshake state:
160
+ * - Before the handshake is complete: long-header Initial / Handshake packets.
161
+ * - After: short-header (1-RTT) packets.
162
+ *
163
+ * For now, we always emit short-header (1-RTT) packets once the handshake
164
+ * is complete, and long-header Handshake packets during the handshake.
165
+ * The very first packets (ClientHello) are also carried in Handshake packets
166
+ * by this simplified implementation — a full client would send the
167
+ * ClientHello in an Initial packet with a token, but the protection layer
168
+ * is identical.
169
+ */
99
170
  private wrapPacket;
171
+ /**
172
+ * Wrap a payload in a simple unprotected short-header packet — the original
173
+ * behavior for tests that don't exercise the TLS handshake + protection layer.
174
+ */
175
+ private wrapPacketUnprotectedShort;
176
+ /** Wrap a payload in a protected packet using the given key-phase secrets. */
177
+ private wrapPacketProtected;
178
+ /**
179
+ * Wrap a payload in an *unprotected* packet — used only before the TLS
180
+ * handshake has produced keys (e.g. in tests that don't exercise the
181
+ * protection layer). A production build would never emit these.
182
+ */
183
+ private wrapPacketUnprotected;
184
+ /**
185
+ * Get the QUIC protection secrets for a given key phase. Returns undefined
186
+ * if the handshake has not yet produced keys for that phase (e.g. before
187
+ * the TLS handshake has started).
188
+ */
189
+ private getProtectionSecrets;
190
+ /**
191
+ * Run the TLS 1.3 handshake over QUIC stream 0 and derive QUIC packet-
192
+ * protection secrets at each key phase.
193
+ */
194
+ performHandshake(): Promise<void>;
100
195
  /**
101
196
  * Start the datagram read loop. Must be called once after construction.
102
197
  * Runs until the transport closes or the connection tears down.
198
+ *
199
+ * Peer CONNECTION_CLOSE signals are received through the stream manager's
200
+ * signal sink (wired at construction time), not via a direct subscription.
103
201
  */
104
202
  startReadLoop(): void;
105
203
  private onPeerClose;
106
204
  /** Parse a single datagram into frames and dispatch them. */
107
205
  private dispatchDatagram;
108
- /** Pull the DCID / version from a parsed header into connection state. */
206
+ /**
207
+ * Dispatch an unprotected datagram — the original behavior for tests that
208
+ * don't exercise the TLS handshake + protection layer. Parses the packet
209
+ * header and decodes frames directly, matching the pre-handshake read loop.
210
+ */
211
+ private dispatchDatagramUnprotected;
212
+ /** Apply a parsed header (unprotected path) into connection state. */
213
+ private applyHeaderUnprotected;
214
+ /**
215
+ * Determine the key phase of an inbound packet from its first byte.
216
+ *
217
+ * Long headers: Initial (0b00) → initial, Handshake (0b10) → handshake,
218
+ * Retry/0-RTT → initial (we treat them as initial-key for simplicity).
219
+ * Short headers: application (1-RTT).
220
+ */
221
+ private classifyKeyPhase;
222
+ /**
223
+ * Decrypt the packet number and remove header protection from an inbound
224
+ * packet. Returns the recovered packet number and the decrypted header.
225
+ */
226
+ private unprotectHeader;
227
+ /** Header fields after header-protection removal. */
109
228
  private applyHeader;
110
229
  /**
111
230
  * Build a pull-based byte reader over a fixed buffer. `readFrames` consumes
@@ -129,10 +248,17 @@ export declare class QuicConnectionImpl implements QuicConnection {
129
248
  /**
130
249
  * Establish a QUIC connection over an existing datagram transport.
131
250
  *
132
- * Creates the stream manager and the read loop. Because the TLS handshake and
133
- * packet protection are out of scope, this returns a connection that moves
134
- * unprotected frames — the data plane is fully functional and testable with a
135
- * fake datagram transport.
251
+ * Creates the stream manager and the read loop. By default, runs the TLS 1.3
252
+ * handshake over QUIC stream 0 (a bidirectional stream), derives QUIC packet-
253
+ * protection secrets at each key phase, and returns a connection that protects
254
+ * inbound + outbound packets with the derived keys.
255
+ *
256
+ * The `tlsProfile` option selects the ClientHello configuration for the
257
+ * handshake. Defaults to a modern TLS 1.3 profile (X25519 + secp256r1 key
258
+ * shares, AES-256/128-GCM + ChaCha20-Poly1305). Set `skipHandshake: true` to
259
+ * skip the TLS handshake and return an *unprotected* connection (the data plane
260
+ * is fully functional and testable with a fake datagram transport, but it is
261
+ * not wire-ready without a protection + handshake layer on top).
136
262
  */
137
263
  export declare function connectQuic(options: QuicOptions): Promise<QuicConnection>;
138
264
  //# sourceMappingURL=connection.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../src/connection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAEH,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,uBAAuB,EAE/B,MAAM,YAAY,CAAC;AAIpB,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAE7E,OAAO,EAKH,KAAK,mBAAmB,EAC3B,MAAM,uBAAuB,CAAC;AAQ/B;;;GAGG;AACH,qBAAa,kBAAmB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