aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-proto/src/crypto/bench_utils.rs
Commit message (Collapse)AuthorAgeFilesLines
* proto: remove bench pub wrappersLionel Goffaux2025-05-221-0/+1
|
* proto: extend benchmarksLionel Goffaux2025-05-081-132/+1
|
* tor_proto: name fields in bench_utils.Nick Mathewson2025-05-061-7/+10
|
* proto: Apply type-specific wrappers for tor1 cryptoNick Mathewson2025-05-061-9/+11
| | | | | | | | | | | | | Now instead of using CryptState for everything, we have specific types for each role and direction of crypto. This turned up a harmless-so-far bug in our onion service code: as an onion service, we were using _client_ crypto layers to respond to a client request. That's not correct, and wouldn't have worked with CGO. Instead, we need to use relay crypto layers, wrapped as client layers. Closes #1975.
* proto, cell: Remove RelayCellFormatTrait.Nick Mathewson2025-05-061-13/+7
| | | | | | | | | | | | | | | | The purpose of the trait was to parameterize the tor1 cell crypto on the different possible relay cell layouts. It made sense to have this trait when we thought we would implement the new cell layout for prop340 (packed-and-fragmented) well before we implemented CGO. But it now appears all but certain that CGO will land long before we make any more headway on prop340. Therefore, it doesn't make sense to carry the ability to customize `tor1` for other relay cell layouts. Removing this trait saves a fair bit of complexity.
* proto: Make crypt layers take a ChanCmd argumentNick Mathewson2025-04-291-5/+5
| | | | | | CGO will need this argument so that it can authenticate the command as part of its crypto operations. (Trying to meddle with RELAY vs RELAY_EARLY will no longer work!)
* proto: refactor RelayCrypt trait into separate traitsNick Mathewson2025-04-291-4/+4
| | | | | | It seems very likely that, as with client crypto, we'll want relay crypto to separable into "forward" and "reverse" objects, so that the two can be used more or less independently.
* proto: Tweak semantics of RelayCrypt::originate.Nick Mathewson2025-04-291-1/+2
| | | | | | | | | | This makes the behavior of "originate" match the behavior of OutboundClientLayer::originate_for, which creates the message _and_ encrypts it. This will be necessary for CGO, where "originate" and "encrypt" are not easily separated operations. (Nothing uses this trait yet, since relay circuits aren't yet a thing, so it's a good time to get it right.)
* tor-proto: put every bench_utils mod behind the bench featureLionel Goffaux2024-11-061-3/+1
|
* tor-proto: remove inlines attributesLionel Goffaux2024-11-061-2/+0
|
* tor-proto: Add benchmarks for cell encryption and decryptionLionel Goffaux2024-11-041-0/+137