aboutsummaryrefslogtreecommitdiff
path: root/tor-proto
Commit message (Collapse)AuthorAgeFilesLines
...
* Move counts_towards_windows() code into circuit moduleNick Mathewson2020-10-094-4/+19
|
* Split information about circuit hops into inbound and outbound.Nick Mathewson2020-10-092-61/+172
| | | | | | | | | | | | | | | | | | Previously the circuit object owned not only the outbound crypto, but also the inbound crypto and the stream maps. That's not so great, since the reactor needs to use the inbound crypto and the stream maps all the time, whereas the circuit doesn't need them much (or at all). Moving these objects to the reactor-owned structure should let us fix the deadlock case in stream sendme handling, since the circuit reactor no longer needs to lock the circuit in order to do crypto and demultiplexing. It should also speed up the code a bit, since it doesn't need to grab the circuit lock nearly so often as before. This change forced me to add a couple of new reactor CtrlMsg values, since the circuit can no longer add streams and layers directly. I think it will still be a performance win, though.
* Split client relay crypto into separate directionsNick Mathewson2020-10-093-77/+179
| | | | | I think we should have the reactor task own the reverse crypto and the circuit own the forward crypto.
* Use batch verification in client<->relay handshake.Nick Mathewson2020-10-021-7/+19
|
* Enable batch ed25519 verification.Nick Mathewson2020-10-021-0/+1
|
* cargo upgradeNick Mathewson2020-09-291-1/+1
|
* Move RelayCell into a more reasonable place.Nick Mathewson2020-09-292-4/+4
|
* Remove idmap as needlessly complex.Nick Mathewson2020-09-294-52/+39
|
* make it work on rust 1.45Nick Mathewson2020-09-281-1/+1
|
* test vectors for cell crypto.Nick Mathewson2020-09-283-3/+61
|
* Mark most of the cell crypto code as crate-local.Nick Mathewson2020-09-281-7/+7
|
* Add a round-trip test for cell encryption.Nick Mathewson2020-09-281-0/+74
|
* Rename remaining get_ accessorsNick Mathewson2020-09-287-40/+33
|
* tor_cert: rename accessorsNick Mathewson2020-09-281-3/+3
|
* Rename some identifiers in tor-linkspec.Nick Mathewson2020-09-282-12/+12
| | | | By convention, rust accessor functions don't start with 'get'.
* Rename ExtendTarget to CircTarget.Nick Mathewson2020-09-281-2/+2
|
* Fix a few clippy issuesNick Mathewson2020-09-271-1/+3
|
* Fix some comments that reflected a misunderstanding in SENDMEsNick Mathewson2020-09-262-3/+3
| | | | | I had thought that the sendme authentication things used for onion services were 32-byte; they're still only 20.
* Split the cell-handling parts of tor-proto into a new crate.Nick Mathewson2020-09-2622-2251/+76
|
* Make sendme authentication optional.Nick Mathewson2020-09-254-15/+43
| | | | | | | This code deviates from current tor in that it allows missing sendme authentications only when we know we're talking to an old relay, or when we don't know the version of the relay we're talking to.
* Lower our "#[allow(dead_code)]" decl in tor_proto."Nick Mathewson2020-09-257-1/+6
|
* Improve documentation and lightly refactor SENDME codeNick Mathewson2020-09-255-49/+119
|
* Implement authenticated sendme output for circuit-level sendmes.Nick Mathewson2020-09-253-6/+44
| | | | This patch has a XXXXX kludge note in it.
* Add a bad workaround for a deadlock: we should look for a better one.Nick Mathewson2020-09-252-4/+14
|
* Fix encoding/decoding of authenticated sendme.Nick Mathewson2020-09-251-4/+22
|
* Try to get sendme crypto workingNick Mathewson2020-09-253-27/+62
| | | | | | | | There's a problem, though: this code assumes that tags are 20 bytes long whereas actually the tag type is part of the crypto layer info. So maybe in the long term we need to move the queue of tags from the send window into being part of the crypto layers.
* Incomplete implementation of circuit SENDME handling.Nick Mathewson2020-09-255-26/+86
| | | | | | This is incomplete because the cell crypto code doesn't actually expose tags yet, and because it demands tags unconditionally, without caring about the linkspec protocol version.
* Attempted implementation of stream sendme cellsNick Mathewson2020-09-256-26/+100
|
* Initial work on a sendme backend.Nick Mathewson2020-09-252-0/+152
| | | | | Parameterized for authenticated/unauthenticated operation, and operation on circuits and streams.
* Initial error cleanup on streams/circuitsNick Mathewson2020-09-254-20/+36
|
* Migrate ClientMain to byte-oriented API.Nick Mathewson2020-09-242-14/+25
|
* Try to make a send/receive style API for streams.Nick Mathewson2020-09-243-3/+132
|
* Add support for RELAY_END cells.Nick Mathewson2020-09-245-20/+170
| | | | | | | | | | | | | | | | | | | | This was a hard one. I need to make sure that we send an END cell when the stream is dropped. But we can't call an .await from inside the drop() function, since drop() isn't async, and we don't have an executor. Fortunately, you can call send() on a oneshot::Sender without having to await on it, so that's the obvious thing to put in drop(). But we need some way to make sure that the oneshot::Receiver is given to the reactor, and is .awaited. For that, we needed a control channel. And the reactor needs to treat the control channel and the close messages as equally important. So that's how I wound up with a Fuse<Select<mpsc::Receiver<Result<Foo>>, SelectAll<Once<oneshot::Receiver<Foo>>>>>. I doubt that this is actually the best way to handle any of this!
* as Tor does, skip to random initial stream member.Nick Mathewson2020-09-231-1/+6
|
* Fuse input streams on creation.Nick Mathewson2020-09-232-10/+8
|
* Turn IdMap into an extension trait.Nick Mathewson2020-09-234-97/+38
| | | | | Also, use the "right" (cyclic, potentially expensive) algorithm for stream IDs.
* Run cargo upgradeNick Mathewson2020-09-211-3/+2
|
* turn hopnum into a first-class typeNick Mathewson2020-09-213-14/+41
|
* Add is_zero for ID types.Nick Mathewson2020-09-213-5/+22
|
* Fix some errors; document some places where error handling is bogusNick Mathewson2020-09-215-8/+37
|
* More documentation for channel, circuit, stream.Nick Mathewson2020-09-218-92/+372
|
* Start implementing streams and circuit-level reactors.Nick Mathewson2020-09-2112-183/+584
| | | | | | Also, revise nearly all of the circuit/channel interaction to actually send relay cells to the right place and do sensible things with them.
* Add RelayCmd::accepts_streamid_valNick Mathewson2020-09-201-0/+49
|
* Refactor accetps_circid_val to be less wonky.Nick Mathewson2020-09-201-9/+17
|
* Move is_recognized function into caret.Nick Mathewson2020-09-201-23/+0
|
* Rename StreamCmd to RelayCmdNick Mathewson2020-09-203-41/+40
|
* Improve shutdown support for channel. No idea if it works.Nick Mathewson2020-09-201-14/+7
|
* rename a field in RelayCellNick Mathewson2020-09-201-12/+9
|
* Create a StreamID->Stream map type.Nick Mathewson2020-09-207-42/+139
| | | | | Also extract the shared part of CircMap and StreamMap into a new IdMap type.
* De-parameterize channel and circuitNick Mathewson2020-09-193-38/+27
| | | | | | By putting the cell-sink in a box, we can get rid of the need for having everything that uses a channel or a circuit know what kind of underlying TLS implementation it has.