aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-proto
Commit message (Collapse)AuthorAgeFilesLines
...
| * proto: Remove Mutex from Path.Nick Mathewson2023-06-223-17/+13
| | | | | | | | | | Now Path is a regular struct with no interior mutability, and we use Arc::make_mut() for the case when we need to add a hop.
| * proto: Move Path into a separate shared mutable structureNick Mathewson2023-06-222-14/+44
| | | | | | | | (We're about to remove the interior mutability from Path.)
* | proto: Downgrade a comment about unauthenticated SENDMEsNick Mathewson2023-06-211-5/+9
| | | | | | | | We never actually need to allow these again; see #914
* | proto::circuit::handshake: downgrade a "TODO HS".Nick Mathewson2023-06-211-2/+2
| |
* | proto: Put client and service hs_ntor behind individual featuresNick Mathewson2023-06-211-5/+17
| | | | | | | | | | This lets us keep the service-side hs-ntor handshake experiemental for now.
* | proto: Resolve some hs_ntor "TODO HS" comments.Nick Mathewson2023-06-211-10/+7
| |
* | proto: downgrade some "TODO HS" comments to "HSS"Nick Mathewson2023-06-212-8/+8
|/ | | | | These are all related to issues that will come up for the service side of the onion service implementation.
* lints: Run maint/add_warning to actually apply new lintsIan Jackson2023-06-211-0/+2
|
* Lower tor-proto::util::ct::lookup to tor-llcryptoNick Mathewson2023-06-163-59/+5
| | | | | | | | This is mostly code movement; you may want to review it with `--color-moved`. I'm doing this so we can also use the function in netdoc for looking up hsdesc authentication.
* proto: Make sure that auth tags are truncated to 20 bytesNick Mathewson2023-06-131-3/+13
| | | | | | | | Onion service hops (pointlessly) use SHA3-256 for their authentication, but they truncate it to 20 bytes (assuming I'm reading the C right.) See torspec#204 for clarification here.
* proto: Convert MsgHandler API to expect a message, not a cell.Nick Mathewson2023-06-122-7/+16
| | | | Closes #887.
* proto: Add a commment about a problem in my hs_ntor plans.Nick Mathewson2023-06-121-0/+4
| | | | | I am pretty sure that C tor works around this somehow; we should figure out how!
* proto: code movement and reindentation in hs_ntorNick Mathewson2023-06-121-86/+75
|
* proto: Remove now-unused hs_ntor APIsNick Mathewson2023-06-121-43/+21
|
* proto: refactor hs_ntor to reuse state.Nick Mathewson2023-06-121-14/+49
| | | | | | | | | | We want the ability to send the same handshake request in parallel on multiple introduce circuits. This implies encoding the client handshake more than once. (Sadly we can't _actually_ do this in the protocol as it stands, since the onion service can use a separate KP_hss_ntor for each introduction point; I'll add a comment to that effect later.)
* Apply 1 suggestion(s) to 1 file(s)Ian Jackson2023-06-121-1/+1
|
* proto: Have send_control_message take an AnyRelayMsg.Nick Mathewson2023-06-091-4/+2
| | | | | | | | | | When we break the 1:1 relationship of message and cell, we'll want this API to take messages, not cells. This API is experimental, so we don't need to call it a semver break. Closes #881.
* proto: Correct the docs on send_control_messageNick Mathewson2023-06-091-2/+7
| | | | | | | | Formerly we said that it would not return until the handler was uninstalled. This is incorrect: it returns as soon as the message is sent and the handler installed. Closes #885.
* Fix a silly clippy warningIan Jackson2023-06-081-0/+1
| | | | | Fixes nailing-cargo +stable clippy -p tor-hsclient --all-features --all-targets
* Merge branch 'remove_arrayref' into 'main'Nick Mathewson2023-06-063-5/+10
|\ | | | | | | | | | | | | Remove use of arrayref Closes #872 See merge request tpo/core/arti!1214
| * tor-proto: Remove use of arrayref.Nick Mathewson2023-06-013-5/+10
| |
* | tor-circmgr: send_control_message: Add reference to MR discussionIan Jackson2023-06-051-0/+2
| |
* | tor-circmgr: send_control_message: Change a rename proposalIan Jackson2023-06-051-1/+1
| | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1218#note_2908119
* | tor-circmgr: send_control_message: Fix reference to circuitIan Jackson2023-06-051-1/+1
| |
* | tor-circmgr: send_control_message: API change proposalIan Jackson2023-06-051-0/+21
| | | | | | | | | | | | I am hoping we can merge this as a "TODO (Diziet)", even though I think it may be controversial. Ie merging this doesn't represent a decision to do as I suggest.
* | tor-circmgr: Propose to rename `MetaCellDisposition::UninstallHandler`Ian Jackson2023-06-051-0/+4
| |
* | tor-circmgr: send_control_message: Clarify some corner casesIan Jackson2023-06-052-7/+34
| | | | | | | | | | | | | | | | | | | | | | | | Also, no longer talk about handlers being "installed". That's not something that's exposed by this API. And, say that `send_control_message` can be called again only after *`send_control_message`* returns, not when `handle_msg` has returned `UinstallHandler`. IMO this makes more sense. Explain that we can't maintain a continuous watch while holding a conversation with the peer. (This is surely an API bug.)
* | Remove semver.md files from 1.1.5Nick Mathewson2023-06-011-2/+0
| |
* | Bump crate versions in preparation for v1.1.5 release.Nick Mathewson2023-06-011-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generated with the following commands: ``` cargo set-version --bump minor -p tor-cell cargo set-version --bump minor -p tor-linkspec cargo set-version --bump minor -p tor-proto cargo set-version --bump minor -p tor-netdoc cargo set-version --bump minor -p tor-circmgr cargo set-version --bump patch -p tor-cert cargo set-version --bump patch -p tor-basic-utils cargo set-version --bump patch -p tor-rpcbase cargo set-version --bump patch -p tor-llcrypto cargo set-version --bump patch -p tor-hscrypto cargo set-version --bump patch -p tor-checkable cargo set-version --bump patch -p tor-async-utils cargo set-version --bump patch -p caret cargo set-version --bump patch -p fs-mistrust cargo set-version --bump patch -p safelog cargo set-version --bump patch -p retry-error cargo set-version --bump patch -p tor-error cargo set-version --bump patch -p tor-config cargo set-version --bump patch -p tor-events cargo set-version --bump patch -p tor-units cargo set-version --bump patch -p tor-rtcompat cargo set-version --bump patch -p tor-rtmock cargo set-version --bump patch -p tor-protover cargo set-version --bump patch -p tor-bytes cargo set-version --bump patch -p tor-socksproto cargo set-version --bump patch -p tor-consdiff cargo set-version --bump patch -p tor-netdir cargo set-version --bump patch -p tor-congestion cargo set-version --bump patch -p tor-persist cargo set-version --bump patch -p tor-chanmgr cargo set-version --bump patch -p tor-ptmgr cargo set-version --bump patch -p tor-guardmgr cargo set-version --bump patch -p tor-dirclient cargo set-version --bump patch -p tor-dirmgr cargo set-version --bump patch -p tor-hsclient cargo set-version --bump patch -p tor-hsservice cargo set-version --bump patch -p arti-client cargo set-version --bump patch -p arti-rpcserver cargo set-version --bump patch -p arti-config cargo set-version --bump patch -p arti-hyper cargo set-version --bump patch -p arti cargo set-version --bump patch -p arti-bench cargo set-version --bump patch -p arti-testing ```
* | Run fixup-features script and resolve its complaints.Nick Mathewson2023-05-311-1/+1
|/
* Merge branch 'stream_ctrl' into 'main'Nick Mathewson2023-05-244-3/+238
|\ | | | | | | | | | | | | Experimental new stream-ctrl feature Closes #847 See merge request tpo/core/arti!1198
| * Add "TODO RPC" notes around DataStreamCtrl per review.Nick Mathewson2023-05-242-0/+16
| |
| * proto: Add stream-status functionality to DataStreamCtrl.Nick Mathewson2023-05-241-2/+106
| | | | | | | | There are some weaknesses and problems here; see TODO notes.
| * proto: Create a `DataStreamCtrl` type.Nick Mathewson2023-05-223-1/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea here is that we want to make DataStream visible to the RPC system without requiring that the RPC session hold the DataStream itself (or the Reader, or the Writer). We could solve this problem by making _all_ the state in the DataStream shared, but that would introduce unnecessary extra locking in our critical path. Instead we're creating the notion of a "control handle" that lets you manage and observe a stream without actually owning the stream. Right now the only supported functionality is asking for the stream's circuit. Part of #847
| * proto: Add a new experimental stream-ctrl feature.Nick Mathewson2023-05-221-1/+2
| | | | | | | | | | (It doesn't do anything yet. It may eventually become always-on. But for now let's make this API optional. Part of #847)
| * tor-proto: Move a comment in Cargo.tomlNick Mathewson2023-05-221-1/+2
| |
* | proto: Make PathEntry::Virtual feature-conditional.Nick Mathewson2023-05-232-0/+3
|/ | | | | This fixes a warning when building tor-proto without the `rpc-common` feature.
* Merge branch 'virtual_hop' into 'main'Nick Mathewson2023-05-185-38/+245
|\ | | | | | | | | | | | | tor-proto: Add support for extending circuits through virtual hops. Closes #726 See merge request tpo/core/arti!1191
| * proto: Explain "virtual" hops better.Nick Mathewson2023-05-181-0/+4
| | | | | | | | Based on text from @diziet
| * proto: Try to improve the documentation in crypto/cell.rsNick Mathewson2023-05-181-24/+86
| |
| * proto: Allow circuit Paths to represent virtual hops.Nick Mathewson2023-05-183-14/+57
| | | | | | | | | | Sadly, this adds a few more `TODO HS` entries, but I think we can clean them up later after a bit of discussion.
| * proto: Implement Circuit::extend_virtual.Nick Mathewson2023-05-182-2/+59
| | | | | | | | | | | | | | There are a few new TODO hs comments, though, and an XXXX I'll need to fix up in the next commit. Implements #726.
| * tor-proto: Code to construct crypto layers for virtual hops.Nick Mathewson2023-05-183-1/+42
| | | | | | | | | | This is fairly straightforward, thanks to our existing design work on this code.
* | tor-guardmgr, tor-proto: minor logging tweakseta2023-05-181-2/+2
| | | | | | | | | | | | | | | | - We make the tor-guardmgr "We have found that {} is usable" line include the word "guard", otherwise it doesn't appear very useful to a user in safe logging mode, since the guard gets replaced with [scrubbed]. - The "Actually got an end cell..." message is downgraded to DEBUG.
* | hs_ntor: several documentation cleanups.Nick Mathewson2023-05-171-6/+14
| |
* | hs_ntor: make encrypt_and_mac take a typed public keyNick Mathewson2023-05-171-10/+6
| | | | | | | | This is still not the most beautiful interface, but it'll do for now.
* | hs_ntor: remove the last lingering AsRef<[u8]>Nick Mathewson2023-05-171-7/+7
| |
* | hs_ntor: Add a test vector case extracted from C tor.Nick Mathewson2023-05-171-0/+104
| |
* | hs_ntor: Calculate MAC on introduce1 message correctly.Nick Mathewson2023-05-171-3/+12
| | | | | | | | | | | | There were two bugs here that made the behavior unlike that of C tor: we had swapped the MAC inputs, and we had forgotten to include the public key X in the input.
* | hs_ntor: Make internal no-rng variants of the handshake functions.Nick Mathewson2023-05-171-2/+25
| | | | | | | | We'll want these so we can implement some test vectors.