rustls icon indicating copy to clipboard operation
rustls copied to clipboard

[3/3] no-std support phase I

Open japaric opened this issue 1 year ago • 19 comments

this PR implements phase I of RFC #1399 . NOTE that this PR is built on top of PR #1583

originally phase I aimed to only allowing client functionality in no-std context but turns out that the changes were sufficient to also enable server functionality as evidenced in #1534

breaking changes: implementing the RFC requires no breaking changes

blockers:

  • [x] #1583

this PR is best reviewed on a commit by commit basis (do skip PR#1583 commits)

japaric avatar Sep 29 '23 15:09 japaric

Codecov Report

Attention: Patch coverage is 85.90164% with 129 lines in your changes are missing coverage. Please review.

Project coverage is 95.96%. Comparing base (a31c5da) to head (2444558).

Files Patch % Lines
rustls/src/quic.rs 61.32% 70 Missing :warning:
rustls/src/conn.rs 85.27% 19 Missing :warning:
rustls/src/server/server_conn.rs 88.99% 12 Missing :warning:
rustls/src/client/handy.rs 94.56% 5 Missing :warning:
rustls/src/server/handy.rs 95.65% 5 Missing :warning:
rustls/src/webpki/mod.rs 44.44% 5 Missing :warning:
rustls/src/error.rs 87.87% 4 Missing :warning:
rustls/src/msgs/deframer.rs 90.24% 4 Missing :warning:
rustls/src/client/tls12.rs 71.42% 2 Missing :warning:
rustls/src/common_state.rs 93.93% 2 Missing :warning:
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1502      +/-   ##
==========================================
- Coverage   95.97%   95.96%   -0.02%     
==========================================
  Files          85       86       +1     
  Lines       18727    18818      +91     
==========================================
+ Hits        17974    18059      +85     
- Misses        753      759       +6     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Sep 29 '23 15:09 codecov[bot]

  • pki_types::UnixTime will need to gain a constructor so that no_std users can implement the GetCurrentTime trait

I think this exists and is UnixTime::since_unix_epoch(core::time::Duration)

ctz avatar Sep 29 '23 15:09 ctz

I think this would be much easier to digest if it was split into smaller commits, for example:

  • One commit for importing Vec explicitly
  • One commit for TimeProvider
  • One commit for dealing with the cache
  • One commit for compiling out all the server stuff

djc avatar Oct 02 '23 08:10 djc

the PR has been split in commits to make it easier to review. all the "rm (..)" commits can be squashed at a later time. also, there are several warning that I haven't fixed and they involve cfg-ing away more code. for now, I have only removed what's need to make rustls compile with #![no_std]

japaric avatar Oct 05 '23 17:10 japaric

I think the rm * commits would actually be nice to keep, assuming each can pass cargo check on its own? Would make it a lot easier to review!

djc avatar Oct 06 '23 08:10 djc

I think the rm * commits would actually be nice to keep, assuming each can pass cargo check on its own?

I reordered the commits a bit and now only these contiguous commits:

  • add std feature
  • no-std: remove field from *Error::Other variants
  • no-std: add TimeProvider to ClientConfig
  • no-std: rm TicketSwitcher
  • no-std: add TimeProvider to ServerConfig

make cargo b --no-default-features fail. cargo b works on all the commits of this PR.


The first commit of this PR basically adds this to src/lib.rs

#![no_std]
extern crate std;

this switches the prelude from std::prelude to core::prelude and forces one to explicitly import anything that's not in core, that is mainly alloc API.

I think it would be worthwhile to land that change in a separate PR ahead of this one: it'll prevent relying on implicit alloc imports so all future PRs will have to include explicit alloc imports to avoid breaking the build. That would not only prevent this PR from bitrotting but I think it would help maintain no-std support long term. I'll submit that commit as a separate PR with a fleshed out rationale.

japaric avatar Oct 06 '23 12:10 japaric

I think it would be worthwhile to land that change in a separate PR ahead of this one

extracted that into PR #1524

japaric avatar Oct 06 '23 13:10 japaric

quick update: I have rebased this PR now that #1524 has been merged. I have also pushed a commit that makes cargo b --no-default-features --features ring work on Linux. however, I tried to build rustls with that set of features (-std +ring) for the x86_64-unknown-none target and it failed to compile.

turns out that ring has this sealed SecureRandom trait (note that there are two of them in the ring codebase; one is public and the other is not) that's implemented for SystemRandom but only for a known list of OSes. as "OS agnostic" targets like x86_64-unknown-none have os = "none" in their target specification, SystemRandom lacks the SecureRandom trait and that causes problems in the rustls codebase: RsaSigner, KxGroup, etc.

for more context: I'm building a small rustls no-std demo that only depends on libc bindings and should work on any OS that has POSIX layer as way to exercise this PR. I'm running the demo on Linux so I do have a "secure random" getrandom implementation but I can't signal that to ring. I'll explore using an alternative crypto provider as showcased in #1405.

japaric avatar Oct 12 '23 15:10 japaric

@japaric probably also good to open a ring issue to signal this there and see if there is a better solution there. (Please link the issue here if you do so.)

djc avatar Oct 13 '23 09:10 djc

@djc done. submitted briansmith/ring#1734

japaric avatar Oct 13 '23 10:10 japaric

rebased this on top of #1583 and marked it as ready for review

japaric avatar Nov 14 '23 16:11 japaric

rebased to fix merge conflicts.

thanks djc for the switch to pki_types::ServerName. that simplified a few things in this PR.

japaric avatar Nov 24 '23 16:11 japaric

rebased on top of https://github.com/rustls/rustls/pull/1583

pvdrz avatar Dec 05 '23 18:12 pvdrz

It's unclear to me how usable no_std rustls is after this PR.

As stated in the RFC, the unbuffered API from the client side should be usable (without support sessions)

Does this pass cargo check without warnings at every commit? What about cargo check --all-targets?

Yes, both cargo check and cargo check --all-targets pass.

The proliferation of std guards seems pretty ugly, it might be better if there was some grouping with inline modules.

I'll see what I can do.

pvdrz avatar Dec 21 '23 19:12 pvdrz

@djc I moved most of the std only items to inline modules or to gated impl blocks. The ones remaining weren't worth the change imho. Some of these changes will be reverted by https://github.com/rustls/rustls/pull/1688 so I don't think they will be a big deal and such adjustments can be done on that PR later

pvdrz avatar Dec 22 '23 01:12 pvdrz

@djc I moved most of the std only items to inline modules or to gated impl blocks. The ones remaining weren't worth the change imho. Some of these changes will be reverted by #1688 so I don't think they will be a big deal and such adjustments can be done on that PR later

Yup, this is much better, thanks for working on that!

djc avatar Dec 22 '23 10:12 djc

@ctz @djc I've rebased this branch on top of main and I think it's ready for review. This branch is mostly feature-gating things that are std-only and then adding a x86_64-unknown-none build to keep us from backsliding so it might be nice to land this soon so we don't accidentally trip into choices that will make things harder in the future.

Most of my changes were pretty boring (resolving conflicts, fixing some new clippy findings, etc). The one place worth an explicit note is that I had to do some fiddling in the first commit (ae1c3a5744e57db54890220835e18d6491171e1c) in order to get the no-std build working with the once_cell dependency that landed in-tree in e7a1b418527eceba639457dc2ad2dcb29078f612 between the time of the original work by Japaric et. al. and now.

The once_cell crate has a FAQ section titled "Does this crate support no_std?" where it offers two potential solutions. I went with the critical-section feature but I'm out of my depth here. It seems like there's some nuance with respect to the right way to handle this and while my choice seems to appease the x86_64-unknown-none target build in CI and on my local machine I'm not sure if it's truly the best approach. WDYT?

cpu avatar Feb 07 '24 19:02 cpu

Rebased on main

cpu avatar Feb 14 '24 15:02 cpu

The once_cell crate has a FAQ section titled "Does this crate support no_std?" where it offers two potential solutions. I went with the critical-section feature but I'm out of my depth here. It seems like there's some nuance with respect to the right way to handle this and while my choice seems to appease the x86_64-unknown-none target build in CI and on my local machine I'm not sure if it's truly the best approach. WDYT?

In my opinion, the dependency on critical-section is unnecessary, and using once_cell::race::OnceBox would suffice.

The only cost of OnceBox that would be relevant to its usage in Rustls is that it introduces another level of pointer indirection, but PROCESS_DEFAULT_PROVIDER isn't used in any performance-critical paths, so I don't see this as a problem.

Blocking (via std or critical-section) provides better semantics for the get_or_init family of functions, but Rustls does not use these.

nspin avatar Feb 15 '24 23:02 nspin

In my opinion, the dependency on critical-section is unnecessary, and using once_cell::race::OnceBox would suffice.

@nspin Thanks for your input, much appreciated :bow: I've switched over to using race and OnceBox in my last push alongside rebasing on main.

cpu avatar Feb 19 '24 16:02 cpu

Benchmark results

Instruction counts

Significant differences

There are no significant instruction count differences

Other differences

Click to expand
Scenario Baseline Candidate Diff Threshold
handshake_session_id_aws_lc_rs_1.2_rsa_aes_server 4027269 4117212 89943 (2.23%) 3.58%
handshake_tickets_aws_lc_rs_1.2_rsa_aes_server 4545399 4585356 39957 (0.88%) 2.56%
handshake_no_resume_aws_lc_rs_1.3_ecdsap384_chacha_client 8691533 8655265 -36268 (-0.42%) 0.68%
handshake_tickets_aws_lc_rs_1.2_rsa_aes_client 4501944 4520208 18264 (0.41%) 1.06%
handshake_no_resume_aws_lc_rs_1.3_rsa_aes_server 12676221 12631244 -44977 (-0.35%) 0.89%
handshake_session_id_ring_1.2_rsa_aes_client 4426204 4438016 11812 (0.27%) 0.85%
handshake_session_id_aws_lc_rs_1.3_ecdsap384_chacha_client 30216510 30288048 71538 (0.24%) 0.36%
handshake_no_resume_aws_lc_rs_1.3_ecdsap384_aes_client 8647786 8665845 18059 (0.21%) 0.99%
handshake_tickets_aws_lc_rs_1.3_ecdsap384_aes_client 30464928 30411743 -53185 (-0.17%) 0.54%
handshake_tickets_aws_lc_rs_1.3_rsa_chacha_server 32675582 32730666 55084 (0.17%) 0.91%
handshake_session_id_aws_lc_rs_1.3_ecdsap256_aes_client 30233789 30278749 44960 (0.15%) 0.20%
handshake_session_id_aws_lc_rs_1.2_rsa_aes_client 4174870 4181011 6141 (0.15%) 0.91%
handshake_session_id_aws_lc_rs_1.3_rsa_aes_server 32511475 32557899 46424 (0.14%) 0.52%
transfer_no_resume_aws_lc_rs_1.3_rsa_aes_server 46268043 46329505 61462 (0.13%) 0.32%
handshake_session_id_aws_lc_rs_1.3_rsa_chacha_server 32497876 32456434 -41442 (-0.13%) 0.45%
handshake_session_id_ring_1.2_rsa_aes_server 4330759 4335556 4797 (0.11%) 0.52%
handshake_no_resume_aws_lc_rs_1.3_rsa_chacha_server 12685494 12672377 -13117 (-0.10%) 0.93%
handshake_tickets_aws_lc_rs_1.3_rsa_chacha_client 30613772 30642089 28317 (0.09%) 0.23%
handshake_tickets_aws_lc_rs_1.3_ecdsap256_chacha_server 32673919 32644406 -29513 (-0.09%) 0.29%
handshake_session_id_aws_lc_rs_1.3_ecdsap384_aes_server 32463992 32491189 27197 (0.08%) 0.20%
handshake_tickets_aws_lc_rs_1.3_ecdsap384_chacha_client 30403267 30428262 24995 (0.08%) 0.27%
handshake_no_resume_aws_lc_rs_1.3_ecdsap256_chacha_client 3343060 3345572 2512 (0.08%) 0.24%
handshake_session_id_ring_1.3_ecdsap384_aes_client 41963152 41993689 30537 (0.07%) 0.20%
handshake_tickets_ring_1.3_rsa_aes_server 43780059 43811735 31676 (0.07%) 0.20%
handshake_tickets_ring_1.3_ecdsap256_chacha_server 43672169 43703468 31299 (0.07%) 0.20%
handshake_no_resume_aws_lc_rs_1.2_rsa_aes_server 12259158 12250528 -8630 (-0.07%) 1.10%
handshake_session_id_ring_1.3_ecdsap384_chacha_server 43426597 43456428 29831 (0.07%) 0.20%
handshake_tickets_aws_lc_rs_1.3_ecdsap256_aes_client 30412674 30433252 20578 (0.07%) 0.27%
handshake_session_id_aws_lc_rs_1.3_ecdsap256_chacha_client 30261716 30241630 -20086 (-0.07%) 0.22%
handshake_session_id_aws_lc_rs_1.3_ecdsap256_aes_server 32469147 32490620 21473 (0.07%) 0.20%
handshake_no_resume_ring_1.3_ecdsap256_aes_client 3892919 3895468 2549 (0.07%) 0.20%
transfer_no_resume_aws_lc_rs_1.2_rsa_aes_client 68431989 68388016 -43973 (-0.06%) 0.20%
handshake_tickets_ring_1.3_ecdsap384_aes_server 43721276 43746787 25511 (0.06%) 0.24%
handshake_tickets_aws_lc_rs_1.3_ecdsap384_aes_server 32652677 32670465 17788 (0.05%) 0.25%
handshake_session_id_aws_lc_rs_1.3_ecdsap384_aes_client 30269681 30253467 -16214 (-0.05%) 0.48%
handshake_no_resume_ring_1.3_ecdsap256_chacha_server 2128235 2127102 -1133 (-0.05%) 0.31%
handshake_session_id_aws_lc_rs_1.3_rsa_aes_client 30463625 30479686 16061 (0.05%) 0.20%
handshake_tickets_ring_1.2_rsa_aes_client 4706698 4704407 -2291 (-0.05%) 0.85%
transfer_no_resume_aws_lc_rs_1.3_ecdsap384_aes_client 57958538 57986548 28010 (0.05%) 0.23%
handshake_no_resume_aws_lc_rs_1.3_ecdsap256_chacha_server 1882716 1883556 840 (0.04%) 0.20%
handshake_tickets_aws_lc_rs_1.3_ecdsap384_chacha_server 32622054 32636294 14240 (0.04%) 0.42%
handshake_session_id_ring_1.3_rsa_chacha_client 42076162 42094419 18257 (0.04%) 0.20%
handshake_tickets_ring_1.3_ecdsap256_aes_server 43734288 43752369 18081 (0.04%) 0.32%
handshake_tickets_ring_1.3_rsa_chacha_client 42287492 42304938 17446 (0.04%) 0.20%
handshake_no_resume_aws_lc_rs_1.3_ecdsap256_aes_client 3340592 3341964 1372 (0.04%) 0.20%
handshake_session_id_ring_1.3_ecdsap384_chacha_client 41892286 41909467 17181 (0.04%) 0.20%
handshake_session_id_ring_1.3_ecdsap256_aes_client 41970860 41987796 16936 (0.04%) 0.20%
handshake_no_resume_ring_1.3_ecdsap256_aes_server 2124115 2124953 838 (0.04%) 0.24%
transfer_no_resume_aws_lc_rs_1.3_rsa_chacha_server 80446755 80476300 29545 (0.04%) 0.20%
transfer_no_resume_ring_1.2_rsa_aes_server 46193830 46177614 -16216 (-0.04%) 0.20%
handshake_session_id_ring_1.3_rsa_aes_server 43535576 43550436 14860 (0.03%) 0.20%
handshake_no_resume_ring_1.3_ecdsap256_chacha_client 3898688 3897377 -1311 (-0.03%) 0.28%
handshake_session_id_aws_lc_rs_1.3_ecdsap384_chacha_server 32446335 32457233 10898 (0.03%) 0.31%
handshake_tickets_ring_1.2_rsa_aes_server 4775960 4777548 1588 (0.03%) 0.62%
handshake_no_resume_aws_lc_rs_1.2_rsa_aes_client 3151033 3152049 1016 (0.03%) 0.20%
transfer_no_resume_aws_lc_rs_1.3_ecdsap384_chacha_client 92415445 92445024 29579 (0.03%) 0.20%
handshake_session_id_ring_1.3_rsa_aes_client 42162853 42175693 12840 (0.03%) 0.20%
handshake_tickets_ring_1.3_ecdsap256_chacha_client 42081019 42093362 12343 (0.03%) 0.20%
handshake_tickets_aws_lc_rs_1.3_ecdsap256_chacha_client 30404357 30413165 8808 (0.03%) 0.37%
handshake_session_id_ring_1.3_ecdsap256_aes_server 43539221 43551475 12254 (0.03%) 0.20%
handshake_tickets_ring_1.3_rsa_chacha_server 43705312 43717096 11784 (0.03%) 0.20%
handshake_tickets_ring_1.3_ecdsap384_chacha_client 42070871 42081292 10421 (0.02%) 0.20%
handshake_session_id_aws_lc_rs_1.3_ecdsap256_chacha_server 32464334 32456470 -7864 (-0.02%) 0.30%
transfer_no_resume_ring_1.3_ecdsap256_aes_server 46266995 46278068 11073 (0.02%) 0.26%
handshake_no_resume_aws_lc_rs_1.3_ecdsap256_aes_server 1879248 1879687 439 (0.02%) 0.20%
handshake_tickets_ring_1.3_ecdsap384_chacha_server 43653774 43663792 10018 (0.02%) 0.20%
handshake_tickets_ring_1.3_ecdsap384_aes_client 42139409 42148769 9360 (0.02%) 0.20%
transfer_no_resume_aws_lc_rs_1.3_ecdsap256_aes_server 46253896 46263830 9934 (0.02%) 0.27%
handshake_session_id_ring_1.3_rsa_chacha_server 43440804 43449756 8952 (0.02%) 0.20%
transfer_no_resume_aws_lc_rs_1.3_ecdsap384_aes_server 46253980 46263418 9438 (0.02%) 0.20%
transfer_no_resume_ring_1.3_ecdsap384_aes_server 46263104 46272211 9107 (0.02%) 0.20%
handshake_session_id_aws_lc_rs_1.3_rsa_chacha_client 30425559 30431515 5956 (0.02%) 0.21%
handshake_no_resume_ring_1.3_rsa_aes_client 4537392 4538234 842 (0.02%) 0.20%
handshake_no_resume_aws_lc_rs_1.3_ecdsap384_aes_server 4257553 4258338 785 (0.02%) 0.20%
handshake_tickets_ring_1.3_rsa_aes_client 42360622 42367921 7299 (0.02%) 0.20%
handshake_session_id_ring_1.3_ecdsap256_chacha_client 41884728 41891706 6978 (0.02%) 0.20%
handshake_no_resume_ring_1.2_rsa_aes_client 4439842 4440568 726 (0.02%) 0.20%
handshake_no_resume_aws_lc_rs_1.3_ecdsap384_chacha_server 4261931 4262517 586 (0.01%) 0.20%
handshake_session_id_ring_1.3_ecdsap384_aes_server 43556654 43551109 -5545 (-0.01%) 0.20%
transfer_no_resume_ring_1.3_ecdsap384_chacha_server 80343127 80353052 9925 (0.01%) 0.20%
handshake_no_resume_ring_1.3_rsa_chacha_client 4546953 4547504 551 (0.01%) 0.20%
transfer_no_resume_aws_lc_rs_1.3_ecdsap256_chacha_server 80444349 80453712 9363 (0.01%) 0.20%
handshake_tickets_ring_1.3_ecdsap256_aes_client 42160597 42155769 -4828 (-0.01%) 0.20%
transfer_no_resume_aws_lc_rs_1.3_ecdsap384_chacha_server 80444101 80453253 9152 (0.01%) 0.20%
transfer_no_resume_aws_lc_rs_1.2_rsa_aes_server 46227464 46232665 5201 (0.01%) 0.32%
handshake_tickets_aws_lc_rs_1.3_ecdsap256_aes_server 32659403 32655794 -3609 (-0.01%) 0.24%
handshake_no_resume_ring_1.3_rsa_aes_server 12236705 12238020 1315 (0.01%) 0.20%
transfer_no_resume_ring_1.3_ecdsap256_chacha_server 80334897 80343478 8581 (0.01%) 0.20%
handshake_no_resume_aws_lc_rs_1.3_rsa_chacha_client 3366075 3366420 345 (0.01%) 0.20%
handshake_no_resume_ring_1.3_rsa_chacha_server 12246025 12247048 1023 (0.01%) 0.20%
handshake_no_resume_ring_1.3_ecdsap384_chacha_server 13737815 13737162 -653 (-0.00%) 0.20%
handshake_no_resume_ring_1.2_rsa_aes_server 12042260 12042811 551 (0.00%) 0.20%
handshake_tickets_aws_lc_rs_1.3_rsa_aes_client 30649199 30650433 1234 (0.00%) 0.30%
transfer_no_resume_ring_1.3_rsa_aes_server 46273736 46272200 -1536 (-0.00%) 0.20%
handshake_no_resume_aws_lc_rs_1.3_rsa_aes_client 3355437 3355539 102 (0.00%) 0.20%
transfer_no_resume_aws_lc_rs_1.3_ecdsap256_aes_client 57971095 57969676 -1419 (-0.00%) 0.20%
transfer_no_resume_aws_lc_rs_1.3_ecdsap256_chacha_client 92440595 92438565 -2030 (-0.00%) 0.20%
handshake_session_id_ring_1.3_ecdsap256_chacha_server 43460817 43459957 -860 (-0.00%) 0.20%
handshake_no_resume_ring_1.3_ecdsap384_aes_server 13734598 13734869 271 (0.00%) 0.20%
handshake_no_resume_ring_1.3_ecdsap384_aes_client 35451987 35452639 652 (0.00%) 0.20%
transfer_no_resume_ring_1.3_rsa_chacha_server 80341922 80340770 -1152 (-0.00%) 0.20%
transfer_no_resume_ring_1.3_ecdsap256_aes_client 58069532 58068901 -631 (-0.00%) 0.20%
handshake_no_resume_ring_1.3_ecdsap384_chacha_client 35454461 35454841 380 (0.00%) 0.20%
transfer_no_resume_ring_1.3_rsa_chacha_client 92399768 92400729 961 (0.00%) 0.20%
transfer_no_resume_ring_1.3_rsa_aes_client 58067029 58066658 -371 (-0.00%) 0.20%
transfer_no_resume_ring_1.2_rsa_aes_client 57922768 57922496 -272 (-0.00%) 0.20%
transfer_no_resume_aws_lc_rs_1.3_rsa_chacha_client 92460416 92460701 285 (0.00%) 0.20%
transfer_no_resume_aws_lc_rs_1.3_rsa_aes_client 57990603 57990778 175 (0.00%) 0.20%
transfer_no_resume_ring_1.3_ecdsap384_chacha_client 92399654 92399916 262 (0.00%) 0.20%
transfer_no_resume_ring_1.3_ecdsap256_chacha_client 92399688 92399472 -216 (-0.00%) 0.20%
handshake_tickets_aws_lc_rs_1.3_rsa_aes_server 32715644 32715624 -20 (-0.00%) 0.60%
transfer_no_resume_ring_1.3_ecdsap384_aes_client 58066682 58066695 13 (0.00%) 0.20%

Wall-time

Significant differences

⚠️ There are significant wall-time differences

Click to expand
Scenario Baseline Candidate Diff Threshold
handshake_no_resume_ring_1.3_ecdsap384_chacha 3.66 ms 3.61 ms ✅ -0.06 ms (-1.54%) 1.00%
handshake_no_resume_ring_1.3_ecdsap384_aes 3.66 ms 3.61 ms ✅ -0.05 ms (-1.46%) 1.00%
handshake_session_id_ring_1.3_ecdsap384_aes 10.08 ms 9.95 ms ✅ -0.12 ms (-1.21%) 1.20%
handshake_session_id_aws_lc_rs_1.2_rsa_aes 2.16 ms 2.18 ms ⚠️ 0.02 ms (1.02%) 1.02%

Other differences

Click to expand
Scenario Baseline Candidate Diff Threshold
transfer_no_resume_aws_lc_rs_1.3_ecdsap256_aes 4.73 ms 4.84 ms 0.11 ms (2.36%) 4.70%
transfer_no_resume_aws_lc_rs_1.3_rsa_aes 5.68 ms 5.78 ms 0.10 ms (1.76%) 3.79%
transfer_no_resume_aws_lc_rs_1.3_ecdsap384_aes 5.46 ms 5.55 ms 0.09 ms (1.73%) 4.11%
transfer_no_resume_aws_lc_rs_1.2_rsa_aes 5.68 ms 5.77 ms 0.09 ms (1.50%) 3.44%
transfer_no_resume_ring_1.3_ecdsap256_aes 6.56 ms 6.66 ms 0.10 ms (1.48%) 3.46%
transfer_no_resume_ring_1.2_rsa_aes 7.04 ms 7.14 ms 0.10 ms (1.39%) 2.94%
transfer_no_resume_ring_1.3_rsa_aes 7.14 ms 7.23 ms 0.09 ms (1.33%) 2.61%
handshake_no_resume_aws_lc_rs_1.3_ecdsap256_chacha 471.66 µs 477.68 µs 6.02 µs (1.28%) 2.96%
handshake_no_resume_aws_lc_rs_1.3_ecdsap256_aes 472.68 µs 478.71 µs 6.03 µs (1.27%) 2.11%
handshake_tickets_ring_1.3_ecdsap384_aes 10.11 ms 9.98 ms -0.13 ms (-1.27%) 1.37%
handshake_tickets_ring_1.3_ecdsap256_aes 6.96 ms 6.87 ms -0.09 ms (-1.25%) 1.74%
handshake_tickets_ring_1.3_ecdsap384_chacha 10.06 ms 9.94 ms -0.12 ms (-1.22%) 1.30%
handshake_session_id_ring_1.3_ecdsap384_chacha 10.04 ms 9.92 ms -0.12 ms (-1.19%) 1.49%
handshake_tickets_ring_1.3_rsa_aes 7.60 ms 7.51 ms -0.09 ms (-1.17%) 1.42%
handshake_tickets_ring_1.3_ecdsap256_chacha 6.91 ms 6.83 ms -0.08 ms (-1.15%) 1.86%
handshake_tickets_ring_1.3_rsa_chacha 7.55 ms 7.46 ms -0.08 ms (-1.11%) 1.51%
handshake_session_id_ring_1.3_ecdsap256_aes 6.93 ms 6.86 ms -0.07 ms (-1.07%) 1.71%
handshake_session_id_ring_1.3_rsa_aes 7.57 ms 7.49 ms -0.08 ms (-1.03%) 1.60%
handshake_session_id_ring_1.3_ecdsap256_chacha 6.90 ms 6.83 ms -0.07 ms (-1.01%) 1.72%
handshake_session_id_ring_1.2_rsa_aes 1.74 ms 1.75 ms 0.02 ms (0.95%) 2.07%
handshake_session_id_ring_1.3_rsa_chacha 7.53 ms 7.45 ms -0.07 ms (-0.94%) 1.84%
handshake_tickets_aws_lc_rs_1.2_rsa_aes 2.32 ms 2.34 ms 0.02 ms (0.81%) 1.73%
transfer_no_resume_aws_lc_rs_1.3_ecdsap384_chacha 13.91 ms 14.02 ms 0.10 ms (0.73%) 1.68%
transfer_no_resume_aws_lc_rs_1.3_ecdsap256_chacha 13.22 ms 13.31 ms 0.09 ms (0.68%) 1.59%
transfer_no_resume_ring_1.3_ecdsap256_chacha 13.24 ms 13.32 ms 0.08 ms (0.61%) 1.86%
transfer_no_resume_aws_lc_rs_1.3_rsa_chacha 14.17 ms 14.25 ms 0.08 ms (0.60%) 1.36%
handshake_tickets_aws_lc_rs_1.3_ecdsap256_chacha 5.38 ms 5.41 ms 0.03 ms (0.57%) 2.45%
handshake_tickets_ring_1.2_rsa_aes 1.83 ms 1.84 ms 0.01 ms (0.56%) 1.81%
handshake_tickets_aws_lc_rs_1.3_ecdsap384_chacha 6.08 ms 6.12 ms 0.03 ms (0.56%) 2.01%
transfer_no_resume_ring_1.3_rsa_chacha 13.83 ms 13.90 ms 0.07 ms (0.54%) 1.55%
handshake_no_resume_aws_lc_rs_1.3_ecdsap384_chacha 1.18 ms 1.18 ms 0.01 ms (0.53%) 1.14%
handshake_session_id_aws_lc_rs_1.3_ecdsap384_chacha 6.03 ms 6.06 ms 0.03 ms (0.53%) 1.62%
handshake_session_id_aws_lc_rs_1.3_ecdsap256_chacha 5.33 ms 5.36 ms 0.03 ms (0.51%) 1.85%
handshake_no_resume_ring_1.3_ecdsap256_chacha 505.49 µs 507.92 µs 2.43 µs (0.48%) 2.04%
handshake_tickets_aws_lc_rs_1.3_rsa_chacha 6.37 ms 6.40 ms 0.03 ms (0.43%) 1.88%
handshake_no_resume_aws_lc_rs_1.2_rsa_aes 1.36 ms 1.37 ms 0.01 ms (0.43%) 1.10%
handshake_session_id_aws_lc_rs_1.3_ecdsap256_aes 5.34 ms 5.37 ms 0.02 ms (0.42%) 1.90%
handshake_no_resume_ring_1.3_ecdsap256_aes 507.32 µs 509.36 µs 2.04 µs (0.40%) 2.25%
handshake_session_id_aws_lc_rs_1.3_rsa_aes 6.35 ms 6.37 ms 0.03 ms (0.40%) 1.51%
handshake_no_resume_aws_lc_rs_1.3_ecdsap384_aes 1.18 ms 1.19 ms 0.00 ms (0.38%) 1.00%
transfer_no_resume_ring_1.3_ecdsap384_aes 9.72 ms 9.75 ms 0.04 ms (0.37%) 2.47%
handshake_tickets_aws_lc_rs_1.3_ecdsap256_aes 5.37 ms 5.39 ms 0.02 ms (0.34%) 2.08%
handshake_no_resume_aws_lc_rs_1.3_rsa_chacha 1.40 ms 1.41 ms 0.00 ms (0.32%) 1.00%
handshake_session_id_aws_lc_rs_1.3_ecdsap384_aes 6.06 ms 6.08 ms 0.02 ms (0.32%) 1.63%
handshake_session_id_aws_lc_rs_1.3_rsa_chacha 6.34 ms 6.36 ms 0.02 ms (0.28%) 1.19%
handshake_no_resume_aws_lc_rs_1.3_rsa_aes 1.41 ms 1.41 ms 0.00 ms (0.27%) 1.00%
handshake_tickets_aws_lc_rs_1.3_ecdsap384_aes 6.10 ms 6.11 ms 0.01 ms (0.23%) 1.72%
handshake_no_resume_ring_1.2_rsa_aes 1.07 ms 1.07 ms 0.00 ms (0.21%) 1.08%
handshake_tickets_aws_lc_rs_1.3_rsa_aes 6.37 ms 6.39 ms 0.01 ms (0.19%) 1.77%
transfer_no_resume_ring_1.3_ecdsap384_chacha 16.39 ms 16.42 ms 0.03 ms (0.19%) 1.50%
handshake_no_resume_ring_1.3_rsa_chacha 1.09 ms 1.09 ms 0.00 ms (0.15%) 1.00%
handshake_no_resume_ring_1.3_rsa_aes 1.08 ms 1.08 ms 0.00 ms (0.03%) 1.00%

Additional information

Historical results

Checkout details:

  • Base repo: https://github.com/rustls/rustls.git
  • Base branch: main (a31c5da2e50d04898a4573ff95250268560cf51a)
  • Candidate repo: https://github.com/japaric/rustls.git
  • Candidate branch: no-std-support (24445581291a4294a3f322752e7af9888e809c7d)

cpu force-pushed the no-std-support branch from 4251a12 to 231cfdf

Rebased to address conflicts w/ main.

cpu avatar Feb 26 '24 19:02 cpu