aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-netdoc/src/doc/hsdesc/desc_enc.rs
Commit message (Collapse)AuthorAgeFilesLines
* Upgrade cipher, aes, and ctr.Nick Mathewson2026-07-131-1/+1
|
* maint: Run maint/add_warning to deny string slicesClara Engler2026-06-091-0/+1
| | | | | | | | | | | | This commit executes maint/add_warning with the just added change to deny string slices except in tests. I recommend auditing this by checking out the previous commit followed by running the script yourself and then verifying that the diff is identical to this commit. This commit makes cargo clippy fail. We will add exceptions in the next commit.
* Upgrade rand crates to 0.10.Wesley Aptekar-Cassels2026-05-121-1/+1
| | | | | | | | | | | When the circ-padding feature is enabled, we use maybenot, which does not yet support rand 0.10. In the meantime, enabling this feature pulls in rand 0.9. This is not ideal, but should be okay as a temporary situation. This also replaces the use of ReseedingRng (which was removed in 0.10) with the reseeding_rng crate. This is somewhat less performant, but it should be okay.
* Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-061-1/+1
| | | | Run maint/add_warning
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-071-1/+1
| | | | | | | | | | | | | | First, run ``` git grep -l "^edition =" | xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;' ``` Second, manually verify that all Cargo.toml files have changed, and nothing else has changed. Third, run cargo fmt again.
* squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-181-1/+1
| | | | - The Rng::gen() functions have been renamed to Rng::random().
* tor-netdoc: Use the new "restricted discovery" terminology.Gabriela Moldovan2024-10-031-1/+1
| | | | Part of #1476
* Run maint/add_warning.Nick Mathewson2024-03-131-0/+1
|
* Fix typos in doc commentsTobias Stoeckmann2024-03-061-1/+1
|
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-231-0/+1
|
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-101-0/+1
|
* Conditionalise an importIan Jackson2023-06-281-0/+1
| | | | | Fixes a warning with cargo clippy --locked --offline --workspace --all-targets
* netdoc: Remove dead_code exception; add accessors.Nick Mathewson2023-06-261-2/+1
| | | | | | | | | | | | This commit removes some actual dead code and additionally adds some minimal accessors to HsDesc to expose some of its properties. (I'm trying to keep these minimal since it's not yet clear whether we want to expose more detail here.) Here we also make StoredHsDescMeta a conditional type that's only present when the new "hs-dir" feature is enabled. Neither relays nor clients need this: Only HsDirs will need it, when we finally implement relays.
* netdoc::doc::hsdesc changes to let us downgrade/remove allowsNick Mathewson2023-06-161-1/+1
|
* netdoc: unmark MAC_KEY_LEN as conjectural.Nick Mathewson2023-06-161-1/+1
| | | | | The value here is 32 bytes; I'm adding it to to the specification as torspec!141
* netdoc: remove a TODO about moving a module to where it already is.Nick Mathewson2023-06-161-2/+0
|
* tor-netdoc: remove use of arrayref.Nick Mathewson2023-06-011-3/+7
|
* Stop requiring the caller to supply `AuthClient`s.Gabriela Moldovan2023-03-311-0/+37
| | | | | | | | | | | | | | | | | | `AuthClient`s were originally meant to represent parsed `auth-client` lines. In !1070, this struct was repurposed for representing individual authorized clients in the HS descriptor encoder. However, hidden services will likely use a list of public keys to represent the authorized clients rather than a list of `AuthClient`s, as the information from an `AuthClient` (`client_id`, `iv`, `encrypted_cookie`) likely won't be immediately available to the hidden service. This change updates the HS descriptor encoder to represent authorized clients as a list of `curve25519::PublicKey`s. As such, it is now the responsibility of the encoder to create the `client_id`, `iv`, and `encrypted_cookie` using the available keys, the unencrypted descriptor cookie, and HS subcredential. Signed-off-by: Gabriela Moldovan <[email protected]>
* Add builder for encoding hidden service descriptors.Gabi Moldovan2023-03-241-4/+4
| | | | | | | | | | | | | | This introduces the `NetdocBuilder` trait described in `netdoc-builder.md` and a new `tor-netdoc::doc::hsdesc::build` module, which exports the `HsDescBuilder`. Hidden services will use `HsDescBuilder` to build and encode hidden service descriptors. There are several TODOs in the code that I'm planning to address separately. Partially addresses #745. Signed-off-by: Gabriela Moldovan <[email protected]>
* Define constants for `AuthClient` field lengths.Gabriela Moldovan2023-03-241-1/+10
| | | | | | | These are used in multiple places (and will also be used by the HS descriptor encoder later on), so let's make them named constants. Signed-off-by: Gabriela Moldovan <[email protected]>
* Turn two blocking TODOs in hsdesc into "TODO HS"Ian Jackson2023-03-211-1/+1
| | | | TODO HS is blocking for HS release, but not for CI.
* Rename DescEncNonce => HsDescEncNonceNick Mathewson2023-02-091-2/+2
|
* netdoc::hsdesc: Distinguish layer from document.Nick Mathewson2023-02-081-6/+6
|
* tor-hscrypto: Rename key types to correspond to new spec names.Nick Mathewson2023-02-081-2/+2
|
* Rename DescriptorCookie to DescEncNonceNick Mathewson2023-02-081-10/+8
| | | | | | (I think it's okay to omit the Hs here, since this type is not visible outside the hsdesc parsing code. I'll rename if others disagree.)
* netdoc: Rename/comment objects from middle_layer.Nick Mathewson2023-02-071-0/+2
|
* netdoc: Rename/comment objects from desc_encNick Mathewson2023-02-071-19/+34
|
* netdoc: Try to add a bunch of clarifying documentation.Nick Mathewson2023-02-071-1/+13
| | | | | In the process I found a couple of keys without identifiers in the spec.
* netdoc: Clear up a few typos in hsdesc comments and strings.Nick Mathewson2023-02-071-2/+2
|
* netdoc: Use correct size for descriptor encryption cookieNick Mathewson2023-02-071-2/+2
|
* netdoc: implement onion service descryptor encryptionNick Mathewson2023-02-071-5/+178
| | | | | This is tested via a round-trip check, and via a successful decryption of our example descriptor's outer layer.
* netdoc: Outline some basic types for encoding HsDescs.Nick Mathewson2023-01-061-0/+47