summaryrefslogtreecommitdiff
path: root/crates/tor-cell
Commit message (Collapse)AuthorAgeFilesLines
* Bump crate versions that have breaking changesNick Mathewson2023-03-311-1/+1
| | | | | | | | | | These crates have had breaking changes. They are pre-1.0, so they get a minor bump. ``` tor-basic-utils tor-config ```
* Bump patchlevel on crates with non-breaking changesNick Mathewson2023-03-311-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For these crates, the changes are nontrivial, so we _do_ bump the versions on which their dependent crates depend. Fortunately, since they are all pre-1.0, we don't need to distinguish semver-additions from other changes. (Except for arti, which _is_ post-1.0, but gets a patchlevel bump anyway.) These are unstable crates with breaking changes: ``` tor-hscrypto tor-hsclient ``` These have new or extended APIs: ``` safelog tor-bytes tor-cell tor-linkspec tor-llcrypto tor-proto tor-cert arti-client ``` These have new unstable APIs or features: ``` tor-netdoc tor-circmgr (also broke some unstable APIs) arti (is post-1.0) ``` These have bugfixes only: ``` caret tor-dirmgr ```
* Upgrade to bitflags 2.0Nick Mathewson2023-03-132-1/+2
| | | | | 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
|
* tor-cell: Add code for the payload of an hs-ntor handshake.Nick Mathewson2023-03-064-0/+192
| | | | | | (This is the encrypted information inside the INTRODUCE2 cell; it's used by the client to tell the service where to find its rendezvous point.)
* Merge branch 'rename_rend_message' into 'main'Nick Mathewson2023-03-011-15/+18
|\ | | | | | | | | tor-cell: Rename Rendezvous*::message to handshake_info. See merge request tpo/core/arti!1045
| * tor-cell: Rename Rendezvous*::message to handshake_info.Nick Mathewson2023-03-011-15/+18
| | | | | | | | Follow-up from !1038
* | tor-cell: Use a match when checking auth_key_typeNick Mathewson2023-03-011-6/+8
| |
* | tor_cell: Use nested readers and writers for EstablishIntroNick Mathewson2023-03-011-18/+12
| |
* | tor-cell: tweak comments on EstablishIntro members.Nick Mathewson2023-03-011-2/+2
| |
* | Introduce a constant for the length of the output of hs_mac()Nick Mathewson2023-03-011-3/+3
| |
* | tor-cell: Rename EstablishIntro{Body => Details}Nick Mathewson2023-03-012-12/+12
| |
* | tor-cell: Fix compilation for fuzzersNick Mathewson2023-03-013-4/+5
| | | | | | | | | | (I also ran them a couple billion iterations, and didn't hit any bugs.)
* | tor-cell: Make EstablishIntro do signaturesNick Mathewson2023-03-013-60/+302
|/ | | | | | | | | | | | | | | | The old code parsed and encoded a signature and a mac... but there was no way to actually set them properly. Now EstablishIntro is built around an EstablishIntroBody, and has the ability to check signatures and macs. Because there is no way to handle one of these messages if we can't check the signature, we no longer accept unrecognized `auth_key` types in this message. I've added a test to make sure that we can validate a message from the C tor implementation, and a test to make sure we can validate our own cells. I also had to modify the previous tests so that their keys were well-formed.
* Change several cfgs to refer to new feature names.Nick Mathewson2023-02-283-17/+17
|
* Mark new tests as onion-service-onlyNick Mathewson2023-02-281-0/+3
|
* tor-cell: Support extensions in INTRODUCE{1,2}Nick Mathewson2023-02-282-22/+26
|
* tor-cell: Implement IntroduceAck and IntroEstablishedNick Mathewson2023-02-282-19/+104
| | | | | These are fairly simple, since the bulk of them is just an extension list with no supported extensions.
* tor-cell: Implement rendezvous1 and rendezvous2.Nick Mathewson2023-02-282-4/+60
|
* Remove semver.md files now that 1.1.2 is out.Nick Mathewson2023-02-281-12/+0
|
* Patchlevel bumps for remaining changed crates.Nick Mathewson2023-02-281-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | These crates have had small code changes, but no API additions: tor-config tor-socksproto tor-cert tor-chanmgr tor-ptmgr tor-guardmgr tor-circmgr tor-dirclient tor-dirmgr arti tor-hsservice tor-congestion These crates have had API extensions: fs-mistrust tor-llcrypto tor-bytes tor-checkable tor-linkspec tor-netdoc tor-persist arti-client
* Bump tor-units version for breaking change.Nick Mathewson2023-02-281-1/+1
| | | | | | | | (The breaking change was removing `as_days()` from IntegerMinutes.) We are _not_ calling this a downstream-api breaking change, per discussion at https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1012?commit_id=bb2ab7c2a3e0994bb438188511688b5b039cae29#note_2876819
* Bump patch-versions for breaking changes in tor-hs{crypto,client}Nick Mathewson2023-02-281-1/+1
| | | | | | These are API breaks, but the crates themselves are currently 100% experimental, so there's no need to bump the minor versions according to our semver rules.
* Bump minor versions for significant breaking changes.Nick Mathewson2023-02-281-1/+1
| | | | This includes tor-cell, tor-proto, and tor-netdir.
* Rename onion-* cargo features to hs-* in tor-* cratesIan Jackson2023-02-285-20/+21
| | | | Fixes #756
* Rearrange cfg_attr in relaycell::msgNick Mathewson2023-02-211-2/+2
| | | | | docsrs wants to find its `cfg_attr(docsrs...)` line after the `cfg()` line.
* Merge branch 'hs-cells-1' into 'main'Nick Mathewson2023-02-167-490/+689
|\ | | | | | | | | Start refactoring hs cell implementations See merge request tpo/core/arti!1020
| * Mark a quoted block as text, so doctest ignores it.Nick Mathewson2023-02-161-1/+1
| |
| * Add a TODO about combining several macros and patternsNick Mathewson2023-02-161-0/+4
| |
| * Make a comment more accurateIan Jackson2023-02-161-1/+3
| |
| * tor-cell: Use a more generic mechanism for managing extensionsNick Mathewson2023-02-154-79/+264
| | | | | | | | | | | | | | | | | | | | Several HS message types have an extension list type. They all use the same framing for extensions, but each of them has separate extension types and separate extension namespaces. This commit simplifies establish_intro a little, and adds support for maintaining unrecognized extension types--at the expense of some new internal code.
| * tor-cell: Extract establish-intro into its own module.Nick Mathewson2023-02-154-215/+223
| | | | | | | | | | | | | | Some of the HS message types have a lot of dependent types, like extensions and options for those extensions, and so on. Except when those extensions are portable across cell types, it makes sense to put them in their own modules.
| * tor-cell: rename onion_service module to hsNick Mathewson2023-02-154-7/+7
| |
* | tor-cell: add a TODO comment about simplifying Body away.Nick Mathewson2023-02-152-0/+8
| |
* | tor-cell: Add another debug_assert to relay cell encodingNick Mathewson2023-02-151-3/+6
| |
* | slicewriter: rename a local variable.Nick Mathewson2023-02-151-4/+4
| |
* | Move slicewriter to tor-cell and make it private.Nick Mathewson2023-02-153-1/+137
| | | | | | | | Also, add some comments about how it is likely to change.
* | tor-cell: Add RelayCell::into_msg.Nick Mathewson2023-02-151-0/+4
| |
* | tor-cell: Implement {Relay,Chan}Msg for every body typeNick Mathewson2023-02-153-5/+97
| | | | | | | | | | This will make it ergonomic to decode a single body type without having to declare a variant that accepts only a single message.
* | tor-cell: Note an opportunity for future optimizationNick Mathewson2023-02-151-0/+5
| |
* | tor-cell: Add a new UnparsedRelayCellNick Mathewson2023-02-152-2/+60
| | | | | | | | | | | | We'll use this to router relay messages on a circuit to the appropriate stream, and hand them to that stream, without parsing the message until the stream has been determined.
* | tor-cell: Refactor relay cells to copy much lessNick Mathewson2023-02-155-42/+70
|/ | | | | | | | | | | | | 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.
* tor-cell: Return a useful error when restrist_msg rejects a command.Nick Mathewson2023-02-091-2/+3
|
* Change tor_bytes::Error::BadMessage to a Cow.Nick Mathewson2023-02-0910-34/+51
| | | | | | | | | | Actually, to avoid making a breaking change, I'm deprecating BadMessage and creating a new InvalidMessage variant that takes a Cow. This way I don't need to track every crate that re-exposes tor_bytes::Error and call this a breaking change in those. Making this change will allow tor_bytes errors to be much more helpful.
* tor-cell: Re-export paste so restrict_msg can work outside the crate.Nick Mathewson2023-02-091-3/+3
|
* tor-cell: Remove chancell::msg::Body::into_message.Nick Mathewson2023-02-091-52/+1
| | | | | It's now redundant, since `restricted_msg!` defines From and Into for us.
* tor-cell: Make RelayEarly a separate type.Nick Mathewson2023-02-094-8/+32
| | | | This allows us to remove a shenanigan from `restricted_msg!{}`.