summaryrefslogtreecommitdiff
path: root/crates/tor-hscrypto
Commit message (Collapse)AuthorAgeFilesLines
* Bump arti- and tor- crates to 0.23.0Nick Mathewson2024-09-301-7/+7
| | | | | | | | | | | | | | Per our policy, every one of these gets a minor bump. Generated with: ``` for crate in $(./maint/list_crates | grep '^\(tor\|arti\)-' ); do cargo set-version --bump minor -p $crate; done ``` (Note the use of `-` at the end end of the grep pattern to prevent matching the `arti` crate.)
* Minor bumps on non-tor/arti cratesNick Mathewson2024-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These crates are not in the tor/arti namespace, but we have given them MSRV bumps: ``` oneshot-fused-workaround slotmap-careful fslock-guard hashx equix caret fs-mistrust safelog test-temp-dir retry-error ``` We are counting this as a breaking change. Since all of these crates are at 0.x.x, we have indicated the breaking change with a minor version bump. This commit was generated with the following script: ``` BUMPS=" oneshot-fused-workaround slotmap-careful fslock-guard hashx equix caret fs-mistrust safelog test-temp-dir retry-error " for crate in $BUMPS; do cargo set-version --bump minor -p $crate; done ```
* Merge branch 'msrv-1.77-and-rusqlite-update' into 'main'David Goulet2024-09-261-1/+1
|\ | | | | | | | | Upgrade MSRV to 1.77 , and rusqlite to 0.32.1 See merge request tpo/core/arti!2451
| * Upgrade MSRV to 1.77Nick Mathewson2024-09-251-1/+1
| | | | | | | | This will allow us to upgrade to the latest version of rusqlite.
* | Upgrade to derive_more version 1.0.0Nick Mathewson2024-09-251-1/+1
|/ | | | | | The `derive_more` crate broke backward compatibility with this version, so this change involved quite a few manual fixups. With luck, they'll keep compatibility for some while in the future.
* Bump MSRV from 1.70 to 1.75.Wesley Aptekar-Cassels2024-09-161-1/+1
|
* tor_hsservice: add `impl From<&FooPublicKeySpecifier> for ↵Adam Joseph F0B74D717CDE8412A3E0D4D5F29AC8080DA8E1E02024-09-091-0/+12
| | | | | | | | | | | | | FooKeypairSpecifier` instances This adds the following trivial `From` instances: - tor_hsservice: impl From<&HsIdPublicKeySpecifier> for HsIdKeypairSpecifier - tor_hsservice: impl From<&BlindIdPublicKeySpecifier> for BlindIdKeypairSpecifier - tor_hscrypto::pk: impl From<HsBlindIdKeypair> for HsBlindIdKey - tor_llcrypto::pk::ed25519: impl From<ExpandedKeypair> for PublicKey - tor_keymgr::mgr: impl From<TestKey> for TestPublicKey - tor::hscrypto::pk: impl From<HsIdKeypair> for HsIdKey
* Bump all the unstable tor- and arti- crates to 0.22.0.Gabriela Moldovan2024-09-031-7/+7
| | | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.22.0 done ```
* tor-hscrypto: Implement Eq for HsClientDescEncKey.Gabriela Moldovan2024-08-051-0/+2
| | | | Needed because such keys will be stored in the `OnionServiceConfig`.
* Bump versions for tor- and arti- crates to 0.21.0Nick Mathewson2024-08-011-7/+7
| | | | | | | | | | This is the result of: ``` for crate in $( ./maint/list_crates |grep '^\(tor\|arti-\)' ); do cargo set-version -p $crate 0.21.0 done ```
* tor-hscrypto: Use collect_tuple to avoid unnecessary Vec allocation.Gabriela Moldovan2024-07-081-6/+3
|
* tor-hscrypto: Remove HsClientDescKeyParseError's HasKind impl.Gabriela Moldovan2024-07-081-12/+0
| | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2246#note_3045656
* tor-hscrypto: Implement FromStr for HsClientDescEncKey.Gabriela Moldovan2024-07-081-3/+149
| | | | | | | | | | | | | | We will use this impl for parsing the authorized clients of a hidden service running in "restricted discovery" mode. NB: "Restricted discovery" is the new terminology for "services that require client authorization", i.e. services that implement "client authorization" as described in rend-spec HS-DESC-ENC[0]. Note we haven't fully transitioned to the new terminology yet (see #1476). Part of #1292 [0]: https://spec.torproject.org/rend-spec/hsdesc-encrypt.html#HS-DESC-SECOND-LAYER
* tor-hscrypto: Remove unnecessary Display wrapper.Gabriela Moldovan2024-07-081-17/+5
| | | | | | | | | | | I don't think we need a separate wrapper type for displaying `HsClientDescEncKey` keys in the "C Tor format" (`<auth-type>:<key-type>:<base32-encoded-public-key>`). I think this should be the canonical string representation of `HsClientDescEncKey`, so I'm removing the `display_authorized_client` function and corresponding `DisplayAuthorizedHsClientDescEncKey` wrapper type.
* tor-hscrypto: Add helper for encoding client auth keys in C Tor format.Gabriela Moldovan2024-06-271-0/+23
| | | | | | | This will enable us to implement the `arti hsc` client subcommand for generating client auth keys (#1281). Closes #1291
* Update versions of 0.x tor-* and arti-* cratesIan Jackson2024-06-271-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nailing-cargo -uE set-version -p arti-client 0.20.0 nailing-cargo -uE set-version -p arti-relay 0.20.0 nailing-cargo -uE set-version -p arti-rpcserver 0.20.0 nailing-cargo -uE set-version -p tor-async-utils 0.20.0 nailing-cargo -uE set-version -p tor-basic-utils 0.20.0 nailing-cargo -uE set-version -p tor-bytes 0.20.0 nailing-cargo -uE set-version -p tor-cell 0.20.0 nailing-cargo -uE set-version -p tor-cert 0.20.0 nailing-cargo -uE set-version -p tor-chanmgr 0.20.0 nailing-cargo -uE set-version -p tor-checkable 0.20.0 nailing-cargo -uE set-version -p tor-circmgr 0.20.0 nailing-cargo -uE set-version -p tor-config 0.20.0 nailing-cargo -uE set-version -p tor-consdiff 0.20.0 nailing-cargo -uE set-version -p tor-dirclient 0.20.0 nailing-cargo -uE set-version -p tor-dirmgr 0.20.0 nailing-cargo -uE set-version -p tor-error 0.20.0 nailing-cargo -uE set-version -p tor-geoip 0.20.0 nailing-cargo -uE set-version -p tor-guardmgr 0.20.0 nailing-cargo -uE set-version -p tor-hsclient 0.20.0 nailing-cargo -uE set-version -p tor-hscrypto 0.20.0 nailing-cargo -uE set-version -p tor-hsrproxy 0.20.0 nailing-cargo -uE set-version -p tor-hsservice 0.20.0 nailing-cargo -uE set-version -p tor-keymgr 0.20.0 nailing-cargo -uE set-version -p tor-linkspec 0.20.0 nailing-cargo -uE set-version -p tor-llcrypto 0.20.0 nailing-cargo -uE set-version -p tor-log-ratelim 0.20.0 nailing-cargo -uE set-version -p tor-memquota 0.20.0 nailing-cargo -uE set-version -p tor-netdir 0.20.0 nailing-cargo -uE set-version -p tor-netdoc 0.20.0 nailing-cargo -uE set-version -p tor-persist 0.20.0 nailing-cargo -uE set-version -p tor-proto 0.20.0 nailing-cargo -uE set-version -p tor-protover 0.20.0 nailing-cargo -uE set-version -p tor-ptmgr 0.20.0 nailing-cargo -uE set-version -p tor-relay-selection 0.20.0 nailing-cargo -uE set-version -p tor-rpcbase 0.20.0 nailing-cargo -uE set-version -p tor-rtcompat 0.20.0 nailing-cargo -uE set-version -p tor-rtmock 0.20.0 nailing-cargo -uE set-version -p tor-socksproto 0.20.0 nailing-cargo -uE set-version -p tor-units 0.20.0 Each of which runs a rune like cargo set-version --offline -p tor-units 0.20.0
* Update to itertools 0.13.0Ian Jackson2024-06-251-1/+1
| | | | | | | No code changes needed. Precisely nailing-cargo -Eu upgrade --incompatible -p itertools
* Bump all the unstable tor- and arti- crates to 0.19.Gabriela Moldovan2024-06-051-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The unstable crates are: - tor-error - tor-config - tor-units - tor-geoip - tor-rtcompat - tor-rtmock - tor-log-ratelim - tor-rpcbase - tor-memquota - tor-llcrypto - tor-protover - tor-bytes - tor-hscrypto - tor-socksproto - tor-checkable - tor-cert - 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 - arti-client - arti-rpcserver - arti-hyper - tor-basic-utils - tor-async-utils Done using ``` for p in "${unstable[@]}"; do cargo set-version -p $p 0.19; done ``` where `unstable` contains the list above
* Re-run maint/add_warning.Nick Mathewson2024-05-061-2/+2
| | | | This commit is automatically generated.
* Bump versions of 0.x tor-* and arti-* cratesIan Jackson2024-04-301-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for p in `cat ../u`; do cargo set-version --locked --offline -p $p; done where u contains tor-basic-utils tor-async-utils tor-error tor-config tor-units tor-geoip tor-rtcompat tor-rtmock tor-log-ratelim tor-rpcbase tor-memquota tor-llcrypto tor-protover tor-bytes tor-hscrypto tor-socksproto tor-checkable tor-cert 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 arti-client arti-rpcserver arti-hyper
* remove unused dependenciestrinity-1686a2024-04-021-2/+0
| | | | Edited-by: Nick Mathewson <[email protected]>
* Update unstable `tor/arti-*` crates to 0.17.0.Nick Mathewson2024-04-021-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Done with: ``` CRATES=" tor-basic-utils tor-async-utils tor-error tor-config tor-events tor-units tor-geoip tor-rtcompat tor-rtmock tor-log-ratelim tor-rpcbase tor-llcrypto tor-protover tor-bytes tor-hscrypto tor-hspow tor-socksproto tor-checkable tor-cert tor-linkspec tor-cell tor-proto tor-netdoc tor-consdiff tor-netdir tor-relay-selection tor-congestion tor-persist tor-chanmgr tor-ptmgr tor-guardmgr tor-circmgr tor-dirclient tor-dirmgr tor-keymgr tor-hsclient tor-hsservice tor-hsrproxy arti-client arti-rpcserver arti-config arti-hyper arti-bench arti-testing " for crate in $CRATES; do cargo set-version -p "$crate" 0.17.0 done ```
* Bump patchlevel versions on non-{tor/arti} crates.Nick Mathewson2024-04-021-1/+1
| | | | | | | | | | | | | | | | These have all had backward-compatible changes. Generated with: ``` cargo set-version --bump patch -p fs-mistrust cargo set-version --bump patch -p test-temp-dir cargo set-version --bump patch -p fslock-guard cargo set-version --bump patch -p hashx cargo set-version --bump patch -p equix cargo set-version --bump patch -p caret cargo set-version --bump patch -p safelog cargo set-version --bump patch -p retry-error ```
* Run maint/add_warning.Nick Mathewson2024-03-133-0/+3
|
* Merge branch 'deny-unchecked-duration-substraction' into 'main'Ian Jackson2024-03-051-0/+1
|\ | | | | | | | | | | | | deny clippy::unchecked_duration_subtraction Closes #1304 See merge request tpo/core/arti!2008
| * deny clippy::unchecked_duration_subtractiontrinity-1686a2024-02-291-0/+1
| |
* | Bump patchlevel for tor-hscrypto.Gabriela Moldovan2024-03-041-1/+1
| | | | | | | | | | | | tor-hscrypto depends on tor-units, whose patchlevel was bumped. This bumps patchlevel for tor-hscrypto without updating its dependents.
* | Bump patchlevel of pre-1.0.0 crates with new APIs.Gabriela Moldovan2024-03-041-1/+1
|/ | | | | | | | | | | | | | | | | | | | APIs were added: ``` tor-units tor-cell tor-proto tor-netdir arti-client ``` Done with: ``` cargo set-version --bump patch -p tor-units cargo set-version --bump patch -p tor-cell cargo set-version --bump patch -p tor-proto cargo set-version --bump patch -p tor-netdir cargo set-version --bump patch -p arti-client ```
* Merge branch 'delete-semvers' into 'main'Ian Jackson2024-02-051-3/+0
|\ | | | | | | | | Remove all semver.md files to start a fresh release round See merge request tpo/core/arti!1957
| * Remove all semver.md files to start a fresh release roundIan Jackson2024-02-051-3/+0
| |
* | Bump minor versionsIan Jackson2024-02-051-3/+3
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bump the minor version of these crates, and update the in-tree dependencies. Recently published as fresh crates, let's just assume there are breaking changes: fslock-guard test-temp-dir Breaking API change affecting many many downstream crates: tor-rtcompat Downstream crates which we're (conservatively) assuming have tor-rtcompat types in their APIs: tor-rtmock tor-log-ratelim tor-rpcbase tor-llcrypto tor-protover tor-bytes tor-hscrypto tor-hspow tor-socksproto tor-checkable tor-cert tor-linkspec tor-cell tor-proto tor-netdoc tor-consdiff tor-netdir tor-congestion tor-persist tor-chanmgr tor-ptmgr tor-guardmgr tor-circmgr tor-dirclient tor-dirmgr tor-keymgr tor-hsclient tor-hsservice tor-hsrproxy arti-client arti-rpcserver arti-config arti-hyper arti-bench arti-testing
* tor-netdir: Add a unit test for HsDirParams::offset_within_srv_period.Gabriela Moldovan2024-01-241-1/+1
|
* tor-netdir, tor-hscrypto: Add function for computing SRV period offset.Gabriela Moldovan2024-01-242-3/+13
| | | | Part of #1166
* tor-hscrypto: Remove TimePeriodOffset, offset_within_period().Gabriela Moldovan2024-01-243-27/+3
| | | | | | These are now unused. Part of #1166
* tor-hsservice: Generate revision counter using the start of SRV period.Gabriela Moldovan2024-01-242-4/+3
| | | | Closes #1166
* hscrypto: Downgrade a TODO HSS comment.Nick Mathewson2024-01-141-1/+1
| | | | | This is not a blocker; it's just a code movement or duplication issue IIUC.
* Patchlevel version bumps in preparation for 1.1.12.Nick Mathewson2024-01-091-1/+1
| | | | | | | | | | | | | This crate doesn't have a meaningful public API, so it just gets a patchlevel bump: arti These crates had nonbreaking changes, and get a patchlevel bump: tor-rtcompat fs-mistrust tor-llcrypto tor-cert
* Breaking version bumps in preparation for 1.1.12.Nick Mathewson2024-01-091-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These crates have breaking changes on their own: tor-error tor-netdoc tor-dirmgr tor-keymgr Because of the breaking change in tor-error, and the fact that basically every crate publicly depends on tor-error (by implementing ErrorKind), we need to call this a breaking change on all of the following: tor-config tor-geoip tor-rtmock tor-log-ratelim tor-rpcbase tor-bytes tor-hscrypto tor-socksproto tor-cell tor-proto tor-netdoc tor-netdir tor-persist tor-chanmgr tor-ptmgr tor-guardmgr tor-circmgr tor-dirclient tor-dirmgr tor-keymgr tor-hsclient tor-hsservice tor-hsrproxy arti-client arti-rpcserver arti-config arti-hyper arti-testing
* Merge branch 'wallclock-time' into 'main'gabi-2502023-12-131-1/+3
|\ | | | | | | | | | | | | tor-hscrypto: Return 0 if the timestamp is before the start of the TP. Closes #1155 See merge request tpo/core/arti!1828
| * tor-hscrypto: Return 0 if the timestamp is before the start of the TP.Gabriela Moldovan2023-12-131-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | #1155 was happening because we couldn't compute the offset of the current time from the start of the _next_ TP (`TimePeriod::offset_within_period` expected `when` to come after the start of the TP). `TimePeriod::offset_within_period` now returns an offset of 0 for timestamps that come before the start of the TP, to support computing revision counters for the descriptors uploaded to the HsDirs from the ring associated with the next TP. Fixes #1155
* | hscrypto: Remove a "TODO HSS" about a no-longer-unused type.Nick Mathewson2023-12-121-4/+0
|/
* Remove semver.md files.Nick Mathewson2023-12-041-4/+0
|
* Bump minor versions in preparation for releaseNick Mathewson2023-12-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This crate is new, and gets a bump to 0.1.0. tor-log-ratelim This crate had a breaking change: tor-persist tor-llcrypto had a breaking change. These crates _are_ tor-llcrypto, or (transitively) depend on it. I am assuming that they all re-expose something from it in a way that matters: tor-llcrypto tor-bytes tor-hscrypto tor-socksproto tor-checkable tor-cert tor-linkspec tor-cell tor-proto tor-netdoc tor-consdiff tor-netdir tor-chanmgr tor-ptmgr tor-guardmgr tor-circmgr tor-dirclient tor-dirmgr tor-keymgr tor-hsclient tor-hsservice tor-hsrproxy arti-client arti-rpcserver arti-hyper
* Bump patchlevel versions in preparation for releaseNick Mathewson2023-12-041-1/+1
| | | | | | | | | | | | | | | These crates had backward-compatible changes, and get a patchlevel bump only: fs-mistrust tor-error tor-config tor-rtcompat tor-rtmock This crate exposes no non-CLI APIs, and gets a patchlevel bump only: arti
* Merge branch 'msrv-bump-1.70' into 'main'Ian Jackson2023-11-301-1/+1
|\ | | | | | | | | Increase our MSRV to 1.70 See merge request tpo/core/arti!1773
| * In every crate, change rust-version to 1.70.Nick Mathewson2023-11-281-1/+1
| |
* | llcrypto: Hide the members of ExpandedKeypair.Nick Mathewson2023-11-291-10/+9
| | | | | | | | | | With this change, we no longer expose the ExpandedSecretKey unescorted, which makes it harder to misuse the API.
* | llcrypto: Remove ExpandedSecretKey export.Nick Mathewson2023-11-291-5/+5
| | | | | | | | | | | | | | This type was part of `hazmat`, and was no longer necessary anywhere in our codebase. (It had one remaining user, which was easy enough to remove.) By removing it, we remove the opportunity for using an unescorted ed25519 private key.
* | Remove RngCompatExt.Nick Mathewson2023-11-291-2/+1
| | | | | | | | | | | | | | | | | | | | 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-16/+12
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.