summaryrefslogtreecommitdiff
path: root/crates/tor-cell/src
Commit message (Collapse)AuthorAgeFilesLines
* Convert to the latest versions of dalek-cryptographyNick Mathewson2023-11-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main changes that we have to adjust for are as follows: * In x25519-dalek: * `StaticSecret` is now behind a feature. * `StaticSecret::new` is deprecated in favor of `StaticSecret::random_from_rng`. * StaticSecret no longer does its own clamping. * In ed25519-dalek: * `SecretKey` has (in effect) been renamed to `SigningKey`. The name `SecretKey` is now an alias for `[u8; 32]`. * `SigningKey` is effectively a keypair, since it contains a public key as well. * `PublicKey` has been renamed to `VerifyingKey`. * The functions to extract a signing key and verifying key have been renamed as you might expect. * `ExpandedSecretKey` has been moved to `hasmat` and no longer implements `sign`. * `ExpanededSecretKey` now has as its elements a scalar and a hash prefix. * Various functions that took `&[u8]` now take `&[u8; N]`. * We no longer need a wrapper for older versions of rand. There is a single test in tor-keymgr that does not pass. I've marked it as ignore for now, in hopes that @gabi-250 can help me figure it out. This closes #808. There are several changes I want to make before we merge, however. They are marked with TODO DALEK.
* Use HandshakeType in Extend2 and CircuitExtender::beginJim Newsome2023-11-271-6/+12
|
* Add more reference links.Nick Mathewson2023-11-201-1/+5
|
* Improve documentation in/around DosParams extensionNick Mathewson2023-11-201-1/+11
| | | | | | It does not help that C tor has a set of parameters and a set of configuration options with exactly the same names which configure the same thing in two slightly different ways.
* Add a caret_int HandshakeType for HTYPE constantsJim Newsome2023-10-261-5/+21
|
* Change `CircId` to never be zeroJim Newsome2023-10-253-27/+40
| | | | | | | | | | This changes the internal representation to be `NonZeroU32` instead of just `u32`. Various places where a circuit ID is optional now use `Option<CircId>`. Fixes a bug in `CircIdRange::sample` that would previously return a circuit ID of 0, when the rng returned 0x8000_0000 for a low range.
* Convert StreamId to NonZeroU16Jim Newsome2023-10-251-36/+48
|
* tor-cell: Remove unused by_type() functionNeel Chauhan2023-10-131-10/+0
|
* Lower and downgrade a TODO about StreamID and NonZeroU16.Nick Mathewson2023-10-121-1/+6
|
* tor-cell: Add accessors for Begin.Nick Mathewson2023-09-271-0/+15
|
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-232-0/+2
|
* cell: Add accessors to IntroduceHandshakePayloadNick Mathewson2023-08-161-0/+15
|
* cell: Add accessors to Introduce2.Nick Mathewson2023-08-161-0/+17
|
* Merge branch 'more_introducing' into 'main'Nick Mathewson2023-08-162-3/+10
|\ | | | | | | | | Write more of IptEstablisher. See merge request tpo/core/arti!1510
| * cell: Add code to iterate over IntroEstablished extensionsNick Mathewson2023-08-151-1/+7
| |
| * cell, docs: Clarify what we mean by "Unrecognized".Nick Mathewson2023-08-151-2/+3
| |
* | Merge branch 'fix-weird-comment' into 'main'Ian Jackson2023-08-161-1/+1
|\ \ | |/ |/| | | | | doc: fix malformatted comment in SliceWriterError See merge request tpo/core/arti!1503
| * doc: fix malformatted comment in SliceWriterErrorEmil Engler2023-08-141-1/+1
| |
* | cell: make establish_intro accept impl<Into<HsMacKey>>Nick Mathewson2023-08-141-15/+14
|/ | | | | | | | | | | This allows us to allow passing in opaque HsMacKey objects, rather than untyped byte slices. Additionally, we now check both MAC and signature unconditionally, to avoid the large timing side-channel. The small timing side-channel of combining booleans with `&` is considered safe. Part of #993.
* Run add_warnings on all files.Nick Mathewson2023-08-041-2/+2
|
* Fix typosDimitris Apostolou2023-07-221-1/+1
|
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-103-0/+3
|
* Run add_warning to remove `missing_panics_doc` deny.Nick Mathewson2023-07-061-1/+0
| | | | Closes #950.
* lints: Run maint/add_warning to actually apply new lintsIan Jackson2023-06-211-0/+2
|
* tor-cell: Downgrade 2 TODO-HS to TODO-HSSNick Mathewson2023-06-162-2/+2
|
* tor-cell: HasRetryTime for IntroduceAckStatus: Confirm re CANT_RELAY (fmt)Ian Jackson2023-06-141-1/+1
| | | | | rustdoc insisted on misindenting this before, and now it insists on un-mis-indenting it.
* tor-cell: HasRetryTime for IntroduceAckStatus: Confirm re CANT_RELAYIan Jackson2023-06-141-1/+1
| | | | | Remove this todo as per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1246#note_2912104
* tor-cell: Add a doc comment for impl tor_error::HasRetryTime for ↵Ian Jackson2023-06-141-0/+4
| | | | IntroduceAckStatus
* tor-cell: impl HasRetryTime for IntroduceAckStatusIan Jackson2023-06-141-0/+14
|
* Merge branch 'tor-cell-todos' into 'main'Nick Mathewson2023-06-136-53/+9
|\ | | | | | | | | Resolve most TODO HS comments in tor-cell See merge request tpo/core/arti!1245
| * cell: Downgrade a couple more TODO HS comments.Nick Mathewson2023-06-132-3/+3
| |
| * cell: Remove relaycell::restrictNick Mathewson2023-06-132-35/+0
| | | | | | | | | | This module didn't have anything in it; nonetheless, removing it does count as an API break since it was public.
| * cell: Remove some TODOsNick Mathewson2023-06-133-10/+2
| | | | | | | | | | Yes, we still will need more accessors for onion services, but we can add them as we find the need.
| * cell: remove/localize "allow(dead-code)"Nick Mathewson2023-06-133-5/+4
| |
* | tor-cell: IntroduceAck: Add .success() function to give a ResultIan Jackson2023-06-131-0/+16
|/ | | | | | The type is a bit odd but this is a result of the underlying protocol. I don't feel like inventing `IntroduceAckSuccess` that contains only the extensions.
* proto: Convert MsgHandler API to expect a message, not a cell.Nick Mathewson2023-06-122-1/+19
| | | | Closes #887.
* cell: Add an accessor for the body of a Rendezvous2.Nick Mathewson2023-06-121-0/+6
|
* tor-cell: remove use of arrayrefNick Mathewson2023-06-012-6/+16
| | | | Closes #872
* cell: Make EstablishRendezvous contain a RendCookie.Nick Mathewson2023-05-231-5/+2
|
* cell: Make Introduce2::new testing-only.Nick Mathewson2023-05-171-1/+6
| | | | | | We never want to create one of these from its parts except when we are testing it; we only want to forward an Introduce1 message with a new command on it.
* cell: Record the text of an INTRODUCE2 headerNick Mathewson2023-05-171-9/+39
| | | | | We'll need to store this so that it can later on be used to complete the hs_ntor handshake.
* cell: extract introduce headers into a new type.Nick Mathewson2023-05-171-20/+42
| | | | | | | | We'll want this because our hs_ntor handshake requires access to an encoded version of the header independent from the actual encrypted message. part of #866.
* Change CircTarget::linkspecs() to return an encoded list.Nick Mathewson2023-05-101-3/+3
| | | | | | | | If we didn't do this, we would need to transfrom `EncodedLinkSpec`s into a `LinkSpec::Unrecognized`, which is not semantically right. What's more, every user of this API wants to consume encoded link specifiers, so encoding them early saves a little effort.
* Rename UnparsedLinkSpec => EncodedLinkSpecNick Mathewson2023-05-101-3/+3
|
* Move responsibility for linkspec sorting to CircTarget.Nick Mathewson2023-05-101-3/+1
| | | | | | This change is necessary so that we can build Extend2 messages that have their LinkSpecs appear in a verbatim order as provided in an INTRODUCE2 message or in a HS descriptor.
* Upgrade to bitflags 2.0Nick Mathewson2023-03-131-0/+1
| | | | | This version of bitflags now requires us to explicitly list the traits that we want to derive for our bit-flags structs.
* Serval rustdoc link fixes.Nick Mathewson2023-03-081-2/+2
|
* intro_payload: various doc fixes and TODOs from review.Nick Mathewson2023-03-081-4/+16
|
* tor-cell: Be a little more pedantic about INTRODUCE cell types.Nick Mathewson2023-03-081-3/+3
|
* tor-cell: Better describe the parts of intro payload.Nick Mathewson2023-03-081-3/+23
|