aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-netdoc/src/doc/hsdesc/build
Commit message (Collapse)AuthorAgeFilesLines
* tor-checkable: TimeBound: Make dangerously_into_parts return TimeRangeIan Jackson2026-07-231-1/+2
| | | | | It is better to return a more cooked type. `TimeRange` aka `TimeRangeBound<()>` is perfect for this.
* Use new TimeRangeBound name throughout the treeIan Jackson2026-07-161-2/+2
|
* netdoc: Add new capability negotiation pieces to hsdesc.Nick Mathewson2026-07-021-0/+93
| | | | | | | | The "flow-control" item is documented in proposal 324 section 9.1; there's a ticket (torspec#418) to document it. The "proto" item is documented at https://spec.torproject.org/rend-spec/hsdesc-encrypt.html#item:proto
* maint: Run maint/add_warning to deny string slicesClara Engler2026-06-093-0/+3
| | | | | | | | | | | | 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-123-8/+8
| | | | | | | | | | | 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.
* tor-cert: Ed25519CertBuilder: do builder fn renameIan Jackson2026-04-291-2/+2
| | | | | | Change all call sites. This completes the rename.
* tor-netdoc: encoder: Rename .object() method to .object_bytesIan Jackson2026-03-313-5/+5
| | | | | | | | | | | With the introduction of the derives for document encoding, we now have a trait ItemObjectEncodable. We will want a method on ItemEncoder that takes an ItemObjectEncodable, and that should be called `object` since it's a better approach than working ad-hoc with tor_bytes::Writeable. (For example, an ItemObjectEncodable knows its own label.) So, rename `object` to `object_bytes`.
* netdoc: Add missing docs for encode_pow_params()Gabriela Moldovan2025-12-011-0/+1
|
* tor-netdoc: Rename ItemArgument method to write_arg_ontoIan Jackson2025-11-261-3/+3
| | | | | | | tor_bytes also has a write_onto method. And types (especially utility types like `Ignored`) might conceivably implement both! No need for semver update since this was pub(crate) in the previous release.
* Merge branch 'bug2172' into 'main'Nick Mathewson2025-11-241-1/+1
|\ | | | | | | | | | | | | tor-llcrypto: Stop deriving Deref in CtByteArray Closes #2172 See merge request tpo/core/arti!3432
| * tor-llcrypto: Stop deriving Deref in CtByteArrayNeel Chauhan2025-11-241-1/+1
| |
* | Apply deferred rustfmt churnIan Jackson2025-11-103-4/+4
| |
* | tor-netdoc: Rename the `build` module to `encode`Ian Jackson2025-11-103-4/+4
| | | | | | | | | | The word "build" so often in Rust means builder pattern. This module contains functions for encoding.
* | Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-063-3/+3
|/ | | | Run maint/add_warning
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-073-14/+16
| | | | | | | | | | | | | | 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.
* Resolve clippy warnings from 1.83Nick Mathewson2025-05-131-3/+2
| | | | | Now that our MSRV is 1.83, clippy is happy to make more recommendations for us.
* squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-181-6/+6
| | | | - The Rng::gen() functions have been renamed to Rng::random().
* squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-181-1/+1
| | | | - `rand::thread_rng()` has been deprecated and renamed to `rand::rng()`
* Always use full path to rand::thread_rng().Nick Mathewson2025-03-181-2/+1
| | | | | This is partly for consistency, and partly to facilitate a global search-and-replace.
* Wrap ed25519-dalek types.Nick Mathewson2025-03-181-1/+0
| | | | | | | | | | | With this change, we'll no longer need to expose the types from dalek-cryptography as part of our API, and we'll have more freedom to switch ed25519 implementations, or to upgrade to a newer `rand` ahead of their schedule. Unlike with x25519-dalek, I had to tweak the API a bit: There's no way to get a &PublicKey out of a Keypair now, and implementing the old ed25519-dalek traits seemed unnecessary.
* PoW: Consolidate feature flags into a single flag.Wesley Aptekar-Cassels2024-11-251-9/+9
| | | | | | | | | | | | | | | | | This replaces the hs-pow, hs-pow-full, hs-pow-v1, pow-v1, and pow-full features with a single hs-pow-full feature. It's possible that in the future we will want to split different schemes into different features, but we can do that when it comes up. For now, having this as a single flag makes it clearer what's going on, since the previous thing was not actually expressive enough to capture some things we care about (like "at least one pow scheme is enabled" that works in a future-compatible way). This change is not semver breaking since it's a experimental feature. Related: #1751
* tor-netdoc: Error on PowParams::V1 when hs-pow-v1 is disabled.Wesley Aptekar-Cassels2024-11-251-2/+11
|
* tor-netdoc: Don't include pow_params in HsDesc when feature is disabled.Wesley Aptekar-Cassels2024-11-251-7/+6
|
* tor-netdoc: Support writing pow-params line.Wesley Aptekar-Cassels2024-11-251-0/+86
| | | | | | | I'm not particularly happy with the code that does the actual writing out of the pow-params line, in particular the error handling there seems very verbose. However, I don't know of a better way to structure it given that APIs I'm working with.
* tor-netdoc: Wrap some too-long comments and docs.Gabriela Moldovan2024-10-031-2/+3
|
* tor-netdoc: Use the new "restricted discovery" terminology.Gabriela Moldovan2024-10-031-6/+6
| | | | Part of #1476
* Run maint/add_warning.Nick Mathewson2024-03-133-0/+3
|
* Fix typos in commentsTobias Stoeckmann2024-03-061-1/+1
|
* hsdesc: Document why enc_key_cert signbit is always zero.Nick Mathewson2024-01-161-5/+8
| | | | | | Closes #1221. See torspec!240 for a corresponding spec change.
* tor-netdoc: Turn a TODO HSS into #1221.Gabriela Moldovan2024-01-111-1/+2
|
* tor-netdoc: Downgrade some TODO HSS to TODO.Gabriela Moldovan2024-01-111-1/+1
|
* llcrypto: Remove redundant re-exports in keymanip.Nick Mathewson2023-11-291-1/+1
| | | | (These types were all already re-exported from pk::ed25519.)
* Remove RngCompatExt.Nick Mathewson2023-11-293-9/+5
| | | | | | | | | | This code was needed with the old version of dalek-cryptography, which wasn't compatible with up-to-date versions of the `rand` crate(s). But now that we've upgraded, we can drop this. (We could have left it around and deprecated it, but we are already making a breaking change to tor-llcrypto by upgrading dalek-cryptography.)
* Convert to the latest versions of dalek-cryptographyNick Mathewson2023-11-293-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* tor-netdoc: Use the new HandshakeType enum to represent CREATE2 HTYPEs (fmt).Gabriela Moldovan2023-10-301-17/+21
|
* tor-netdoc: Use the new HandshakeType enum to represent CREATE2 HTYPEs.Gabriela Moldovan2023-10-301-12/+13
| | | | | | | | | | | Representing the supported HTYPEs as `HandshakeType`s instead of `u32`s makes it more difficult to pass in wrong/invalid values to `HsDescBuilder::create2_formats`. This also fixes a descriptor publisher bug spotted by @jnewsome, where the advertised CREATE2 HTYPEs included HTYPE `1`, which is actually supposed to be a reserved value. The publisher now only advertises the `NTOR` HTYPE (just like C Tor).
* Remove a broken rustdoc link and fix a typo.Nick Mathewson2023-10-271-3/+0
|
* tor-cert, tor-netdoc: Use EncodedEd25519Cert instead of Vec<u8>.Gabriela Moldovan2023-10-252-6/+5
|
* tor-netdoc: Remove now-unused blinded_id field.Gabriela Moldovan2023-10-251-6/+0
|
* tor-netdoc: Update HsDesc, HsDescOuter to accept the hs_desc_sign cert as an ↵Gabriela Moldovan2023-10-251-15/+16
| | | | | | | | | | argument. This will enable us to (eventually) the load the descriptor signing key cert from the keystore (as opposed to always recomputing it when building the `HsDesc`). Part of #1048
* tor-netdoc: Add helper function for computing the descriptor signing key cert.Gabriela Moldovan2023-10-251-12/+4
|
* tor-dirclient, tor-netdoc: Add TODO SPECs.Gabriela Moldovan2023-10-241-0/+3
|
* tor-netdoc: Use an unpadded base64 encoding for the signature.Gabriela Moldovan2023-10-241-3/+3
| | | | This is what the C Tor HsDirs want.
* Explain why we are sorting intro points.Nick Mathewson2023-10-161-0/+7
|
* Sort introduction point lists by ntor public key.Neel Chauhan2023-10-161-16/+18
| | | | Closes #1039
* Merge branch 'clippy' into 'main'Ian Jackson2023-08-233-0/+3
|\ | | | | | | | | clippy: Suppress needless_pass_by_value in tests See merge request tpo/core/arti!1535
| * Run maint/add_warning to add lint block everywhereIan Jackson2023-08-233-0/+3
| |
* | tor-netdoc: Fix clippy lints.Gabriela Moldovan2023-08-231-5/+5
| |
* | tor-netdoc: Remove redundant `IntroPointDesc` struct.Gabriela Moldovan2023-08-231-30/+2
|/ | | | | | | | | | | | This commit replaces `tor_netdoc::hsdesc::inner::IntroPointDesc` with the (almost identical) `tor_netdoc::hsdesc::IntroPointDesc`. The only difference between the two structs is that `inner::IntroPointDesc` wraps a `Vec<LinkSpec>` instead of a `Vec<EncodedLinkSpec>`. Since `EncodedLinkSpec` can be derived from `LinkSpec` (and vice-versa), and since `hsdesc::inner::IntroPointDesc` never made it in our public API, this commit also removes `hsdesc::inner::IntroPointDesc` in favour of `hsdesc::IntroPointDesc`.
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-103-0/+3
|