nlcurl 0.7.0 → 0.8.0
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.
- package/README.md +143 -140
- package/dist/cache/groups.d.ts +75 -0
- package/dist/cache/groups.d.ts.map +1 -0
- package/dist/cache/groups.js +118 -0
- package/dist/cache/groups.js.map +1 -0
- package/dist/cache/no-vary-search.d.ts +33 -0
- package/dist/cache/no-vary-search.d.ts.map +1 -0
- package/dist/cache/no-vary-search.js +148 -0
- package/dist/cache/no-vary-search.js.map +1 -0
- package/dist/cache/range.d.ts +120 -0
- package/dist/cache/range.d.ts.map +1 -0
- package/dist/cache/range.js +193 -0
- package/dist/cache/range.js.map +1 -0
- package/dist/cache/store.d.ts +58 -36
- package/dist/cache/store.d.ts.map +1 -1
- package/dist/cache/store.js +58 -46
- package/dist/cache/store.js.map +1 -1
- package/dist/cache/types.d.ts +7 -39
- package/dist/cache/types.d.ts.map +1 -1
- package/dist/cli/args.d.ts +4 -37
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +3 -4
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/index.d.ts +0 -5
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +1 -6
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/output.d.ts +14 -20
- package/dist/cli/output.d.ts.map +1 -1
- package/dist/cli/output.js +14 -20
- package/dist/cli/output.js.map +1 -1
- package/dist/cookies/jar.d.ts +30 -39
- package/dist/cookies/jar.d.ts.map +1 -1
- package/dist/cookies/jar.js +27 -37
- package/dist/cookies/jar.js.map +1 -1
- package/dist/cookies/parser.d.ts +13 -17
- package/dist/cookies/parser.d.ts.map +1 -1
- package/dist/cookies/parser.js +17 -14
- package/dist/cookies/parser.js.map +1 -1
- package/dist/cookies/psl-data.d.ts +1 -1
- package/dist/cookies/psl-data.js +1 -1
- package/dist/cookies/public-suffix.d.ts +5 -27
- package/dist/cookies/public-suffix.d.ts.map +1 -1
- package/dist/cookies/public-suffix.js +5 -37
- package/dist/cookies/public-suffix.js.map +1 -1
- package/dist/core/auth.d.ts +30 -0
- package/dist/core/auth.d.ts.map +1 -0
- package/dist/core/auth.js +34 -0
- package/dist/core/auth.js.map +1 -0
- package/dist/core/client.d.ts +28 -40
- package/dist/core/client.d.ts.map +1 -1
- package/dist/core/client.js +31 -41
- package/dist/core/client.js.map +1 -1
- package/dist/core/errors.d.ts +64 -88
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/errors.js +64 -88
- package/dist/core/errors.js.map +1 -1
- package/dist/core/request.d.ts +23 -111
- package/dist/core/request.d.ts.map +1 -1
- package/dist/core/response.d.ts +49 -66
- package/dist/core/response.d.ts.map +1 -1
- package/dist/core/response.js +45 -59
- package/dist/core/response.js.map +1 -1
- package/dist/core/session.d.ts +66 -78
- package/dist/core/session.d.ts.map +1 -1
- package/dist/core/session.js +105 -76
- package/dist/core/session.js.map +1 -1
- package/dist/core/validation.d.ts +44 -43
- package/dist/core/validation.d.ts.map +1 -1
- package/dist/core/validation.js +44 -56
- package/dist/core/validation.js.map +1 -1
- package/dist/dns/cache.d.ts +59 -0
- package/dist/dns/cache.d.ts.map +1 -0
- package/dist/dns/cache.js +99 -0
- package/dist/dns/cache.js.map +1 -0
- package/dist/dns/codec.d.ts +20 -18
- package/dist/dns/codec.d.ts.map +1 -1
- package/dist/dns/codec.js +20 -36
- package/dist/dns/codec.js.map +1 -1
- package/dist/dns/doh-resolver.d.ts +17 -31
- package/dist/dns/doh-resolver.d.ts.map +1 -1
- package/dist/dns/doh-resolver.js +46 -47
- package/dist/dns/doh-resolver.js.map +1 -1
- package/dist/dns/dot-resolver.d.ts +89 -0
- package/dist/dns/dot-resolver.d.ts.map +1 -0
- package/dist/dns/dot-resolver.js +158 -0
- package/dist/dns/dot-resolver.js.map +1 -0
- package/dist/dns/https-rr.d.ts +19 -30
- package/dist/dns/https-rr.d.ts.map +1 -1
- package/dist/dns/https-rr.js +22 -40
- package/dist/dns/https-rr.js.map +1 -1
- package/dist/dns/types.d.ts +31 -59
- package/dist/dns/types.d.ts.map +1 -1
- package/dist/dns/types.js +3 -14
- package/dist/dns/types.js.map +1 -1
- package/dist/fingerprints/akamai.d.ts +3 -11
- package/dist/fingerprints/akamai.d.ts.map +1 -1
- package/dist/fingerprints/akamai.js +3 -11
- package/dist/fingerprints/akamai.js.map +1 -1
- package/dist/fingerprints/database.d.ts +6 -14
- package/dist/fingerprints/database.d.ts.map +1 -1
- package/dist/fingerprints/database.js +6 -14
- package/dist/fingerprints/database.js.map +1 -1
- package/dist/fingerprints/extensions.d.ts +56 -71
- package/dist/fingerprints/extensions.d.ts.map +1 -1
- package/dist/fingerprints/extensions.js +58 -71
- package/dist/fingerprints/extensions.js.map +1 -1
- package/dist/fingerprints/ja3.d.ts +12 -30
- package/dist/fingerprints/ja3.d.ts.map +1 -1
- package/dist/fingerprints/ja3.js +12 -30
- package/dist/fingerprints/ja3.js.map +1 -1
- package/dist/fingerprints/ja4.d.ts +18 -0
- package/dist/fingerprints/ja4.d.ts.map +1 -0
- package/dist/fingerprints/ja4.js +83 -0
- package/dist/fingerprints/ja4.js.map +1 -0
- package/dist/fingerprints/profiles/chrome.d.ts +18 -21
- package/dist/fingerprints/profiles/chrome.d.ts.map +1 -1
- package/dist/fingerprints/profiles/chrome.js +35 -31
- package/dist/fingerprints/profiles/chrome.js.map +1 -1
- package/dist/fingerprints/profiles/edge.d.ts +7 -10
- package/dist/fingerprints/profiles/edge.d.ts.map +1 -1
- package/dist/fingerprints/profiles/edge.js +7 -10
- package/dist/fingerprints/profiles/edge.js.map +1 -1
- package/dist/fingerprints/profiles/firefox.d.ts +8 -11
- package/dist/fingerprints/profiles/firefox.d.ts.map +1 -1
- package/dist/fingerprints/profiles/firefox.js +8 -11
- package/dist/fingerprints/profiles/firefox.js.map +1 -1
- package/dist/fingerprints/profiles/safari.d.ts +11 -14
- package/dist/fingerprints/profiles/safari.d.ts.map +1 -1
- package/dist/fingerprints/profiles/safari.js +11 -14
- package/dist/fingerprints/profiles/safari.js.map +1 -1
- package/dist/fingerprints/profiles/tor.d.ts +5 -8
- package/dist/fingerprints/profiles/tor.d.ts.map +1 -1
- package/dist/fingerprints/profiles/tor.js +5 -8
- package/dist/fingerprints/profiles/tor.js.map +1 -1
- package/dist/fingerprints/types.d.ts +42 -73
- package/dist/fingerprints/types.d.ts.map +1 -1
- package/dist/hsts/store.d.ts +19 -21
- package/dist/hsts/store.d.ts.map +1 -1
- package/dist/hsts/store.js +20 -28
- package/dist/hsts/store.js.map +1 -1
- package/dist/hsts/types.d.ts +10 -14
- package/dist/hsts/types.d.ts.map +1 -1
- package/dist/http/alt-svc.d.ts +31 -49
- package/dist/http/alt-svc.d.ts.map +1 -1
- package/dist/http/alt-svc.js +21 -55
- package/dist/http/alt-svc.js.map +1 -1
- package/dist/http/early-hints.d.ts +23 -0
- package/dist/http/early-hints.d.ts.map +1 -0
- package/dist/http/early-hints.js +33 -0
- package/dist/http/early-hints.js.map +1 -0
- package/dist/http/form-data.d.ts +17 -35
- package/dist/http/form-data.d.ts.map +1 -1
- package/dist/http/form-data.js +12 -34
- package/dist/http/form-data.js.map +1 -1
- package/dist/http/h1/client.d.ts +14 -26
- package/dist/http/h1/client.d.ts.map +1 -1
- package/dist/http/h1/client.js +14 -23
- package/dist/http/h1/client.js.map +1 -1
- package/dist/http/h1/encoder.d.ts +10 -17
- package/dist/http/h1/encoder.d.ts.map +1 -1
- package/dist/http/h1/encoder.js +10 -17
- package/dist/http/h1/encoder.js.map +1 -1
- package/dist/http/h1/parser.d.ts +22 -59
- package/dist/http/h1/parser.d.ts.map +1 -1
- package/dist/http/h1/parser.js +15 -47
- package/dist/http/h1/parser.js.map +1 -1
- package/dist/http/h2/client.d.ts +18 -59
- package/dist/http/h2/client.d.ts.map +1 -1
- package/dist/http/h2/client.js +29 -64
- package/dist/http/h2/client.js.map +1 -1
- package/dist/http/h2/frames.d.ts +53 -84
- package/dist/http/h2/frames.d.ts.map +1 -1
- package/dist/http/h2/frames.js +48 -76
- package/dist/http/h2/frames.js.map +1 -1
- package/dist/http/h2/hpack.d.ts +16 -35
- package/dist/http/h2/hpack.d.ts.map +1 -1
- package/dist/http/h2/hpack.js +16 -35
- package/dist/http/h2/hpack.js.map +1 -1
- package/dist/http/h3/detection.d.ts +5 -7
- package/dist/http/h3/detection.d.ts.map +1 -1
- package/dist/http/h3/detection.js +5 -23
- package/dist/http/h3/detection.js.map +1 -1
- package/dist/http/negotiator.d.ts +25 -38
- package/dist/http/negotiator.d.ts.map +1 -1
- package/dist/http/negotiator.js +16 -28
- package/dist/http/negotiator.js.map +1 -1
- package/dist/http/pool.d.ts +32 -62
- package/dist/http/pool.d.ts.map +1 -1
- package/dist/http/pool.js +22 -41
- package/dist/http/pool.js.map +1 -1
- package/dist/http/resumable-upload.d.ts +76 -0
- package/dist/http/resumable-upload.d.ts.map +1 -0
- package/dist/http/resumable-upload.js +104 -0
- package/dist/http/resumable-upload.js.map +1 -0
- package/dist/http/trailers.d.ts +29 -0
- package/dist/http/trailers.d.ts.map +1 -0
- package/dist/http/trailers.js +57 -0
- package/dist/http/trailers.js.map +1 -0
- package/dist/index.d.ts +21 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -2
- package/dist/index.js.map +1 -1
- package/dist/middleware/interceptor.d.ts +13 -32
- package/dist/middleware/interceptor.d.ts.map +1 -1
- package/dist/middleware/interceptor.js +11 -16
- package/dist/middleware/interceptor.js.map +1 -1
- package/dist/middleware/rate-limiter.d.ts +8 -17
- package/dist/middleware/rate-limiter.d.ts.map +1 -1
- package/dist/middleware/rate-limiter.js +11 -12
- package/dist/middleware/rate-limiter.js.map +1 -1
- package/dist/middleware/retry-after.d.ts +15 -0
- package/dist/middleware/retry-after.d.ts.map +1 -0
- package/dist/middleware/retry-after.js +36 -0
- package/dist/middleware/retry-after.js.map +1 -0
- package/dist/middleware/retry.d.ts +9 -18
- package/dist/middleware/retry.d.ts.map +1 -1
- package/dist/middleware/retry.js +12 -9
- package/dist/middleware/retry.js.map +1 -1
- package/dist/proxy/auth.d.ts +73 -0
- package/dist/proxy/auth.d.ts.map +1 -0
- package/dist/proxy/auth.js +128 -0
- package/dist/proxy/auth.js.map +1 -0
- package/dist/proxy/env-proxy.d.ts +5 -15
- package/dist/proxy/env-proxy.d.ts.map +1 -1
- package/dist/proxy/env-proxy.js +5 -23
- package/dist/proxy/env-proxy.js.map +1 -1
- package/dist/proxy/http-proxy.d.ts +12 -19
- package/dist/proxy/http-proxy.d.ts.map +1 -1
- package/dist/proxy/http-proxy.js +5 -8
- package/dist/proxy/http-proxy.js.map +1 -1
- package/dist/proxy/socks.d.ts +13 -20
- package/dist/proxy/socks.d.ts.map +1 -1
- package/dist/proxy/socks.js +5 -8
- package/dist/proxy/socks.js.map +1 -1
- package/dist/sse/parser.d.ts +14 -37
- package/dist/sse/parser.d.ts.map +1 -1
- package/dist/sse/parser.js +14 -28
- package/dist/sse/parser.js.map +1 -1
- package/dist/tls/constants.d.ts +15 -74
- package/dist/tls/constants.d.ts.map +1 -1
- package/dist/tls/constants.js +15 -74
- package/dist/tls/constants.js.map +1 -1
- package/dist/tls/ct.d.ts +78 -0
- package/dist/tls/ct.d.ts.map +1 -0
- package/dist/tls/ct.js +175 -0
- package/dist/tls/ct.js.map +1 -0
- package/dist/tls/early-data.d.ts +45 -0
- package/dist/tls/early-data.d.ts.map +1 -0
- package/dist/tls/early-data.js +46 -0
- package/dist/tls/early-data.js.map +1 -0
- package/dist/tls/ech.d.ts +68 -85
- package/dist/tls/ech.d.ts.map +1 -1
- package/dist/tls/ech.js +54 -102
- package/dist/tls/ech.js.map +1 -1
- package/dist/tls/keylog.d.ts +34 -0
- package/dist/tls/keylog.d.ts.map +1 -0
- package/dist/tls/keylog.js +64 -0
- package/dist/tls/keylog.js.map +1 -0
- package/dist/tls/node-engine.d.ts +10 -17
- package/dist/tls/node-engine.d.ts.map +1 -1
- package/dist/tls/node-engine.js +20 -18
- package/dist/tls/node-engine.js.map +1 -1
- package/dist/tls/ocsp.d.ts +55 -0
- package/dist/tls/ocsp.d.ts.map +1 -0
- package/dist/tls/ocsp.js +131 -0
- package/dist/tls/ocsp.js.map +1 -0
- package/dist/tls/pin-verification.d.ts +5 -4
- package/dist/tls/pin-verification.d.ts.map +1 -1
- package/dist/tls/pin-verification.js +5 -11
- package/dist/tls/pin-verification.js.map +1 -1
- package/dist/tls/session-cache.d.ts +27 -39
- package/dist/tls/session-cache.d.ts.map +1 -1
- package/dist/tls/session-cache.js +20 -24
- package/dist/tls/session-cache.js.map +1 -1
- package/dist/tls/stealth/client-hello.d.ts +25 -44
- package/dist/tls/stealth/client-hello.d.ts.map +1 -1
- package/dist/tls/stealth/client-hello.js +17 -28
- package/dist/tls/stealth/client-hello.js.map +1 -1
- package/dist/tls/stealth/engine.d.ts +5 -15
- package/dist/tls/stealth/engine.d.ts.map +1 -1
- package/dist/tls/stealth/engine.js +11 -17
- package/dist/tls/stealth/engine.js.map +1 -1
- package/dist/tls/stealth/handshake.d.ts +21 -31
- package/dist/tls/stealth/handshake.d.ts.map +1 -1
- package/dist/tls/stealth/handshake.js +15 -43
- package/dist/tls/stealth/handshake.js.map +1 -1
- package/dist/tls/stealth/key-schedule.d.ts +59 -86
- package/dist/tls/stealth/key-schedule.d.ts.map +1 -1
- package/dist/tls/stealth/key-schedule.js +46 -58
- package/dist/tls/stealth/key-schedule.js.map +1 -1
- package/dist/tls/stealth/record-layer.d.ts +52 -75
- package/dist/tls/stealth/record-layer.d.ts.map +1 -1
- package/dist/tls/stealth/record-layer.js +47 -63
- package/dist/tls/stealth/record-layer.js.map +1 -1
- package/dist/tls/stealth/tls12-handshake.d.ts +16 -0
- package/dist/tls/stealth/tls12-handshake.d.ts.map +1 -1
- package/dist/tls/stealth/tls12-handshake.js +8 -0
- package/dist/tls/stealth/tls12-handshake.js.map +1 -1
- package/dist/tls/types.d.ts +42 -60
- package/dist/tls/types.d.ts.map +1 -1
- package/dist/utils/buffer-reader.d.ts +26 -81
- package/dist/utils/buffer-reader.d.ts.map +1 -1
- package/dist/utils/buffer-reader.js +26 -81
- package/dist/utils/buffer-reader.js.map +1 -1
- package/dist/utils/buffer-writer.d.ts +30 -66
- package/dist/utils/buffer-writer.d.ts.map +1 -1
- package/dist/utils/buffer-writer.js +30 -66
- package/dist/utils/buffer-writer.js.map +1 -1
- package/dist/utils/compression.d.ts +18 -0
- package/dist/utils/compression.d.ts.map +1 -0
- package/dist/utils/compression.js +34 -0
- package/dist/utils/compression.js.map +1 -0
- package/dist/utils/dictionary-transport.d.ts +97 -0
- package/dist/utils/dictionary-transport.d.ts.map +1 -0
- package/dist/utils/dictionary-transport.js +171 -0
- package/dist/utils/dictionary-transport.js.map +1 -0
- package/dist/utils/encoding.d.ts +12 -30
- package/dist/utils/encoding.d.ts.map +1 -1
- package/dist/utils/encoding.js +15 -46
- package/dist/utils/encoding.js.map +1 -1
- package/dist/utils/happy-eyeballs.d.ts +18 -8
- package/dist/utils/happy-eyeballs.d.ts.map +1 -1
- package/dist/utils/happy-eyeballs.js +19 -27
- package/dist/utils/happy-eyeballs.js.map +1 -1
- package/dist/utils/logger.d.ts +54 -81
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +92 -64
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/tcp-fast-open.d.ts +30 -0
- package/dist/utils/tcp-fast-open.d.ts.map +1 -0
- package/dist/utils/tcp-fast-open.js +36 -0
- package/dist/utils/tcp-fast-open.js.map +1 -0
- package/dist/utils/url.d.ts +18 -25
- package/dist/utils/url.d.ts.map +1 -1
- package/dist/utils/url.js +18 -25
- package/dist/utils/url.js.map +1 -1
- package/dist/ws/client.d.ts +33 -53
- package/dist/ws/client.d.ts.map +1 -1
- package/dist/ws/client.js +29 -30
- package/dist/ws/client.js.map +1 -1
- package/dist/ws/frame.d.ts +24 -41
- package/dist/ws/frame.d.ts.map +1 -1
- package/dist/ws/frame.js +18 -33
- package/dist/ws/frame.js.map +1 -1
- package/dist/ws/permessage-deflate.d.ts +23 -28
- package/dist/ws/permessage-deflate.d.ts.map +1 -1
- package/dist/ws/permessage-deflate.js +18 -26
- package/dist/ws/permessage-deflate.js.map +1 -1
- package/package.json +62 -62
|
@@ -1,143 +1,116 @@
|
|
|
1
1
|
import { createHash as _createHash } from "node:crypto";
|
|
2
|
-
/**
|
|
3
|
-
* Hash algorithm identifiers supported by the TLS 1.3 key schedule.
|
|
4
|
-
*
|
|
5
|
-
* @typedef {'sha256'|'sha384'} HashAlgorithm
|
|
6
|
-
*/
|
|
2
|
+
/** Hash algorithm identifiers used in the TLS 1.3 key schedule. */
|
|
7
3
|
export type HashAlgorithm = "sha256" | "sha384";
|
|
8
4
|
/**
|
|
9
|
-
*
|
|
5
|
+
* Return the digest output length for the given hash algorithm.
|
|
10
6
|
*
|
|
11
|
-
* @param {HashAlgorithm} alg - Hash algorithm
|
|
12
|
-
* @returns {number}
|
|
7
|
+
* @param {HashAlgorithm} alg - Hash algorithm.
|
|
8
|
+
* @returns {number} Length in bytes.
|
|
13
9
|
*/
|
|
14
10
|
export declare function hashLength(alg: HashAlgorithm): number;
|
|
15
11
|
/**
|
|
16
|
-
*
|
|
12
|
+
* HKDF-Extract as defined in RFC 5869.
|
|
17
13
|
*
|
|
18
|
-
* @param {HashAlgorithm} alg
|
|
19
|
-
* @param {Buffer}
|
|
20
|
-
* @param {Buffer}
|
|
21
|
-
* @returns {Buffer} Pseudorandom key
|
|
14
|
+
* @param {HashAlgorithm} alg - Hash algorithm.
|
|
15
|
+
* @param {Buffer} salt - Salt value.
|
|
16
|
+
* @param {Buffer} ikm - Input keying material.
|
|
17
|
+
* @returns {Buffer} Pseudorandom key.
|
|
22
18
|
*/
|
|
23
19
|
export declare function hkdfExtract(alg: HashAlgorithm, salt: Buffer, ikm: Buffer): Buffer;
|
|
24
20
|
/**
|
|
25
|
-
*
|
|
26
|
-
* deriving a key of `length` bytes from `secret` using the given label
|
|
27
|
-
* and context hash.
|
|
21
|
+
* HKDF-Expand-Label as defined in TLS 1.3 (RFC 8446 §7.1).
|
|
28
22
|
*
|
|
29
|
-
* @param {HashAlgorithm} alg
|
|
30
|
-
* @param {Buffer}
|
|
31
|
-
* @param {string}
|
|
32
|
-
* @param {Buffer}
|
|
33
|
-
* @param {number}
|
|
34
|
-
* @returns {Buffer} Derived key material
|
|
23
|
+
* @param {HashAlgorithm} alg - Hash algorithm.
|
|
24
|
+
* @param {Buffer} secret - Input secret.
|
|
25
|
+
* @param {string} label - Label string (without the "tls13 " prefix).
|
|
26
|
+
* @param {Buffer} context - Context hash.
|
|
27
|
+
* @param {number} length - Desired output length in bytes.
|
|
28
|
+
* @returns {Buffer} Derived key material.
|
|
35
29
|
*/
|
|
36
30
|
export declare function hkdfExpandLabel(alg: HashAlgorithm, secret: Buffer, label: string, context: Buffer, length: number): Buffer;
|
|
37
31
|
/**
|
|
38
|
-
*
|
|
39
|
-
* (RFC 8446 §7.1). This is the canonical `Derive-Secret` function of the
|
|
40
|
-
* TLS 1.3 key schedule.
|
|
32
|
+
* Derive a TLS 1.3 secret from an intermediate secret and transcript hash.
|
|
41
33
|
*
|
|
42
|
-
* @param {HashAlgorithm} alg
|
|
43
|
-
* @param {Buffer}
|
|
44
|
-
* @param {string}
|
|
45
|
-
* @param {Buffer}
|
|
46
|
-
* @returns {Buffer} Derived secret
|
|
34
|
+
* @param {HashAlgorithm} alg - Hash algorithm.
|
|
35
|
+
* @param {Buffer} secret - Base secret.
|
|
36
|
+
* @param {string} label - Derivation label.
|
|
37
|
+
* @param {Buffer} transcriptHash - Current transcript hash.
|
|
38
|
+
* @returns {Buffer} Derived secret.
|
|
47
39
|
*/
|
|
48
40
|
export declare function deriveSecret(alg: HashAlgorithm, secret: Buffer, label: string, transcriptHash: Buffer): Buffer;
|
|
49
41
|
export { _createHash as createHash };
|
|
50
42
|
/**
|
|
51
|
-
*
|
|
52
|
-
* `alg` — used as the IKM or salt argument in HKDF-Extract calls that
|
|
53
|
-
* require a zero-length secret at the start of the TLS 1.3 key schedule.
|
|
43
|
+
* Return an all-zero key of the hash's digest length.
|
|
54
44
|
*
|
|
55
|
-
* @param {HashAlgorithm} alg - Hash algorithm
|
|
56
|
-
* @returns {Buffer} Zero-filled buffer
|
|
45
|
+
* @param {HashAlgorithm} alg - Hash algorithm.
|
|
46
|
+
* @returns {Buffer} Zero-filled buffer.
|
|
57
47
|
*/
|
|
58
48
|
export declare function zeroKey(alg: HashAlgorithm): Buffer;
|
|
59
|
-
/**
|
|
60
|
-
* Key material derived during the handshake phase of TLS 1.3 key schedule,
|
|
61
|
-
* used to decrypt EncryptedExtensions, Certificate, CertificateVerify, and
|
|
62
|
-
* Finished messages from the server.
|
|
63
|
-
*
|
|
64
|
-
* @typedef {Object} HandshakeKeys
|
|
65
|
-
* @property {Buffer} clientHandshakeKey - Client handshake traffic key.
|
|
66
|
-
* @property {Buffer} clientHandshakeIV - Client handshake traffic IV.
|
|
67
|
-
* @property {Buffer} serverHandshakeKey - Server handshake traffic key.
|
|
68
|
-
* @property {Buffer} serverHandshakeIV - Server handshake traffic IV.
|
|
69
|
-
* @property {Buffer} handshakeSecret - TLS 1.3 handshake secret (intermediate key schedule value).
|
|
70
|
-
* @property {Buffer} masterSecret - TLS 1.3 master secret used to derive application keys.
|
|
71
|
-
*/
|
|
49
|
+
/** Derived TLS 1.3 handshake traffic keys and intermediate secrets. */
|
|
72
50
|
export interface HandshakeKeys {
|
|
51
|
+
/** Client handshake traffic encryption key. */
|
|
73
52
|
clientHandshakeKey: Buffer;
|
|
53
|
+
/** Client handshake traffic IV. */
|
|
74
54
|
clientHandshakeIV: Buffer;
|
|
55
|
+
/** Server handshake traffic encryption key. */
|
|
75
56
|
serverHandshakeKey: Buffer;
|
|
57
|
+
/** Server handshake traffic IV. */
|
|
76
58
|
serverHandshakeIV: Buffer;
|
|
59
|
+
/** Handshake secret for further derivation. */
|
|
77
60
|
handshakeSecret: Buffer;
|
|
61
|
+
/** Master secret for application key derivation. */
|
|
78
62
|
masterSecret: Buffer;
|
|
79
63
|
}
|
|
80
|
-
/**
|
|
81
|
-
* Application traffic key material derived after handshake completion,
|
|
82
|
-
* used to encrypt and decrypt application data records.
|
|
83
|
-
*
|
|
84
|
-
* @typedef {Object} ApplicationKeys
|
|
85
|
-
* @property {Buffer} clientKey - Client application traffic key.
|
|
86
|
-
* @property {Buffer} clientIV - Client application traffic IV.
|
|
87
|
-
* @property {Buffer} serverKey - Server application traffic key.
|
|
88
|
-
* @property {Buffer} serverIV - Server application traffic IV.
|
|
89
|
-
*/
|
|
64
|
+
/** Derived TLS 1.3 application traffic encryption keys. */
|
|
90
65
|
export interface ApplicationKeys {
|
|
66
|
+
/** Client application traffic key. */
|
|
91
67
|
clientKey: Buffer;
|
|
68
|
+
/** Client application traffic IV. */
|
|
92
69
|
clientIV: Buffer;
|
|
70
|
+
/** Server application traffic key. */
|
|
93
71
|
serverKey: Buffer;
|
|
72
|
+
/** Server application traffic IV. */
|
|
94
73
|
serverIV: Buffer;
|
|
95
74
|
}
|
|
96
75
|
/**
|
|
97
|
-
*
|
|
76
|
+
* Determine key and IV lengths for a TLS cipher suite.
|
|
98
77
|
*
|
|
99
|
-
* @param {string} cipherName -
|
|
100
|
-
* @returns {{ keyLen: number; ivLen: number }} Key
|
|
78
|
+
* @param {string} cipherName - Cipher suite name string.
|
|
79
|
+
* @returns {{ keyLen: number; ivLen: number }} Key and IV lengths in bytes.
|
|
101
80
|
*/
|
|
102
81
|
export declare function keyIVLengths(cipherName: string): {
|
|
103
82
|
keyLen: number;
|
|
104
83
|
ivLen: number;
|
|
105
84
|
};
|
|
106
85
|
/**
|
|
107
|
-
*
|
|
108
|
-
* the transcript hash of the ClientHello and ServerHello messages
|
|
109
|
-
* (RFC 8446 §7.1).
|
|
86
|
+
* Derive TLS 1.3 handshake traffic keys from the shared secret.
|
|
110
87
|
*
|
|
111
|
-
* @param {HashAlgorithm} alg
|
|
112
|
-
* @param {Buffer}
|
|
113
|
-
* @param {Buffer}
|
|
114
|
-
* @param {number}
|
|
115
|
-
* @param {number}
|
|
116
|
-
* @returns {HandshakeKeys}
|
|
88
|
+
* @param {HashAlgorithm} alg - Hash algorithm.
|
|
89
|
+
* @param {Buffer} sharedSecret - ECDHE shared secret.
|
|
90
|
+
* @param {Buffer} helloHash - Transcript hash up to and including ServerHello.
|
|
91
|
+
* @param {number} keyLen - Desired key length in bytes.
|
|
92
|
+
* @param {number} ivLen - Desired IV length in bytes.
|
|
93
|
+
* @returns {HandshakeKeys} Handshake keys and intermediate secrets.
|
|
117
94
|
*/
|
|
118
95
|
export declare function deriveHandshakeKeys(alg: HashAlgorithm, sharedSecret: Buffer, helloHash: Buffer, keyLen: number, ivLen: number): HandshakeKeys;
|
|
119
96
|
/**
|
|
120
|
-
*
|
|
121
|
-
* full handshake transcript hash (RFC 8446 §7.1). These keys are used to
|
|
122
|
-
* encrypt and decrypt all application data after the handshake completes.
|
|
97
|
+
* Derive TLS 1.3 application traffic keys from the master secret.
|
|
123
98
|
*
|
|
124
|
-
* @param {HashAlgorithm} alg
|
|
125
|
-
* @param {Buffer}
|
|
126
|
-
* @param {Buffer}
|
|
127
|
-
* @param {number}
|
|
128
|
-
* @param {number}
|
|
129
|
-
* @returns {ApplicationKeys}
|
|
99
|
+
* @param {HashAlgorithm} alg - Hash algorithm.
|
|
100
|
+
* @param {Buffer} masterSecret - Master secret from the key schedule.
|
|
101
|
+
* @param {Buffer} handshakeHash - Transcript hash up to and including server Finished.
|
|
102
|
+
* @param {number} keyLen - Desired key length in bytes.
|
|
103
|
+
* @param {number} ivLen - Desired IV length in bytes.
|
|
104
|
+
* @returns {ApplicationKeys} Application traffic encryption keys.
|
|
130
105
|
*/
|
|
131
106
|
export declare function deriveApplicationKeys(alg: HashAlgorithm, masterSecret: Buffer, handshakeHash: Buffer, keyLen: number, ivLen: number): ApplicationKeys;
|
|
132
107
|
/**
|
|
133
|
-
*
|
|
134
|
-
* as `HMAC(finished_key, transcript_hash)`, where `finished_key` is derived
|
|
135
|
-
* from the base traffic secret using HKDF-Expand-Label.
|
|
108
|
+
* Compute the Finished verify_data for the TLS 1.3 handshake.
|
|
136
109
|
*
|
|
137
|
-
* @param {HashAlgorithm} alg
|
|
138
|
-
* @param {Buffer}
|
|
139
|
-
* @param {Buffer}
|
|
140
|
-
* @returns {Buffer}
|
|
110
|
+
* @param {HashAlgorithm} alg - Hash algorithm.
|
|
111
|
+
* @param {Buffer} baseSecret - Handshake traffic secret.
|
|
112
|
+
* @param {Buffer} transcriptHash - Current transcript hash.
|
|
113
|
+
* @returns {Buffer} HMAC verify data bytes.
|
|
141
114
|
*/
|
|
142
115
|
export declare function computeFinishedVerifyData(alg: HashAlgorithm, baseSecret: Buffer, transcriptHash: Buffer): Buffer;
|
|
143
116
|
//# sourceMappingURL=key-schedule.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"key-schedule.d.ts","sourceRoot":"","sources":["../../../src/tls/stealth/key-schedule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,UAAU,IAAI,WAAW,EAAE,MAAM,aAAa,CAAC;AAEpE
|
|
1
|
+
{"version":3,"file":"key-schedule.d.ts","sourceRoot":"","sources":["../../../src/tls/stealth/key-schedule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,UAAU,IAAI,WAAW,EAAE,MAAM,aAAa,CAAC;AAEpE,mEAAmE;AACnE,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEhD;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAErD;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAEjF;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAA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G;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,eAAe,CAUrJ;AAMD;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,MAAM,CAGhH"}
|
|
@@ -1,35 +1,33 @@
|
|
|
1
1
|
import { createHmac, createHash as _createHash } from "node:crypto";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Return the digest output length for the given hash algorithm.
|
|
4
4
|
*
|
|
5
|
-
* @param {HashAlgorithm} alg - Hash algorithm
|
|
6
|
-
* @returns {number}
|
|
5
|
+
* @param {HashAlgorithm} alg - Hash algorithm.
|
|
6
|
+
* @returns {number} Length in bytes.
|
|
7
7
|
*/
|
|
8
8
|
export function hashLength(alg) {
|
|
9
9
|
return alg === "sha256" ? 32 : 48;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* HKDF-Extract as defined in RFC 5869.
|
|
13
13
|
*
|
|
14
|
-
* @param {HashAlgorithm} alg
|
|
15
|
-
* @param {Buffer}
|
|
16
|
-
* @param {Buffer}
|
|
17
|
-
* @returns {Buffer} Pseudorandom key
|
|
14
|
+
* @param {HashAlgorithm} alg - Hash algorithm.
|
|
15
|
+
* @param {Buffer} salt - Salt value.
|
|
16
|
+
* @param {Buffer} ikm - Input keying material.
|
|
17
|
+
* @returns {Buffer} Pseudorandom key.
|
|
18
18
|
*/
|
|
19
19
|
export function hkdfExtract(alg, salt, ikm) {
|
|
20
20
|
return Buffer.from(createHmac(alg, salt).update(ikm).digest());
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
24
|
-
* deriving a key of `length` bytes from `secret` using the given label
|
|
25
|
-
* and context hash.
|
|
23
|
+
* HKDF-Expand-Label as defined in TLS 1.3 (RFC 8446 §7.1).
|
|
26
24
|
*
|
|
27
|
-
* @param {HashAlgorithm} alg
|
|
28
|
-
* @param {Buffer}
|
|
29
|
-
* @param {string}
|
|
30
|
-
* @param {Buffer}
|
|
31
|
-
* @param {number}
|
|
32
|
-
* @returns {Buffer} Derived key material
|
|
25
|
+
* @param {HashAlgorithm} alg - Hash algorithm.
|
|
26
|
+
* @param {Buffer} secret - Input secret.
|
|
27
|
+
* @param {string} label - Label string (without the "tls13 " prefix).
|
|
28
|
+
* @param {Buffer} context - Context hash.
|
|
29
|
+
* @param {number} length - Desired output length in bytes.
|
|
30
|
+
* @returns {Buffer} Derived key material.
|
|
33
31
|
*/
|
|
34
32
|
export function hkdfExpandLabel(alg, secret, label, context, length) {
|
|
35
33
|
const fullLabel = Buffer.from("tls13 " + label, "ascii");
|
|
@@ -60,36 +58,32 @@ function hkdfExpand(alg, prk, info, length) {
|
|
|
60
58
|
return okm.subarray(0, length);
|
|
61
59
|
}
|
|
62
60
|
/**
|
|
63
|
-
*
|
|
64
|
-
* (RFC 8446 §7.1). This is the canonical `Derive-Secret` function of the
|
|
65
|
-
* TLS 1.3 key schedule.
|
|
61
|
+
* Derive a TLS 1.3 secret from an intermediate secret and transcript hash.
|
|
66
62
|
*
|
|
67
|
-
* @param {HashAlgorithm} alg
|
|
68
|
-
* @param {Buffer}
|
|
69
|
-
* @param {string}
|
|
70
|
-
* @param {Buffer}
|
|
71
|
-
* @returns {Buffer} Derived secret
|
|
63
|
+
* @param {HashAlgorithm} alg - Hash algorithm.
|
|
64
|
+
* @param {Buffer} secret - Base secret.
|
|
65
|
+
* @param {string} label - Derivation label.
|
|
66
|
+
* @param {Buffer} transcriptHash - Current transcript hash.
|
|
67
|
+
* @returns {Buffer} Derived secret.
|
|
72
68
|
*/
|
|
73
69
|
export function deriveSecret(alg, secret, label, transcriptHash) {
|
|
74
70
|
return hkdfExpandLabel(alg, secret, label, transcriptHash, hashLength(alg));
|
|
75
71
|
}
|
|
76
72
|
export { _createHash as createHash };
|
|
77
73
|
/**
|
|
78
|
-
*
|
|
79
|
-
* `alg` — used as the IKM or salt argument in HKDF-Extract calls that
|
|
80
|
-
* require a zero-length secret at the start of the TLS 1.3 key schedule.
|
|
74
|
+
* Return an all-zero key of the hash's digest length.
|
|
81
75
|
*
|
|
82
|
-
* @param {HashAlgorithm} alg - Hash algorithm
|
|
83
|
-
* @returns {Buffer} Zero-filled buffer
|
|
76
|
+
* @param {HashAlgorithm} alg - Hash algorithm.
|
|
77
|
+
* @returns {Buffer} Zero-filled buffer.
|
|
84
78
|
*/
|
|
85
79
|
export function zeroKey(alg) {
|
|
86
80
|
return Buffer.alloc(hashLength(alg));
|
|
87
81
|
}
|
|
88
82
|
/**
|
|
89
|
-
*
|
|
83
|
+
* Determine key and IV lengths for a TLS cipher suite.
|
|
90
84
|
*
|
|
91
|
-
* @param {string} cipherName -
|
|
92
|
-
* @returns {{ keyLen: number; ivLen: number }} Key
|
|
85
|
+
* @param {string} cipherName - Cipher suite name string.
|
|
86
|
+
* @returns {{ keyLen: number; ivLen: number }} Key and IV lengths in bytes.
|
|
93
87
|
*/
|
|
94
88
|
export function keyIVLengths(cipherName) {
|
|
95
89
|
if (cipherName.includes("AES_128")) {
|
|
@@ -101,16 +95,14 @@ export function keyIVLengths(cipherName) {
|
|
|
101
95
|
return { keyLen: 16, ivLen: 12 };
|
|
102
96
|
}
|
|
103
97
|
/**
|
|
104
|
-
*
|
|
105
|
-
* the transcript hash of the ClientHello and ServerHello messages
|
|
106
|
-
* (RFC 8446 §7.1).
|
|
98
|
+
* Derive TLS 1.3 handshake traffic keys from the shared secret.
|
|
107
99
|
*
|
|
108
|
-
* @param {HashAlgorithm} alg
|
|
109
|
-
* @param {Buffer}
|
|
110
|
-
* @param {Buffer}
|
|
111
|
-
* @param {number}
|
|
112
|
-
* @param {number}
|
|
113
|
-
* @returns {HandshakeKeys}
|
|
100
|
+
* @param {HashAlgorithm} alg - Hash algorithm.
|
|
101
|
+
* @param {Buffer} sharedSecret - ECDHE shared secret.
|
|
102
|
+
* @param {Buffer} helloHash - Transcript hash up to and including ServerHello.
|
|
103
|
+
* @param {number} keyLen - Desired key length in bytes.
|
|
104
|
+
* @param {number} ivLen - Desired IV length in bytes.
|
|
105
|
+
* @returns {HandshakeKeys} Handshake keys and intermediate secrets.
|
|
114
106
|
*/
|
|
115
107
|
export function deriveHandshakeKeys(alg, sharedSecret, helloHash, keyLen, ivLen) {
|
|
116
108
|
const earlySecret = hkdfExtract(alg, Buffer.alloc(hashLength(alg)), zeroKey(alg));
|
|
@@ -134,16 +126,14 @@ export function deriveHandshakeKeys(alg, sharedSecret, helloHash, keyLen, ivLen)
|
|
|
134
126
|
};
|
|
135
127
|
}
|
|
136
128
|
/**
|
|
137
|
-
*
|
|
138
|
-
* full handshake transcript hash (RFC 8446 §7.1). These keys are used to
|
|
139
|
-
* encrypt and decrypt all application data after the handshake completes.
|
|
129
|
+
* Derive TLS 1.3 application traffic keys from the master secret.
|
|
140
130
|
*
|
|
141
|
-
* @param {HashAlgorithm} alg
|
|
142
|
-
* @param {Buffer}
|
|
143
|
-
* @param {Buffer}
|
|
144
|
-
* @param {number}
|
|
145
|
-
* @param {number}
|
|
146
|
-
* @returns {ApplicationKeys}
|
|
131
|
+
* @param {HashAlgorithm} alg - Hash algorithm.
|
|
132
|
+
* @param {Buffer} masterSecret - Master secret from the key schedule.
|
|
133
|
+
* @param {Buffer} handshakeHash - Transcript hash up to and including server Finished.
|
|
134
|
+
* @param {number} keyLen - Desired key length in bytes.
|
|
135
|
+
* @param {number} ivLen - Desired IV length in bytes.
|
|
136
|
+
* @returns {ApplicationKeys} Application traffic encryption keys.
|
|
147
137
|
*/
|
|
148
138
|
export function deriveApplicationKeys(alg, masterSecret, handshakeHash, keyLen, ivLen) {
|
|
149
139
|
const clientSecret = deriveSecret(alg, masterSecret, "c ap traffic", handshakeHash);
|
|
@@ -159,14 +149,12 @@ function emptyHash(alg) {
|
|
|
159
149
|
return _createHash(alg).digest();
|
|
160
150
|
}
|
|
161
151
|
/**
|
|
162
|
-
*
|
|
163
|
-
* as `HMAC(finished_key, transcript_hash)`, where `finished_key` is derived
|
|
164
|
-
* from the base traffic secret using HKDF-Expand-Label.
|
|
152
|
+
* Compute the Finished verify_data for the TLS 1.3 handshake.
|
|
165
153
|
*
|
|
166
|
-
* @param {HashAlgorithm} alg
|
|
167
|
-
* @param {Buffer}
|
|
168
|
-
* @param {Buffer}
|
|
169
|
-
* @returns {Buffer}
|
|
154
|
+
* @param {HashAlgorithm} alg - Hash algorithm.
|
|
155
|
+
* @param {Buffer} baseSecret - Handshake traffic secret.
|
|
156
|
+
* @param {Buffer} transcriptHash - Current transcript hash.
|
|
157
|
+
* @returns {Buffer} HMAC verify data bytes.
|
|
170
158
|
*/
|
|
171
159
|
export function computeFinishedVerifyData(alg, baseSecret, transcriptHash) {
|
|
172
160
|
const finishedKey = hkdfExpandLabel(alg, baseSecret, "finished", Buffer.alloc(0), hashLength(alg));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"key-schedule.js","sourceRoot":"","sources":["../../../src/tls/stealth/key-schedule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,IAAI,WAAW,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"key-schedule.js","sourceRoot":"","sources":["../../../src/tls/stealth/key-schedule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,IAAI,WAAW,EAAE,MAAM,aAAa,CAAC;AAKpE;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,GAAkB;IAC3C,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AACpC,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,WAAW,CAAC,GAAkB,EAAE,IAAY,EAAE,GAAW;IACvE,OAAO,MAAM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AAC,CAAC,EAAE,MAAM,CAAC;QAC7E,QAAQ,EAAE,eAAe,CAAC,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC;KAC3E,CAAC;AACJ,CAAC;AAED,SAAS,SAAS,CAAC,GAAkB;IACnC,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC;AACnC,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,yBAAyB,CAAC,GAAkB,EAAE,UAAkB,EAAE,cAAsB;IACtG,MAAM,WAAW,GAAG,eAAe,CAAC,GAAG,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;IACnG,OAAO,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;AACnF,CAAC"}
|
|
@@ -1,122 +1,99 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A single parsed TLS record as defined in RFC 8446 ¥5.1.
|
|
3
|
-
*
|
|
4
|
-
* @typedef {Object} TLSRecord
|
|
5
|
-
* @property {number} type - Content type byte (see {@link RecordType}).
|
|
6
|
-
* @property {number} version - Legacy record version (e.g. `0x0303` for TLS 1.2 compatibility).
|
|
7
|
-
* @property {Buffer} fragment - Raw payload bytes of the record.
|
|
8
|
-
*/
|
|
1
|
+
/** Parsed TLS record with type, version, and payload fragment. */
|
|
9
2
|
export interface TLSRecord {
|
|
3
|
+
/** Record content type. */
|
|
10
4
|
type: number;
|
|
5
|
+
/** Protocol version from the record header. */
|
|
11
6
|
version: number;
|
|
7
|
+
/** Record payload bytes. */
|
|
12
8
|
fragment: Buffer;
|
|
13
9
|
}
|
|
14
10
|
/**
|
|
15
|
-
*
|
|
16
|
-
* Returns `null` without consuming the buffer if fewer than 5 bytes are
|
|
17
|
-
* available or the payload has not been fully received yet.
|
|
11
|
+
* Read a single TLS record from a buffer at the given offset.
|
|
18
12
|
*
|
|
19
|
-
* @param {Buffer} data
|
|
20
|
-
* @param {number} offset - Byte offset
|
|
21
|
-
* @returns {{ record: TLSRecord; bytesRead: number } | null} Parsed record and
|
|
13
|
+
* @param {Buffer} data - Buffer containing one or more TLS records.
|
|
14
|
+
* @param {number} offset - Byte offset to start reading from.
|
|
15
|
+
* @returns {{ record: TLSRecord; bytesRead: number } | null} Parsed record and bytes consumed, or `null` if incomplete.
|
|
22
16
|
*/
|
|
23
17
|
export declare function readRecord(data: Buffer, offset: number): {
|
|
24
18
|
record: TLSRecord;
|
|
25
19
|
bytesRead: number;
|
|
26
20
|
} | null;
|
|
27
21
|
/**
|
|
28
|
-
*
|
|
22
|
+
* Write a TLS record with the given type, version, and payload.
|
|
29
23
|
*
|
|
30
|
-
* @param {number} type
|
|
31
|
-
* @param {number} version -
|
|
32
|
-
* @param {Buffer} payload - Record payload
|
|
33
|
-
* @returns {Buffer}
|
|
24
|
+
* @param {number} type - Record content type.
|
|
25
|
+
* @param {number} version - Protocol version.
|
|
26
|
+
* @param {Buffer} payload - Record payload.
|
|
27
|
+
* @returns {Buffer} Serialized TLS record buffer.
|
|
34
28
|
*/
|
|
35
29
|
export declare function writeRecord(type: number, version: number, payload: Buffer): Buffer;
|
|
36
|
-
/**
|
|
37
|
-
* AEAD algorithm identifiers supported by the record layer. Corresponds to
|
|
38
|
-
* the TLS 1.3 mandatory cipher suites.
|
|
39
|
-
*
|
|
40
|
-
* @typedef {'aes-128-gcm'|'aes-256-gcm'|'chacha20-poly1305'} AEADAlgorithm
|
|
41
|
-
*/
|
|
30
|
+
/** AEAD algorithm identifiers for TLS record encryption. */
|
|
42
31
|
export type AEADAlgorithm = "aes-128-gcm" | "aes-256-gcm" | "chacha20-poly1305";
|
|
43
32
|
/**
|
|
44
|
-
*
|
|
45
|
-
* identifier used by the record layer.
|
|
33
|
+
* Determine the AEAD algorithm from a cipher suite name.
|
|
46
34
|
*
|
|
47
|
-
* @param {string} cipherName - Cipher suite
|
|
48
|
-
* @returns {AEADAlgorithm}
|
|
49
|
-
* @throws {TLSError} If the cipher name does not correspond to a supported AEAD algorithm.
|
|
35
|
+
* @param {string} cipherName - Cipher suite or algorithm name.
|
|
36
|
+
* @returns {AEADAlgorithm} Corresponding AEAD algorithm identifier.
|
|
50
37
|
*/
|
|
51
38
|
export declare function aeadFromCipher(cipherName: string): AEADAlgorithm;
|
|
52
39
|
/**
|
|
53
|
-
*
|
|
54
|
-
* big-endian 64-bit sequence number (RFC 8446 ¥5.3).
|
|
40
|
+
* Build a per-record nonce by XORing the IV with a sequence number.
|
|
55
41
|
*
|
|
56
|
-
* @param {Buffer} iv
|
|
57
|
-
* @param {bigint} sequenceNumber - Record sequence number
|
|
58
|
-
* @returns {Buffer}
|
|
42
|
+
* @param {Buffer} iv - Base initialization vector.
|
|
43
|
+
* @param {bigint} sequenceNumber - Record sequence number.
|
|
44
|
+
* @returns {Buffer} Nonce buffer for AEAD encryption.
|
|
59
45
|
*/
|
|
60
46
|
export declare function buildNonce(iv: Buffer, sequenceNumber: bigint): Buffer;
|
|
61
47
|
/**
|
|
62
|
-
*
|
|
63
|
-
* ciphertext with an appended 16-byte authentication tag.
|
|
48
|
+
* Encrypt a TLS record payload using AEAD.
|
|
64
49
|
*
|
|
65
|
-
* @param {AEADAlgorithm} algorithm
|
|
66
|
-
* @param {Buffer}
|
|
67
|
-
* @param {Buffer}
|
|
68
|
-
* @param {Buffer}
|
|
69
|
-
* @param {Buffer}
|
|
70
|
-
* @returns {Buffer} Ciphertext
|
|
50
|
+
* @param {AEADAlgorithm} algorithm - AEAD algorithm.
|
|
51
|
+
* @param {Buffer} key - Encryption key.
|
|
52
|
+
* @param {Buffer} nonce - Per-record nonce.
|
|
53
|
+
* @param {Buffer} plaintext - Plaintext payload.
|
|
54
|
+
* @param {Buffer} additionalData - Associated data for authentication.
|
|
55
|
+
* @returns {Buffer} Ciphertext with appended authentication tag.
|
|
71
56
|
*/
|
|
72
57
|
export declare function encryptRecord(algorithm: AEADAlgorithm, key: Buffer, nonce: Buffer, plaintext: Buffer, additionalData: Buffer): Buffer;
|
|
73
58
|
/**
|
|
74
|
-
*
|
|
75
|
-
* The last 16 bytes of `ciphertext` are treated as the authentication tag.
|
|
59
|
+
* Decrypt a TLS record payload using AEAD.
|
|
76
60
|
*
|
|
77
|
-
* @param {AEADAlgorithm} algorithm
|
|
78
|
-
* @param {Buffer}
|
|
79
|
-
* @param {Buffer}
|
|
80
|
-
* @param {Buffer}
|
|
81
|
-
* @param {Buffer}
|
|
82
|
-
* @returns {Buffer} Decrypted plaintext
|
|
83
|
-
* @throws {TLSError} If the ciphertext is too short or authentication fails.
|
|
61
|
+
* @param {AEADAlgorithm} algorithm - AEAD algorithm.
|
|
62
|
+
* @param {Buffer} key - Decryption key.
|
|
63
|
+
* @param {Buffer} nonce - Per-record nonce.
|
|
64
|
+
* @param {Buffer} ciphertext - Ciphertext with authentication tag.
|
|
65
|
+
* @param {Buffer} additionalData - Associated data for verification.
|
|
66
|
+
* @returns {Buffer} Decrypted plaintext.
|
|
84
67
|
*/
|
|
85
68
|
export declare function decryptRecord(algorithm: AEADAlgorithm, key: Buffer, nonce: Buffer, ciphertext: Buffer, additionalData: Buffer): Buffer;
|
|
86
69
|
/**
|
|
87
|
-
*
|
|
88
|
-
* data record, encoded as a 5-byte pseudo-record header per RFC 8446 ¥5.2.
|
|
70
|
+
* Build the additional authenticated data (AAD) for a TLS 1.3 record.
|
|
89
71
|
*
|
|
90
|
-
* @param {number} ciphertextLength -
|
|
72
|
+
* @param {number} ciphertextLength - Length of the ciphertext including the tag.
|
|
91
73
|
* @returns {Buffer} 5-byte AAD buffer.
|
|
92
74
|
*/
|
|
93
75
|
export declare function buildAdditionalData(ciphertextLength: number): Buffer;
|
|
94
76
|
/**
|
|
95
|
-
*
|
|
96
|
-
* wraps it in an encrypted TLS record with the appropriate AAD, following
|
|
97
|
-
* RFC 8446 ¥5.2.
|
|
77
|
+
* Encrypt and wrap a plaintext payload into a TLS 1.3 application data record.
|
|
98
78
|
*
|
|
99
|
-
* @param {AEADAlgorithm} algorithm
|
|
100
|
-
* @param {Buffer}
|
|
101
|
-
* @param {Buffer}
|
|
102
|
-
* @param {bigint}
|
|
103
|
-
* @param {number}
|
|
104
|
-
* @param {Buffer}
|
|
105
|
-
* @returns {Buffer}
|
|
79
|
+
* @param {AEADAlgorithm} algorithm - AEAD algorithm.
|
|
80
|
+
* @param {Buffer} key - Client write key.
|
|
81
|
+
* @param {Buffer} iv - Client write IV.
|
|
82
|
+
* @param {bigint} sequenceNumber - Current sequence number.
|
|
83
|
+
* @param {number} contentType - Inner record content type.
|
|
84
|
+
* @param {Buffer} plaintext - Plaintext payload.
|
|
85
|
+
* @returns {Buffer} Serialized encrypted TLS record.
|
|
106
86
|
*/
|
|
107
87
|
export declare function wrapEncryptedRecord(algorithm: AEADAlgorithm, key: Buffer, iv: Buffer, sequenceNumber: bigint, contentType: number, plaintext: Buffer): Buffer;
|
|
108
88
|
/**
|
|
109
|
-
*
|
|
110
|
-
* recovers the true content type embedded as the last non-zero byte of the
|
|
111
|
-
* inner plaintext (RFC 8446 ¥5.2).
|
|
89
|
+
* Decrypt and unwrap a TLS 1.3 encrypted record.
|
|
112
90
|
*
|
|
113
|
-
* @param {AEADAlgorithm} algorithm
|
|
114
|
-
* @param {Buffer}
|
|
115
|
-
* @param {Buffer}
|
|
116
|
-
* @param {bigint}
|
|
117
|
-
* @param {TLSRecord}
|
|
118
|
-
* @returns {{ contentType: number; plaintext: Buffer }}
|
|
119
|
-
* @throws {TLSError} If decryption or authentication fails, or the record is empty after unpadding.
|
|
91
|
+
* @param {AEADAlgorithm} algorithm - AEAD algorithm.
|
|
92
|
+
* @param {Buffer} key - Server write key.
|
|
93
|
+
* @param {Buffer} iv - Server write IV.
|
|
94
|
+
* @param {bigint} sequenceNumber - Current sequence number.
|
|
95
|
+
* @param {TLSRecord} record - Encrypted TLS record.
|
|
96
|
+
* @returns {{ contentType: number; plaintext: Buffer }} Decrypted content type and plaintext.
|
|
120
97
|
*/
|
|
121
98
|
export declare function unwrapEncryptedRecord(algorithm: AEADAlgorithm, key: Buffer, iv: Buffer, sequenceNumber: bigint, record: TLSRecord): {
|
|
122
99
|
contentType: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-layer.d.ts","sourceRoot":"","sources":["../../../src/tls/stealth/record-layer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"record-layer.d.ts","sourceRoot":"","sources":["../../../src/tls/stealth/record-layer.ts"],"names":[],"mappings":"AAKA,kEAAkE;AAClE,MAAM,WAAW,SAAS;IACxB,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,OAAO,EAAE,MAAM,CAAC;IAChB,4BAA4B;IAC5B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAexG;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAOlF;AAED,4DAA4D;AAC5D,MAAM,MAAM,aAAa,GAAG,aAAa,GAAG,aAAa,GAAG,mBAAmB,CAAC;AAEhF;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,aAAa,CAWhE;AAID;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,MAAM,CAQrE;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAA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