Debian Codegraph @

crt/s2n/compliance/specs/raw.githubusercontent.com/FoxIO-LLC/ja4/df3c067/technical_details/JA4/extension-hash.toml

raw symbols SCIP
1 target = "https://raw.githubusercontent.com/FoxIO-LLC/ja4/df3c067/technical_details/JA4.md#extension-hash"
2
3 # ### Extension hash:
4 #
5 # A 12 character truncated sha256 hash of the list of extensions, sorted by hex value, followed by the list of signature algorithms, in the order that they appear (not sorted).
6 #
7 # The extension list is created using the 4 character hex values of the extensions, lower case, comma delimited, sorted (not in the order they appear). Ignore the SNI extension (0000) and the ALPN extension (0010) as we’ve already captured them in the _a_ section of the fingerprint. These values are omitted so that the same application would have the same _c_ section of the fingerprint regardless of if it were going to a domain, IP, or changing ALPNs.
8 #
9 # For example:
10 # ```
11 # 001b,0000,0033,0010,4469,0017,002d,000d,0005,0023,0012,002b,ff01,000b,000a,0015
12 # ```
13 # Is sorted to:
14 # ```
15 # 0005,000a,000b,000d,0012,0015,0017,001b,0023,002b,002d,0033,4469,ff01
16 # ```
17 # (notice 0000 and 0010 is removed)
18 #
19 # The signature algorithm hex values are then added to the end of the list in the order that they appear (not sorted) with an underscore delimiting the two lists.
20 # For example the signature algorithms:
21 # ```
22 # 0403,0804,0401,0503,0805,0501,0806,0601
23 # ```
24 # Are added to the end of the previous string to create:
25 # ```
26 # 0005,000a,000b,000d,0012,0015,0017,001b,0023,002b,002d,0033,4469,ff01_0403,0804,0401,0503,0805,0501,0806,0601
27 # ```
28 # Hashed to:
29 # ```
30 # e5627efa2ab19723084c1033a96c694a45826ab5a460d2d3fd5ffcfe97161c95
31 # ```
32 # Truncated to first 12 characters:
33 # ```
34 # e5627efa2ab1
35 # ```
36 #
37 # If there are no signature algorithms in the hello packet, then the string ends without an underscore and is hashed.
38 # For example:
39 # ```
40 # 0005,000a,000b,000d,0012,0015,0017,001b,0023,002b,002d,0033,4469,ff01 = 6d807ffa2a79
41 # ```
42 #
43 # If there are no extensions in the sorted extensions list, then the value of JA4_c is set to `000000000000`
44 # We do this rather than running a sha256 hash of nothing as this makes it clear to the user when a field has no values.
45 #
46
47 [[spec]]
48 level = "MUST"
49 quote = '''
50 A 12 character truncated sha256 hash of the list of extensions, sorted by hex value, followed by the list of signature algorithms, in the order that they appear (not sorted).
51 '''
52
53 [[spec]]
54 level = "MUST"
55 quote = '''
56 The extension list is created using the 4 character hex values of the extensions, lower case, comma delimited, sorted (not in the order they appear).
57 '''
58
59 [[spec]]
60 level = "MUST"
61 quote = '''
62 Ignore the SNI extension (0000) and the ALPN extension (0010) as we’ve already captured them in the _a_ section of the fingerprint.
63 '''
64
65 [[spec]]
66 level = "MUST"
67 quote = '''
68 The signature algorithm hex values are then added to the end of the list in the order that they appear (not sorted) with an underscore delimiting the two lists.
69 '''
70
71 [[spec]]
72 level = "MUST"
73 quote = '''
74 If there are no signature algorithms in the hello packet, then the string ends without an underscore and is hashed.
75 '''
76
77 [[spec]]
78 level = "MUST"
79 quote = '''
80 If there are no extensions in the sorted extensions list, then the value of JA4_c is set to `000000000000`
81 '''