summaryrefslogtreecommitdiff
path: root/crates/tor-proto/src/crypto
Commit message (Collapse)AuthorAgeFilesLines
* Upgrade to AES 0.8Nick Mathewson2022-04-263-4/+4
| | | | | | | | Now that we require Rust 1.56, we can upgrade to AES 0.8. This forces us to have some slight API changes. We require cipher 0.4.1, not cipher 0.4.0, since 0.4.0 has compatibility issues with Rust 1.56.
* squash! Bump every crate's edition to 2021.Nick Mathewson2022-04-252-3/+0
| | | | | Remove all `use` statements for `TryFrom` and `TryInto`. These are now redundant in Rust 2021.
* tor-proto: Rename BadHandshake to BadCircHandshakeNick Mathewson2022-02-234-6/+6
| | | | (We'll have a BadChanHandshake soon.)
* Eliminate RequestedResourceAbsent kind.Nick Mathewson2022-02-224-17/+44
| | | | | | | | There was only one use of this, and it was in as-yet-unused relay-only code. Removing this type required refactoring the relay onion handshake code to use its own error type, which is probably clever anyway.
* Update tor-proto errors to latest API.Nick Mathewson2022-02-151-1/+1
|
* tor-proto: use InternalError for internal errors.Nick Mathewson2022-02-152-4/+12
|
* Remove many needless borrows and slicesIan Jackson2022-02-021-4/+4
| | | | | | | Found via clippy::needless_borrow. In some cases I removed needless `[..]` too. See also: needless_borrow suggestion doesn't go far enough https://github.com/rust-lang/rust-clippy/issues/8389
* prefer 'unwrap_or_default' to manual constructorDaniel Eades2022-01-011-1/+1
|
* Merge remote-tracking branch 'origin/mr/180'Nick Mathewson2021-12-081-11/+10
|\
| * In CryptInit, return a Result in initialize()Neel Chauhan2021-12-081-11/+10
| |
* | Upgrade to digest v0.10.0Nick Mathewson2021-12-072-4/+4
|/ | | | | We generally try to track the latest rust-crypto traits when we can: fortunately, this upgrade didn't break much, considering.
* Remove some XXXs about zeroizing from tor-proto.Nick Mathewson2021-12-071-2/+0
| | | | There is now a ticket about this issue in general, at arti#254.
* Resolve roughly half of the XXXXs.Nick Mathewson2021-12-064-8/+11
| | | | | | | | We want to only use TODO in the codebase for non-blockers, and open tickets for anything that is a bigger blocker than a TODO. These XXXXs seem like definite non-blockers to me. Part of arti#231.
* add constructorsdagon2021-11-301-17/+53
|
* add semicolons if nothing returnedDaniel Eades2021-11-251-1/+1
|
* Completely overhaul the tor-proto circuit reactoreta2021-11-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather like e8e9699c3c239d6c30f9ad414f15d3bad6ec03fd ("Get rid of tor-proto's ChannelImpl, and use the reactor more instead"), this admittedly rather large commit refactors the way circuits in `tor-proto` work, centralising all of the logic in one large nonblocking reactor which other things send messages into and out of, instead of having a bunch of `-Impl` types that are protected by mutexes. Congestion control becomes a lot simpler with this refactor, since the reactor can manage both stream- and circuit-level congestion control unilaterally without having to share this information with consumers, meaning we can get rid of some locks. The way streams work also changes, in order to facilitate better handling of backpressure / fairness between streams: each stream now has a set of channels to send and receive messages over, instead of sending relay cells directly onto the channel (now, the reactor pulls messages off each stream in each map, and tries to avoid doing so if it won't be able to forward them yet). Additionally, a lot of "close this circuit / stream" messages aren't required any more, since that state is simply indicated by one end of a channel going away. This should make cleanup a lot less brittle. Getting all of this to work involved writing a fair deal of intricate nonblocking code in Reactor::run_once that tries very hard to be mindful of making backpressure work correctly (and congestion control); the old code could get away with having tasks .await on things, but the new reactor can't really do this (as it'd lock the reactor up), so has to do everything in a nonblocking manner.
* Remove some dbg!() calls in real code.Nick Mathewson2021-11-021-2/+0
|
* Update our disclaimers and limitations sections.Nick Mathewson2021-10-271-5/+0
|
* Use subtle and some refactoring to remove branches in ntorNick Mathewson2021-10-012-21/+46
| | | | Closes #163
* Typo fixesNick Mathewson2021-09-091-2/+2
|
* Fix clippy warnings in tests with --all-featuresNick Mathewson2021-09-082-10/+9
|
* fix/silence clippy lints in test modulesDaniel Eades2021-09-084-5/+8
|
* Move all crates into a `crates` subdirectory.Nick Mathewson2021-08-279-0/+2727
This will cause some pain for now, but now is really the best time to do this kind of thing.