mirror of
https://github.com/Runnin4ik/dpi-detector.git
synced 2026-10-19 17:33:18 +00:00
vendor: the GREASE ECH body the comment claims is the one the codec makes
`client/ech.rs`'s comment said the greased body is "185 to 281 bytes" while the codec computes `32 * (4 + rand % 4) + 16` tag plus a 42-byte header — 186, 218, 250 or 282 — which is also what this repository's own shape doc (`fingerprint/shapes/mod.rs`) says. The comment was the odd one out. Fixed in the vendored source and in `PATCH.diff` together, because the two have to agree for the patch to reproduce the tree. Same character count on the line, so no hunk offset shifts. The codec is untouched.
This commit is contained in:
parent
8d37fdf964
commit
e7794dbd10
2 changed files with 2 additions and 2 deletions
2
vendor/rustls/PATCH.diff
vendored
2
vendor/rustls/PATCH.diff
vendored
|
|
@ -144,7 +144,7 @@ diff -ruN --strip-trailing-cr -x .cargo-ok -x .cargo_vcs_info.json -x Cargo.lock
|
|||
+ // encoding's final padding step lands on — picks one at random and appends the AEAD tag.
|
||||
+ // See `setup_ech_grease()` in BoringSSL's `ssl/encrypted_client_hello.cc`, whose comment
|
||||
+ // names the extensions an inner hello carries. The measured result is an ECH extension
|
||||
+ // body of 185 to 281 bytes; the encoding of this client's own inner hello is 446, a
|
||||
+ // body of 186 to 282 bytes; the encoding of this client's own inner hello is 446, a
|
||||
+ // length no browser produces, which is a stable identifier of this build.
|
||||
+ let estimated_inner_hello_len =
|
||||
+ 32 * (4 + usize::from(crate::rand::random_u16(secure_random)? % 4));
|
||||
|
|
|
|||
2
vendor/rustls/src/client/ech.rs
vendored
2
vendor/rustls/src/client/ech.rs
vendored
|
|
@ -256,7 +256,7 @@ impl EchGreaseConfig {
|
|||
// encoding's final padding step lands on — picks one at random and appends the AEAD tag.
|
||||
// See `setup_ech_grease()` in BoringSSL's `ssl/encrypted_client_hello.cc`, whose comment
|
||||
// names the extensions an inner hello carries. The measured result is an ECH extension
|
||||
// body of 185 to 281 bytes; the encoding of this client's own inner hello is 446, a
|
||||
// body of 186 to 282 bytes; the encoding of this client's own inner hello is 446, a
|
||||
// length no browser produces, which is a stable identifier of this build.
|
||||
let estimated_inner_hello_len =
|
||||
32 * (4 + usize::from(crate::rand::random_u16(secure_random)? % 4));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue