Skip to content

ech: implement inner hello extension compression#2001

Merged
cpu merged 5 commits into
rustls:mainfrom
cpu:cpu-client-ech-compress-exts-rebase
Jun 13, 2024
Merged

ech: implement inner hello extension compression#2001
cpu merged 5 commits into
rustls:mainfrom
cpu:cpu-client-ech-compress-exts-rebase

Conversation

@cpu

@cpu cpu commented Jun 12, 2024

Copy link
Copy Markdown
Member

This commit extends the initial client-side ECH support from #1718 to enable the "SHOULD" recommendation of compressing extensions that are identical between the outer client hello and the inner client hello. This optimization reduces the overhead of ECH, shrinking the total client hello size.

Achieving this is a bit tricky (which is why it was done separately at the end!). To-be-compressed extensions must be in a contiguous block in the inner hello. When we encode that contiguous block for the encoded inner hello, we replace the block with a marker extension listing all of the extension types that were replaced. In the outer hello the compressed extensions must be present in the same relative order (but don't need to be contiguous). We also need the uncompressed inner hello with the uncompressed extensions in place to update the inner transcript.

With this feature implemented we can also activate a couple of bogo tests that were previously excluded.

@codecov

codecov Bot commented Jun 12, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 99.23077% with 1 line in your changes missing coverage. Please review.

Project coverage is 94.18%. Comparing base (f604642) to head (3271e01).

Files Patch % Lines
rustls/src/msgs/handshake.rs 98.21% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2001      +/-   ##
==========================================
+ Coverage   94.17%   94.18%   +0.01%     
==========================================
  Files          97       97              
  Lines       21566    21640      +74     
==========================================
+ Hits        20309    20382      +73     
- Misses       1257     1258       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cpu
cpu force-pushed the cpu-client-ech-compress-exts-rebase branch from 5fead9d to 3ccbdcf Compare June 12, 2024 14:57

@djc djc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Comment thread rustls/src/msgs/enums.rs
Comment thread rustls/src/msgs/handshake.rs Outdated
@rustls-benchmarking

rustls-benchmarking Bot commented Jun 13, 2024

Copy link
Copy Markdown

Benchmark results

Instruction counts

Significant differences

⚠️ There are significant instruction count differences

Click to expand
Scenario Baseline Candidate Diff Threshold
handshake_tickets_aws_lc_rs_1.2_rsa_aes_client 4329364 4317133 -12231 (-0.28%) 0.20%
handshake_tickets_ring_1.2_rsa_aes_client 4536701 4524958 -11743 (-0.26%) 0.20%
handshake_session_id_ring_1.2_rsa_aes_client 4266103 4255408 -10695 (-0.25%) 0.20%
handshake_session_id_aws_lc_rs_1.2_rsa_aes_client 4000312 3990306 -10006 (-0.25%) 0.20%

Other differences

Click to expand
Scenario Baseline Candidate Diff Threshold
handshake_tickets_aws_lc_rs_1.2_rsa_aes_server 4442915 4343178 -99737 (-2.24%) 3.21%
handshake_session_id_aws_lc_rs_1.2_rsa_aes_server 3949894 3895404 -54490 (-1.38%) 6.26%
handshake_no_resume_aws_lc_rs_1.3_rsa_chacha_server 13836744 13739193 -97551 (-0.71%) 0.77%
handshake_no_resume_aws_lc_rs_1.3_ecdsap384_chacha_client 8688531 8723216 34685 (0.40%) 1.04%
handshake_tickets_aws_lc_rs_1.3_rsa_chacha_server 33084362 33189234 104872 (0.32%) 0.50%
handshake_tickets_aws_lc_rs_1.3_ecdsap384_chacha_client 30865581 30769426 -96155 (-0.31%) 0.42%
handshake_no_resume_aws_lc_rs_1.3_rsa_aes_server 13778469 13812992 34523 (0.25%) 1.10%
handshake_no_resume_aws_lc_rs_1.2_rsa_aes_server 13391000 13417744 26744 (0.20%) 0.93%
handshake_session_id_aws_lc_rs_1.3_ecdsap384_aes_client 30656437 30600254 -56183 (-0.18%) 0.37%
handshake_session_id_aws_lc_rs_1.3_rsa_aes_server 32947072 32891057 -56015 (-0.17%) 0.35%
handshake_tickets_aws_lc_rs_1.3_rsa_aes_server 33190259 33139008 -51251 (-0.15%) 0.62%
handshake_session_id_aws_lc_rs_1.3_rsa_chacha_server 32878113 32926409 48296 (0.15%) 0.57%
handshake_session_id_aws_lc_rs_1.3_ecdsap384_chacha_client 30662160 30618006 -44154 (-0.14%) 0.34%
handshake_no_resume_aws_lc_rs_1.3_ecdsap384_aes_client 8731192 8742191 10999 (0.13%) 0.83%
handshake_session_id_aws_lc_rs_1.3_ecdsap256_aes_client 30665124 30640023 -25101 (-0.08%) 0.20%
handshake_no_resume_aws_lc_rs_1.3_ecdsap256_aes_client 3379390 3382077 2687 (0.08%) 0.24%
transfer_no_resume_aws_lc_rs_1.3_rsa_chacha_server 80582503 80638156 55653 (0.07%) 0.20%
transfer_no_resume_aws_lc_rs_1.2_rsa_aes_server 46399537 46367941 -31596 (-0.07%) 0.42%
handshake_session_id_ring_1.3_ecdsap256_aes_client 41905503 41878308 -27195 (-0.06%) 0.20%
handshake_tickets_ring_1.3_ecdsap384_aes_client 42089613 42063668 -25945 (-0.06%) 0.20%
handshake_session_id_ring_1.3_ecdsap384_aes_client 41900334 41874692 -25642 (-0.06%) 0.20%
transfer_no_resume_ring_1.3_ecdsap384_aes_client 58351128 58315493 -35635 (-0.06%) 0.20%
transfer_no_resume_ring_1.3_rsa_aes_client 58354532 58319014 -35518 (-0.06%) 0.20%
handshake_tickets_ring_1.3_rsa_chacha_client 42038941 42013584 -25357 (-0.06%) 0.20%
transfer_no_resume_ring_1.3_ecdsap256_aes_client 58353313 58318230 -35083 (-0.06%) 0.20%
handshake_tickets_ring_1.3_rsa_aes_client 42107145 42081945 -25200 (-0.06%) 0.20%
handshake_session_id_ring_1.3_rsa_chacha_client 41838236 41813277 -24959 (-0.06%) 0.20%
handshake_session_id_ring_1.3_ecdsap384_chacha_client 41819905 41795087 -24818 (-0.06%) 0.20%
handshake_tickets_ring_1.3_ecdsap384_chacha_client 42020101 41995225 -24876 (-0.06%) 0.20%
handshake_session_id_ring_1.3_rsa_aes_client 41918242 41893899 -24343 (-0.06%) 0.20%
handshake_tickets_ring_1.3_ecdsap256_aes_client 42091203 42067017 -24186 (-0.06%) 0.20%
handshake_session_id_aws_lc_rs_1.3_ecdsap256_chacha_client 30637174 30619710 -17464 (-0.06%) 0.20%
handshake_session_id_ring_1.3_ecdsap256_chacha_client 41826815 41803026 -23789 (-0.06%) 0.20%
handshake_session_id_aws_lc_rs_1.3_rsa_aes_client 30674998 30657794 -17204 (-0.06%) 0.20%
handshake_tickets_aws_lc_rs_1.3_ecdsap256_aes_client 30862716 30845800 -16916 (-0.05%) 0.20%
handshake_tickets_aws_lc_rs_1.3_ecdsap256_chacha_client 30839042 30822277 -16765 (-0.05%) 0.20%
handshake_session_id_aws_lc_rs_1.3_rsa_chacha_client 30650101 30633577 -16524 (-0.05%) 0.20%
transfer_no_resume_aws_lc_rs_1.3_ecdsap384_chacha_client 92749345 92700079 -49266 (-0.05%) 0.20%
transfer_no_resume_ring_1.2_rsa_aes_client 58228253 58198098 -30155 (-0.05%) 0.20%
handshake_tickets_aws_lc_rs_1.3_rsa_aes_client 30879141 30863211 -15930 (-0.05%) 0.20%
handshake_no_resume_ring_1.3_ecdsap256_chacha_client 3915777 3917671 1894 (0.05%) 0.43%
handshake_tickets_aws_lc_rs_1.3_rsa_chacha_client 30855270 30840446 -14824 (-0.05%) 0.20%
handshake_tickets_ring_1.3_ecdsap256_chacha_client 42020203 42000025 -20178 (-0.05%) 0.20%
transfer_no_resume_aws_lc_rs_1.3_rsa_aes_server 46409101 46431227 22126 (0.05%) 0.44%
transfer_no_resume_ring_1.3_ecdsap256_chacha_client 92688443 92648964 -39479 (-0.04%) 0.20%
transfer_no_resume_ring_1.3_ecdsap384_chacha_client 92683773 92647804 -35969 (-0.04%) 0.20%
handshake_session_id_ring_1.2_rsa_aes_server 4248139 4246506 -1633 (-0.04%) 0.20%
transfer_no_resume_aws_lc_rs_1.2_rsa_aes_client 68686429 68660374 -26055 (-0.04%) 0.20%
transfer_no_resume_ring_1.3_rsa_chacha_client 92687177 92653391 -33786 (-0.04%) 0.20%
transfer_no_resume_aws_lc_rs_1.3_ecdsap256_aes_client 58271699 58257917 -13782 (-0.02%) 0.20%
handshake_no_resume_aws_lc_rs_1.3_ecdsap256_chacha_server 1914558 1914864 306 (0.02%) 0.20%
transfer_no_resume_aws_lc_rs_1.3_ecdsap384_aes_client 58268036 58258943 -9093 (-0.02%) 0.20%
transfer_no_resume_aws_lc_rs_1.3_rsa_aes_client 58271835 58262823 -9012 (-0.02%) 0.20%
handshake_no_resume_aws_lc_rs_1.3_ecdsap256_chacha_client 3384020 3384492 472 (0.01%) 0.27%
handshake_no_resume_aws_lc_rs_1.2_rsa_aes_client 2016367 2016093 -274 (-0.01%) 0.20%
handshake_no_resume_ring_1.3_rsa_chacha_client 2956667 2956276 -391 (-0.01%) 0.20%
handshake_no_resume_aws_lc_rs_1.3_rsa_chacha_client 2233869 2233609 -260 (-0.01%) 0.20%
handshake_tickets_aws_lc_rs_1.3_ecdsap384_aes_client 30838266 30841816 3550 (0.01%) 0.42%
transfer_no_resume_aws_lc_rs_1.3_ecdsap256_chacha_client 92727716 92717136 -10580 (-0.01%) 0.20%
handshake_no_resume_aws_lc_rs_1.3_ecdsap384_aes_server 4288171 4288567 396 (0.01%) 0.20%
transfer_no_resume_aws_lc_rs_1.3_rsa_chacha_client 92728851 92720335 -8516 (-0.01%) 0.20%
handshake_session_id_ring_1.3_ecdsap256_chacha_server 43349847 43353708 3861 (0.01%) 0.20%
handshake_no_resume_aws_lc_rs_1.3_ecdsap256_aes_server 1911586 1911431 -155 (-0.01%) 0.20%
handshake_tickets_aws_lc_rs_1.3_ecdsap384_chacha_server 33177503 33179804 2301 (0.01%) 0.20%
handshake_session_id_aws_lc_rs_1.3_ecdsap256_aes_server 32941295 32943458 2163 (0.01%) 0.20%
handshake_tickets_aws_lc_rs_1.3_ecdsap256_aes_server 33201742 33203841 2099 (0.01%) 0.20%
handshake_tickets_ring_1.2_rsa_aes_server 4681318 4681037 -281 (-0.01%) 0.20%
handshake_tickets_aws_lc_rs_1.3_ecdsap256_chacha_server 33177411 33179345 1934 (0.01%) 0.20%
handshake_session_id_aws_lc_rs_1.3_ecdsap384_chacha_server 32899122 32900739 1617 (0.00%) 0.20%
handshake_no_resume_aws_lc_rs_1.3_rsa_aes_client 2226625 2226725 100 (0.00%) 0.20%
handshake_no_resume_ring_1.3_ecdsap256_chacha_server 2133337 2133256 -81 (-0.00%) 0.77%
handshake_tickets_ring_1.3_rsa_chacha_server 43653263 43654853 1590 (0.00%) 0.20%
handshake_no_resume_ring_1.3_ecdsap256_aes_client 3916058 3915924 -134 (-0.00%) 0.46%
handshake_no_resume_ring_1.3_ecdsap256_aes_server 2130632 2130696 64 (0.00%) 0.83%
handshake_no_resume_ring_1.2_rsa_aes_client 2853386 2853303 -83 (-0.00%) 0.20%
handshake_session_id_ring_1.3_ecdsap256_aes_server 43451216 43450000 -1216 (-0.00%) 0.20%
handshake_session_id_aws_lc_rs_1.3_ecdsap384_aes_server 32940305 32941226 921 (0.00%) 0.20%
handshake_session_id_ring_1.3_ecdsap384_aes_server 43450779 43449594 -1185 (-0.00%) 0.20%
transfer_no_resume_aws_lc_rs_1.3_ecdsap256_aes_server 46432873 46434041 1168 (0.00%) 0.20%
handshake_no_resume_ring_1.3_ecdsap384_aes_server 13738910 13739212 302 (0.00%) 0.20%
transfer_no_resume_aws_lc_rs_1.3_ecdsap384_aes_server 46431695 46432619 924 (0.00%) 0.20%
handshake_tickets_ring_1.3_ecdsap256_chacha_server 43656193 43656935 742 (0.00%) 0.20%
handshake_no_resume_ring_1.3_rsa_chacha_server 12183026 12182829 -197 (-0.00%) 0.20%
transfer_no_resume_aws_lc_rs_1.3_ecdsap256_chacha_server 80612180 80613349 1169 (0.00%) 0.20%
handshake_tickets_aws_lc_rs_1.3_ecdsap384_aes_server 33202358 33202815 457 (0.00%) 0.20%
handshake_tickets_ring_1.3_ecdsap384_chacha_server 43656392 43656930 538 (0.00%) 0.20%
transfer_no_resume_aws_lc_rs_1.3_ecdsap384_chacha_server 80611239 80612133 894 (0.00%) 0.20%
handshake_no_resume_aws_lc_rs_1.3_ecdsap384_chacha_server 4291503 4291547 44 (0.00%) 0.20%
handshake_no_resume_ring_1.3_ecdsap384_chacha_client 35475542 35475204 -338 (-0.00%) 0.20%
handshake_session_id_ring_1.3_rsa_chacha_server 43346694 43347078 384 (0.00%) 0.20%
transfer_no_resume_ring_1.3_rsa_aes_server 46451372 46450987 -385 (-0.00%) 0.20%
handshake_no_resume_ring_1.2_rsa_aes_server 11988493 11988398 -95 (-0.00%) 0.20%
handshake_no_resume_ring_1.3_rsa_aes_server 12176805 12176896 91 (0.00%) 0.20%
handshake_session_id_ring_1.3_rsa_aes_server 43447701 43447408 -293 (-0.00%) 0.20%
handshake_no_resume_ring_1.3_ecdsap384_aes_client 35473034 35473255 221 (0.00%) 0.20%
handshake_no_resume_ring_1.3_rsa_aes_client 2950599 2950583 -16 (-0.00%) 0.20%
handshake_session_id_ring_1.3_ecdsap384_chacha_server 43349363 43349135 -228 (-0.00%) 0.20%
transfer_no_resume_ring_1.3_ecdsap256_aes_server 46439390 46439147 -243 (-0.00%) 0.20%
handshake_tickets_ring_1.3_ecdsap384_aes_server 43731692 43731883 191 (0.00%) 0.20%
transfer_no_resume_ring_1.3_ecdsap384_chacha_server 80511269 80510926 -343 (-0.00%) 0.20%
handshake_tickets_ring_1.3_ecdsap256_aes_server 43732554 43732372 -182 (-0.00%) 0.20%
handshake_session_id_aws_lc_rs_1.3_ecdsap256_chacha_server 32900745 32900864 119 (0.00%) 0.20%
transfer_no_resume_ring_1.3_ecdsap384_aes_server 46442696 46442579 -117 (-0.00%) 0.20%
transfer_no_resume_ring_1.3_rsa_chacha_server 80519670 80519566 -104 (-0.00%) 0.20%
handshake_no_resume_ring_1.3_ecdsap384_chacha_server 13741132 13741145 13 (0.00%) 0.20%
transfer_no_resume_ring_1.3_ecdsap256_chacha_server 80507355 80507284 -71 (-0.00%) 0.20%
handshake_tickets_ring_1.3_rsa_aes_server 43729032 43729063 31 (0.00%) 0.20%
transfer_no_resume_ring_1.2_rsa_aes_server 46356906 46356879 -27 (-0.00%) 0.20%

Wall-time

Significant differences

There are no significant wall-time differences

Other differences

Click to expand
Scenario Baseline Candidate Diff Threshold
handshake_no_resume_aws_lc_rs_1.3_rsa_chacha 1.43 ms 1.41 ms -0.02 ms (-1.28%) 3.64%
handshake_no_resume_aws_lc_rs_1.2_rsa_aes 1.38 ms 1.36 ms -0.02 ms (-1.23%) 3.39%
handshake_no_resume_aws_lc_rs_1.3_rsa_aes 1.44 ms 1.42 ms -0.01 ms (-0.98%) 4.02%
transfer_no_resume_aws_lc_rs_1.2_rsa_aes 5.46 ms 5.41 ms -0.05 ms (-0.93%) 4.43%
transfer_no_resume_aws_lc_rs_1.3_ecdsap256_aes 4.51 ms 4.46 ms -0.04 ms (-0.92%) 5.87%
transfer_no_resume_aws_lc_rs_1.3_rsa_aes 5.46 ms 5.41 ms -0.05 ms (-0.84%) 4.56%
transfer_no_resume_aws_lc_rs_1.3_ecdsap384_aes 5.22 ms 5.18 ms -0.04 ms (-0.79%) 4.88%
transfer_no_resume_ring_1.3_ecdsap256_aes 6.34 ms 6.30 ms -0.05 ms (-0.78%) 3.69%
transfer_no_resume_ring_1.3_rsa_aes 6.82 ms 6.78 ms -0.04 ms (-0.65%) 3.54%
transfer_no_resume_ring_1.2_rsa_aes 6.74 ms 6.70 ms -0.04 ms (-0.62%) 3.03%
transfer_no_resume_aws_lc_rs_1.3_rsa_chacha 13.96 ms 13.88 ms -0.08 ms (-0.58%) 1.82%
handshake_tickets_ring_1.2_rsa_aes 1.64 ms 1.63 ms -0.01 ms (-0.57%) 1.28%
transfer_no_resume_aws_lc_rs_1.3_ecdsap256_chacha 13.01 ms 12.93 ms -0.07 ms (-0.56%) 2.24%
handshake_session_id_ring_1.2_rsa_aes 1.56 ms 1.55 ms -0.01 ms (-0.56%) 1.00%
handshake_session_id_aws_lc_rs_1.2_rsa_aes 2.08 ms 2.07 ms -0.01 ms (-0.53%) 3.44%
transfer_no_resume_aws_lc_rs_1.3_ecdsap384_chacha 13.72 ms 13.64 ms -0.07 ms (-0.52%) 1.91%
transfer_no_resume_ring_1.3_ecdsap384_aes 9.44 ms 9.39 ms -0.05 ms (-0.51%) 2.72%
handshake_tickets_aws_lc_rs_1.2_rsa_aes 2.24 ms 2.23 ms -0.01 ms (-0.48%) 2.56%
transfer_no_resume_ring_1.3_ecdsap256_chacha 12.99 ms 12.94 ms -0.05 ms (-0.39%) 1.81%
handshake_no_resume_aws_lc_rs_1.3_ecdsap256_chacha 477.88 µs 476.27 µs -1.61 µs (-0.34%) 2.91%
handshake_tickets_aws_lc_rs_1.3_ecdsap384_aes 6.08 ms 6.10 ms 0.02 ms (0.30%) 2.12%
handshake_session_id_aws_lc_rs_1.3_ecdsap384_aes 6.07 ms 6.08 ms 0.02 ms (0.28%) 1.99%
transfer_no_resume_ring_1.3_ecdsap384_chacha 16.07 ms 16.03 ms -0.04 ms (-0.27%) 1.52%
transfer_no_resume_ring_1.3_rsa_chacha 13.46 ms 13.43 ms -0.03 ms (-0.25%) 1.83%
handshake_session_id_aws_lc_rs_1.3_ecdsap256_aes 5.35 ms 5.37 ms 0.01 ms (0.25%) 2.43%
handshake_tickets_aws_lc_rs_1.3_ecdsap256_aes 5.38 ms 5.39 ms 0.01 ms (0.21%) 2.41%
handshake_no_resume_aws_lc_rs_1.3_ecdsap256_aes 478.50 µs 477.53 µs -0.97 µs (-0.20%) 2.30%
handshake_tickets_aws_lc_rs_1.3_ecdsap384_chacha 6.08 ms 6.09 ms 0.01 ms (0.17%) 1.93%
handshake_no_resume_aws_lc_rs_1.3_ecdsap384_chacha 1.18 ms 1.18 ms -0.00 ms (-0.16%) 1.28%
handshake_session_id_aws_lc_rs_1.3_rsa_chacha 6.31 ms 6.30 ms -0.01 ms (-0.15%) 1.87%
handshake_tickets_ring_1.3_ecdsap256_chacha 6.73 ms 6.74 ms 0.01 ms (0.13%) 1.00%
handshake_no_resume_ring_1.3_rsa_chacha 988.15 µs 987.01 µs -1.14 µs (-0.12%) 1.03%
handshake_no_resume_ring_1.3_ecdsap256_chacha 503.37 µs 502.80 µs -0.57 µs (-0.11%) 2.34%
handshake_tickets_aws_lc_rs_1.3_rsa_chacha 6.35 ms 6.34 ms -0.01 ms (-0.11%) 1.84%
handshake_session_id_ring_1.3_ecdsap256_aes 6.75 ms 6.75 ms 0.01 ms (0.10%) 1.00%
handshake_tickets_ring_1.3_rsa_chacha 7.22 ms 7.22 ms 0.01 ms (0.10%) 1.00%
handshake_no_resume_ring_1.2_rsa_aes 976.98 µs 976.06 µs -0.91 µs (-0.09%) 1.00%
handshake_session_id_aws_lc_rs_1.3_ecdsap384_chacha 6.04 ms 6.04 ms 0.01 ms (0.09%) 1.76%
handshake_session_id_ring_1.3_ecdsap384_chacha 9.80 ms 9.80 ms 0.01 ms (0.09%) 1.00%
handshake_session_id_ring_1.3_rsa_chacha 7.20 ms 7.20 ms 0.01 ms (0.08%) 1.00%
handshake_session_id_ring_1.3_ecdsap256_chacha 6.71 ms 6.71 ms 0.01 ms (0.08%) 1.00%
handshake_session_id_aws_lc_rs_1.3_ecdsap256_chacha 5.34 ms 5.35 ms 0.00 ms (0.07%) 1.71%
handshake_tickets_ring_1.3_ecdsap384_chacha 9.82 ms 9.83 ms 0.01 ms (0.07%) 1.00%
handshake_no_resume_aws_lc_rs_1.3_ecdsap384_aes 1.19 ms 1.19 ms -0.00 ms (-0.07%) 1.00%
handshake_tickets_aws_lc_rs_1.3_rsa_aes 6.35 ms 6.34 ms -0.00 ms (-0.06%) 1.81%
handshake_tickets_aws_lc_rs_1.3_ecdsap256_chacha 5.38 ms 5.38 ms 0.00 ms (0.06%) 2.19%
handshake_tickets_ring_1.3_ecdsap384_aes 9.87 ms 9.88 ms 0.01 ms (0.06%) 1.00%
handshake_no_resume_ring_1.3_rsa_aes 986.57 µs 987.10 µs 0.53 µs (0.05%) 1.00%
handshake_session_id_ring_1.3_ecdsap384_aes 9.84 ms 9.84 ms 0.00 ms (0.05%) 1.00%
handshake_session_id_ring_1.3_rsa_aes 7.25 ms 7.25 ms 0.00 ms (0.04%) 1.00%
handshake_no_resume_ring_1.3_ecdsap256_aes 505.96 µs 505.78 µs -0.18 µs (-0.04%) 2.61%
handshake_no_resume_ring_1.3_ecdsap384_aes 3.60 ms 3.60 ms -0.00 ms (-0.02%) 1.00%
handshake_tickets_ring_1.3_ecdsap256_aes 6.79 ms 6.79 ms 0.00 ms (0.02%) 1.00%
handshake_tickets_ring_1.3_rsa_aes 7.27 ms 7.27 ms 0.00 ms (0.02%) 1.00%
handshake_session_id_aws_lc_rs_1.3_rsa_aes 6.33 ms 6.34 ms 0.00 ms (0.01%) 2.07%
handshake_no_resume_ring_1.3_ecdsap384_chacha 3.60 ms 3.60 ms -0.00 ms (-0.01%) 1.00%

Additional information

Historical results

Checkout details:

@ctz ctz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of things unrelated to this PR I noticed while reviewing:

The head comment in examples/src/bin/ech-client.rs has an example usage that wants to find ech-client in the rustls-provider-example crate; it has moved since.

It would be nice if cargo run --bin ech-client -- --help included an example usage.

Do we want to run ech-client in the connect-tests job?

cpu added 5 commits June 13, 2024 09:45
This commit extends the existing client-side ECH support to enable the
"SHOULD" recommendation of compressing extensions that are identical
between the outer client hello and the inner client hello. This
optimization reduces the overhead of ECH, shrinking the total client
hello size.

Achieving this is a bit tricky (which is why it was done separately at
the end!). To-be-compressed extensions must be in a contiguous block in
the inner hello. When we encode that contiguous block for the encoded
inner hello, we replace the block with a marker extension listing
all of the extension types that were replaced. In the outer hello the
compressed extensions must be present in the same relative order (but
don't need to be contiguous).

With this feature implemented we can also activate a couple of bogo
tests that were previously excluded.
Use `log::trace!` for writing the current & total number of requests being
made instead of a bare `println!`.
The ech-client was moved from the provider-example crate into the
examples crate, but the usage example in the header comment wasn't
updated.
Also 'grep' for the HTML output that's rendered when ECH was successful.
@cpu
cpu force-pushed the cpu-client-ech-compress-exts-rebase branch from 3ccbdcf to 3271e01 Compare June 13, 2024 13:46
@cpu

cpu commented Jun 13, 2024

Copy link
Copy Markdown
Member Author

The head comment in examples/src/bin/ech-client.rs has an example usage that wants to find ech-client in the rustls-provider-example crate; it has moved since.

Good catch, thanks. Fixed.

It would be nice if cargo run --bin ech-client -- --help included an example usage.

Done.

Do we want to run ech-client in the connect-tests job?

I added a test invocation of the ech-client example binary against the defo.ie test server, along with a grep for an expected successful ECH output fragment. I triggered the daily CI job manually on my branch and confirmed it was green (mod an unrelated flake w/ the unbuffered example on Windows).

@cpu
cpu enabled auto-merge June 13, 2024 13:53
@cpu
cpu added this pull request to the merge queue Jun 13, 2024
Merged via the queue into rustls:main with commit 29d8aaf Jun 13, 2024
@cpu
cpu deleted the cpu-client-ech-compress-exts-rebase branch June 13, 2024 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants