| Commit message (Collapse) | Author | Age | Files | Lines |
| |\
| |
| |
| |
| | |
Upgrade several dependencies
See merge request tpo/core/arti!1626
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of tying ourselves to a particular version of the
generic-array crate, we now always use the version re-exported by
our RustCrypto crates. This lets us avoid the possibility of
version mismatch.
(Originally I had planned to upgrade to generic-array 1.0, but then
I found that we were not actually using it.)
|
| |/
|
|
|
|
|
|
|
| |
This commit replaces a repeating code pattern in the `set_digest`
function for setting the 'Recognized' and Digest field to zero with a
slice fillment.
Besides this, it also adds comments explaining which fields are
currently getting zeroized.
|
| |\
| |
| |
| |
| |
| |
| | |
Accept and transmit padding in introduce2 plaintexts
Closes #1031
See merge request tpo/core/arti!1602
|
| | |
| |
| |
| |
| |
| | |
Closes #1031. This padding ensures that the introduction point
doesn't learn the length of the plaintext being sent to the onion
service.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
Since we are using the same introduction point circuits for multiple
time periods, we need the ability to provide a set of subcredentials
and see which of them acually works. Fortunately, we "only" have to
do digest operations here, which are much faster than public key.
|
| |/ |
|
| |
|
|
|
| |
Fixes
cargo clippy -p tor-hsclient --all-features --all-targets
|
| |
|
|
|
| |
This removes the `Display` impl of `HopNum` and replaces its usage with
`HopNum::display`.
|
| |
|
|
|
|
|
|
|
| |
This function can be used to display a more user-friendly representation
of a `HopNum`. This will print hop numbers as 1-indexed values: #1,
#2, etc..
We will soon remove HopNum's Display implementation in favour of
`.display()`.
|
| |
|
|
|
|
|
|
|
|
| |
This makes `HopNum`s display as 1-indexed values. This will make error
messages more intuitive, because when talking about an N-hop circuit, we
generally speak in terms of hops 1..N (rather than 0..N-1).
Internally, our `HopNum` indices are still 0-based.
Closes #996
|
| | |
|
| |
|
|
| |
Closes #993
|
| |
|
|
|
|
|
|
| |
These values are computed as part of the circuit extension
handshake, and are used as MAC keys to bind `ESTABLISH_INTRO`
messages to a particular circuit so that they can't be replayed.
Part of #993.
|
| |
|
|
|
|
| |
`HopNum` will be used in `ClientCirc`'s public API when we refactor
`ClientCirc::start_conversation_last_hop` to use the provided hop rather
than always using the last one.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
=========================
Notes from nickm:
(This differs from pinkforest's original MR: It removes the
Cargo.lock changes and the version bump on tor-llcrypto.)
Minimal Cargo.lock changes from downgrade.
(These are exactly those changes generated by running "build" and
"test".)
There are several reasons to do this:
* It's best to bump all of our dalek dependencies at once to rc.3
or later, rather than the piecemeal approach we've been stuck
with so far.
* We don't want to do this bump right now, since there are some
tricky questions about clamping we need to figure out (see
#808), and we need to make sure we get them right, and we're in
a distracted this week.
* We _do_ need to move away from 2.0.0-rc.2 right now, since
it was causing a failure in `cargo install arti`, and then it
got yanked.
Thanks to pinkforest for helping us out here and explaining all of
this!
Fixes #926.
Commit-edited-by: Nick Mathewson <[email protected]>
|
| |
|
|
|
| |
This lets us keep the service-side hs-ntor handshake experiemental
for now.
|
| | |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
I am pretty sure that C tor works around this somehow; we should
figure out how!
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
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.)
|
| | |
|
| |\
| |
| |
| |
| |
| |
| | |
tor-proto: Add support for extending circuits through virtual hops.
Closes #726
See merge request tpo/core/arti!1191
|
| | | |
|
| | |
| |
| |
| |
| | |
This is fairly straightforward, thanks to our existing design work
on this code.
|
| | | |
|
| | |
| |
| |
| | |
This is still not the most beautiful interface, but it'll do for now.
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| | |
We'll want these so we can implement some test vectors.
|
| | |
| |
| |
| |
| |
| |
| | |
I think that these Input structs had been defined so that we could
use hs_ntor interchangeably with other handshakes. The trouble is,
though, that it doesn't really work like any other handshakes we
have.
|
| | |
| |
| |
| |
| |
| | |
Note that some of the invocations for this function seem to put the
key and the message in a questionable order. But that's a thing to
figure out later, while debugging.
|
| | | |
|
| |/ |
|
| |
|
|
| |
The `new` function is deprecated in x25519-dalek 2.0.0-rc.2
|
| |
|
|
| |
Fixes #756
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
We now manipulate raw relay cell bodies as (an alias for)
`Box<[u8;509]>` rather than as (an alias for) `[u8;509]`. This
enables us to do much less copying. It will become more important
soon, as we defer parsing relay cell bodies even longer.
Related to #7.
We also use SliceWriter to avoid allocating a Vec<> for every relay
message we want to encode, and instead encode directly into the
cell.
|
| |
|
|
|
| |
This panics on error, and we're fine with a panic on misbehavior in
tests.
|
| |
|
|
|
|
| |
This is a little tricky, but I think that we're not actually
exposing too much here. I expect we'll need to tweak this stuff
between now and our final version.
|
| |
|
|
| |
(For consistency with other crates)
|
| |
|
|
|
| |
This is precisely the result of running the rune in
maint/adhoc-add-lint-blocks.
|