summaryrefslogtreecommitdiff
path: root/crates/tor-hscrypto
Commit message (Collapse)AuthorAgeFilesLines
* maint: bump minor versions of all published cratesSteven Engler2025-10-291-11/+11
| | | | | | | ```bash readarray -t publish < <(cargo metadata --format-version 1 | jq -r '.packages[] | select((.id | startswith("path+file:///")) and (.rust_version != null) and (.publish == null or .publish == true or .publish != [])) | .name') for package in "${publish[@]}"; do echo "$package:"; cargo set-version --bump minor -p "$package"; done ```
* Bump MSRV from 1.85.1 to 1.86Clara Engler2025-10-211-1/+1
|
* Merge branch 'release-1.6.0-remove-semver-md' into 'main'Ian Jackson2025-10-061-1/+0
|\ | | | | | | | | release: Remove old semver.md files. See merge request tpo/core/arti!3323
| * release: Remove old semver.md files.Wesley Aptekar-Cassels2025-10-021-1/+0
| |
* | release: Bump versions.Wesley Aptekar-Cassels2025-10-021-11/+11
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because we've updated our MSRV, we must bump the minor version for every package. This was done as follows: cargo set-version -p arti 1.6.0 cargo set-version -p oneshot-fused-workaround 0.4.0 cargo set-version -p slotmap-careful 0.4.0 cargo set-version -p test-temp-dir 0.5.0 cargo set-version -p fslock-guard 0.4.0 cargo set-version -p hashx 0.5.0 cargo set-version -p equix 0.4.0 cargo set-version -p caret 0.7.0 cargo set-version -p fs-mistrust 0.12.0 cargo set-version -p safelog 0.6.0 cargo set-version -p retry-error 0.8.0 xargs -I P <<END cargo set-version -p P 0.35.0 tor-basic-utils tor-error tor-general-addr tor-geoip tor-rtcompat tor-rtmock tor-async-utils tor-config tor-config-path tor-rpc-connect tor-log-ratelim tor-rpcbase tor-memquota tor-units tor-llcrypto tor-bytes tor-protover tor-checkable tor-cert tor-key-forge tor-hscrypto tor-socksproto tor-linkspec tor-cell tor-proto tor-netdoc tor-consdiff tor-netdir tor-relay-selection tor-persist tor-keymgr tor-chanmgr tor-ptmgr tor-dircommon tor-guardmgr tor-circmgr tor-dirclient tor-dirmgr tor-dirserver tor-hsclient tor-hsservice tor-hsrproxy tor-relay-crypto arti-client arti-relay arti-rpcserver arti-ureq arti-rpc-client-core END
* release: Update semver.md files.Wesley Aptekar-Cassels2025-10-011-0/+1
|
* Remove "doc_auto_cfg" incantation from all crates.Nick Mathewson2025-09-291-1/+1
| | | | This feature has been removed from nightly, in favor of doc_cfg.
* tor-hscrypto: derive_deftly is mandatory againhashcatHitman2025-09-232-4/+3
| | | | | | | I don't know why this was breaking rust-recent-async-std-rustls, but oh well. Signed-off-by: hashcatHitman <[email protected]>
* tor-(hs|ll)crypto: export cteq macros correctlyhashcatHitman2025-09-233-65/+11
| | | | | | | | | | The macros to deftly derive `ConstantTimeEq` and `PartialEq` (for `ConstantTimeEq`) are now only defined in `tor-llcrypto` and exported. The macro to deftly derive `ConstantTimeEq` is now struct only and uses `subtle::Choice::from(1)` for improved clarity. Signed-off-by: hashcatHitman <[email protected]>
* tor-(hs|ll)crypto: deftly derive ConstantTimeEqhashcatHitman2025-09-233-292/+121
| | | | | | | | | | | | | | | | | This is my initial attempt at deriving ConstantTimeEq and PartialEq. This includes the previously missed HsSvcNtorKeypair and HsClientDescEncKeypair types. In tor-llcrypto, a few implementations still had to be done by hand, and some types which previously derived normal PartialEq now derive it with ConstantTimeEq. I could not figure out how to properly set up the macros such that they could be used both in the current crate and in others, so for the moment they are duplicated. Just so I can get feedback. Ideally, this will be replaced with a better solution before merge. Signed-off-by: hashcatHitman <[email protected]>
* tor-hscrypto: constant time PartialEq for keyshashcatHitman2025-09-161-1/+282
| | | | | | | | | | | | | | | | | | | | | | | | | | Implemented `subtle::ConstantTimeEq` for all of the following types: - `pk::HsIdKey` - `pk::HsIdKeypair` - `pk::HsBlindIdKey` - `pk::HsBlindIdKeypair` - `pk::HsDescSigningKey` - `pk::HsDescSigningKeypair` - `pk::HsIntroPtSessionIdKey` - `pk::HsIntroPtSessionIdKeypair` - `pk::HsSvcNtorKey` - `pk::HsSvcNtorSecretKey` - `pk::hs_client_intro_auth::HsClientIntroAuthKey` - `pk::hs_client_intro_auth::HsClientIntroAuthKeypair` - `pk::HsClientDescEncKey` - `pk::HsClientDescEncSecretKey` - `pk::HsSvcDescEncKey` - `pk::HsSvcDescEncSecretKey` - `pk::HsSvcDescEncKeypair` `PartialEq` has also been implemented for all listed types, using the constant time comparison under the hood. Signed-off-by: hashcatHitman <[email protected]>
* Bump MSRV from 1.85 to 1.85.1Nick Mathewson2025-09-091-1/+1
| | | | Closes #2107
* Update to derive-deftly 1.3.0Ian Jackson2025-09-021-1/+1
|
* Bump the minor version of every published crate except for `arti`.Nick Mathewson2025-08-281-11/+11
| | | | | | | | Per policy, we bump the minor version of every tor-*, arti-* crate on each release. We have updated our MSRV, so we're treating this as a breaking change for our non-(arti/tor)-prefixed crates too.
* tor-hscrypto: change redacted `HsId` from "???" to "[…]"Steven Engler2025-08-251-2/+2
| | | | | | | | | | | | | | Before: ```text INFO tor_hsservice: Generated a new identity for service bar: ???mad.onion ``` After: ```text INFO tor_hsservice: Generated a new identity for service foo: […]2qd.onion ```
* docs: Add notes about hs-pow-full using LGPL deps.Wesley Aptekar-Cassels2025-08-141-1/+1
|
* tor-hsservice: Add disable_pow_compilation option.Wesley Aptekar-Cassels2025-08-131-0/+5
| | | | | | I'm not 100% on this being here, it seems like it might want to be a option for all onion services, rather than per-service. However, this is good enough for now.
* Fix warnings and errors from edition 2024.Nick Mathewson2025-08-071-3/+2
| | | | | | | | | | The two main causes of errors were: - Since some of the lifetime rules have changed, we no longer need to do as many "bind a variable and immediately return it" patterns, and so clippy now warns about them. - We needed to adjust the explicit captures (`use<...>`) in a couple of our RPIT instances.
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-075-54/+62
| | | | | | | | | | | | | | 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.
* Merge branch 'prop362-fixups' into 'main'wesleyac2025-08-051-0/+1
|\ | | | | | | | | Fix a few TODOs for PoW See merge request tpo/core/arti!3106
| * tor-hsservice: Persist suggested_effort.Wesley Aptekar-Cassels2025-08-051-0/+1
| |
* | Merge branch 'msrv-1.85' into 'main'Nick Mathewson2025-08-051-2/+2
|\ \ | |/ |/| | | | | | | | | Bump MSRV to Rust 1.85 Closes #2095 See merge request tpo/core/arti!3128
| * Bump to hex-literal 1.0Nick Mathewson2025-08-051-1/+1
| | | | | | | | | | (We were unable to do this before, since it required a rust version we didn't have.)
| * Set MSRV to 1.85.Nick Mathewson2025-08-051-1/+1
| |
* | Remove semver.md files, post-release.Ian Jackson2025-08-051-1/+0
|/
* Bump version of tor-basic-utilsIan Jackson2025-08-051-2/+2
| | | | This was accidentally omitted from my version bump script.
* Version bumps for 1.4.6Ian Jackson2025-08-051-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Made with the following shell script: export CARGO='nailing-cargo -Eu' # Non-functional changes only maint/bump_nodep hashx # Special $CARGO set-version -p arti 1.4.6 # Additional features, no breaking changes, depended on in tree $CARGO set-version -p safelog 0.4.8 # Unconditional bump to 0.33.0 xargs -I P <<END $CARGO set-version -p P 0.33.0 tor-error tor-general-addr tor-geoip tor-rtcompat tor-rtmock tor-async-utils tor-config tor-config-path tor-rpc-connect tor-log-ratelim tor-rpcbase tor-memquota tor-units tor-llcrypto tor-bytes tor-protover tor-checkable tor-cert tor-key-forge tor-hscrypto tor-socksproto tor-linkspec tor-cell tor-proto tor-netdoc tor-consdiff tor-netdir tor-relay-selection tor-persist tor-chanmgr tor-ptmgr tor-guardmgr tor-circmgr tor-dirclient tor-dirmgr tor-keymgr tor-hsclient tor-hsservice tor-hsrproxy tor-relay-crypto arti-client arti-relay arti-rpcserver arti-ureq arti-rpc-client-core END
* Bump derive-deftly to 1.2.0Ian Jackson2025-08-041-1/+1
| | | | No upstream changes that break our code.
* Use new DisplayRedacted/DebugRedacted code for HsId.Nick Mathewson2025-07-312-28/+23
| | | | Closes #2012.
* tor-hscrypto: fix typostcyrus2025-07-232-3/+3
|
* Typo fixes (automatic and hand-verified)Nick Mathewson2025-07-091-1/+1
| | | | Made with https://crates.io/crates/typos-cli
* Bump all the unstable tor- and arti- crates to 0.32.0.Gabriela Moldovan2025-07-071-9/+9
| | | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.32.0 done ```
* Bump the versions of the non-{arti-,tor-} crates.Gabriela Moldovan2025-07-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The non-{arti-,tor-} crates are: ``` ./maint/list_crates | rg -v '^(tor|arti)' oneshot-fused-workaround slotmap-careful test-temp-dir fslock-guard hashx equix caret fs-mistrust safelog retry-error ``` We split them in the following categories: * crates with no changes (no version bumps): None ``` maint/changed_crates -v "arti-v$LAST_VERSION" 2>&1 >/dev/null | grep -i "no change" | grep -v '\(tor\|arti\)-' ``` * crates that only have non-functional changes (bump the patch version): - oneshot-fused-workaround - slotmap-careful - test-temp-dir - fslock-guard - hashx - equix - caret - safelog - retry-error * crates where APIs were broken (bump minor): - fs-mistrust (the implicit once_cell feature was removed) The bumps from this commit were created using this script: ``` PATCH=" oneshot-fused-workaround slotmap-careful test-temp-dir fslock-guard hashx equix caret safelog retry-error " for crate in $PATCH; do cargo set-version --bump patch -p $crate; done MINOR=" fs-mistrust " for crate in $MINOR; do cargo set-version --bump minor -p $crate; done ```
* Temporarily suppress mismatched_lifetime_syntaxes.Gabriela Moldovan2025-07-071-0/+1
| | | | See #2060.
* Upgrade to derive-deftly 1.1.0.Gabriela Moldovan2025-07-071-1/+1
| | | | | | I had to also bump `toml` to `0.8.23`, because `toml 0.8.22` is incompatible with `serde_spanned 0.6.9` (which is automatically pulled in because of the d-d upgrade).
* release: Bump all tor-/arti- crates to 0.31.0.Alexander Hansen Færøy2025-06-051-9/+9
| | | | | | | | This was done using: for crate in $(./maint/list_crates | grep -P '^tor-|^arti-'); do cargo set-version -p $crate 0.31.0 done
* release: Bump crates non-arti/non-tor crates with functional changes.Alexander Hansen Færøy2025-06-051-1/+1
| | | | | | | | This is done using: cargo set-version --bump patch -p fs-mistrust cargo set-version --bump patch -p equix cargo set-version --bump patch -p fslock-guard
* tor-hsservice: Make PowManager persist state.Wesley Aptekar-Cassels2025-05-273-2/+8
|
* tor-hscrypto: Implement Display and FromStr for Seed.Wesley Aptekar-Cassels2025-05-272-1/+29
| | | | | This is convenient for formatting filenames for the PoW nonce replay log.
* tor-hsservice: Initial parts of PowManager.Wesley Aptekar-Cassels2025-05-272-2/+2
| | | | | | | This adds PowManager, as described in doc/dev/notes/service-side-pow.md, hooks it into IptManager and Publisher, and adds code to publish and rotate seeds, and to keep a updated list of Verifier instances for currently active seeds.
* ./maint/cargo_sort: Run cargo-sort on the entire workspace.Gabriela Moldovan2025-05-271-5/+9
| | | | | | | | | | | | | | | | | | | The [latest version] of `cargo-sort` is more opinionated than the previous one, and is now causing the `rust-checks` job to fail on `main`. This commit applies the fixes needed to satisfy the new `cargo-sort` rules. These changes were generated by running `cargo sort --workspace` several times, until `cargo sort --check --workspace` finally succeeded (it couldn't fix all the errors in one go, for some reason). I have omitted the changes `cargo-sort` made to the top-level `Cargo.toml`, to preserve the topological ordering of the workspace members. Closes #2014 [latest version]: https://github.com/DevinR528/cargo-sort/blob/f066ae80e5e6f5c1d8f0e2b8099461dcb97d9656/changelog.md#200
* All crates: bump rust-version to 1.83.Nick Mathewson2025-05-131-1/+1
|
* release: Bump all unstable tor/arti crates to 0.30.0Wesley Aptekar-Cassels2025-05-011-9/+9
| | | | | | | | ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.30.0 done ```
* Update rand requirement to 0.9.1Nick Mathewson2025-04-291-1/+1
| | | | | (This is going to be a _requirement_, since rand 0.9.1 has a behavioral change from 0.9.0)
* Run cargo update.Wesley Aptekar-Cassels2025-04-291-1/+1
| | | | | I updated everything except rand, because the new version of rand interacts with #1903, thus requiring more care.
* Bump all the unstable tor- and arti- crates to 0.29.0.Gabriela Moldovan2025-03-311-9/+9
| | | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.29.0 done ```
* Bump the versions of the non-{arti-,tor-} crates.Gabriela Moldovan2025-03-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The non-{arti-,tor-} crates are: ``` ./maint/list_crates | rg -v '^(tor|arti)' oneshot-fused-workaround slotmap-careful test-temp-dir fslock-guard hashx equix caret fs-mistrust safelog retry-error ``` We split them in the following categories: * crates with no changes (no version bumps): ``` maint/changed_crates -v "arti-v$LAST_VERSION" 2>&1 >/dev/null | grep -i "no change" | grep -v '\(tor\|arti\)-' oneshot-fused-workaround: No change. slotmap-careful: No change. fslock-guard: No change. caret: No change. retry-error: No change. ``` * crates that only have non-functional changes (bump the patch version): - test-temp-dir - equix - fs-mistrust - safelog * crates where APIs were broken (bump minor): - hashx (`RngCore` impl for `SipRand`) The bumps from this commit were created using this script: ``` PATCH=" test-temp-dir equix fs-mistrust safelog " for crate in $PATCH; do cargo set-version --bump patch -p $crate; done MINOR=" hashx " for crate in $MINOR; do cargo set-version --bump minor -p $crate; done ```
* squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-183-4/+4
| | | | - The Rng::gen() functions have been renamed to Rng::random().
* squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-181-1/+1
| | | | - The Standard distribution has been renamed to StandardUniform.
* squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-181-1/+1
| | | | - The rand::distributions module has been renamed to rand::distr