summaryrefslogtreecommitdiff
path: root/crates/tor-hscrypto
Commit message (Collapse)AuthorAgeFilesLines
* Bump patchlevel versions of crates with trivial changesNick Mathewson2023-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These crates have had trivial changes only: typically, changes to documentation or to clippy warnings. There's no good reason to update which version of them other crates depend on, so we only bump _their_ patchlevels. ``` tor-async-utils caret safelog tor-events tor-units tor-rtcompat tor-rpcbase tor-llcrypto tor-protover tor-bytes tor-hscrypto tor-socksproto tor-cert tor-cell tor-consdiff tor-congestion arti-rpcserver arti-testing arti-bench arti-config arti-hyper ```
* Increment patchlevel versions of crates with minor changesNick Mathewson2023-08-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These crates are at version 0.x.y, so we don't need to distinguish new-feature changes from other changes: ``` tor-basic-utils fs-mistrust tor-error tor-geoip tor-checkable tor-linkspec tor-netdoc tor-netdir tor-persist tor-ptmgr tor-hsservice ``` This crate has a breaking change, but only when the semver-breaking feature `experimental-api` is enabled: ``` tor-config ``` This crate is at version 1.x.y, but has no new public APIs, and therefore does not need a minor version bump: ``` arti ```
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-104-0/+4
|
* Run add_warning to remove `missing_panics_doc` deny.Nick Mathewson2023-07-061-1/+0
| | | | Closes #950.
* Remove semver.md files for 1.1.6Nick Mathewson2023-06-301-1/+0
|
* Bump patchlevel versions on crates with smaller changesNick Mathewson2023-06-301-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Done with the commands below. The following crates have had various changes, and should get a patchlevel bump. Since they are pre-1.0, we do not need to distinguish new APIs from other changes. ``` cargo set-version --bump patch -p arti-client cargo set-version --bump patch -p safelog cargo set-version --bump patch -p tor-bytes cargo set-version --bump patch -p tor-cert cargo set-version --bump patch -p tor-circmgr cargo set-version --bump patch -p tor-config cargo set-version --bump patch -p tor-consdiff cargo set-version --bump patch -p tor-dirclient cargo set-version --bump patch -p tor-dirmgr cargo set-version --bump patch -p tor-error cargo set-version --bump patch -p tor-hsservice cargo set-version --bump patch -p tor-linkspec cargo set-version --bump patch -p tor-llcrypto cargo set-version --bump patch -p tor-netdir cargo set-version --bump patch -p tor-netdoc cargo set-version --bump patch -p tor-proto cargo set-version --bump patch -p tor-rpcbase cargo set-version --bump patch -p tor-socksproto ``` This crate has new features, but no new non-experimental Rust APIs. So even though it is post-1.0, it gets a patchlevel bump. ``` cargo set-version --bump patch -p arti ```
* Bump minor versions on crates with breaking changesNick Mathewson2023-06-301-1/+1
| | | | | | | | | | Done with: ``` cargo set-version --bump minor -p tor-hsclient cargo set-version --bump minor -p arti-rpcserver cargo set-version --bump minor -p tor-hscrypto cargo set-version --bump minor -p tor-cell ```
* Run "fixup-features".Nick Mathewson2023-06-291-1/+1
|
* tor-hscrypto: Provide values for NUM_INTRO_POINTIan Jackson2023-06-281-0/+12
| | | | These are in the spec and tor-hsclient is about to want them.
* Upgrade to itertools 0.11.0Nick Mathewson2023-06-261-1/+1
| | | | The breaking changes here do not seem to affect us.
* hscrypto: remove "tor-error/experimental-api" dependencyNick Mathewson2023-06-231-1/+1
| | | | The ErrorKinds that we use here are now non-experimental.
* hscrypto: downgrade a comment to HSSNick Mathewson2023-06-221-1/+1
|
* Merge branch 'socks_errorkinds' into 'main'Nick Mathewson2023-06-222-0/+16
|\ | | | | | | | | | | | | Generate correct-ish socks5 errors for onion service errors. Closes #736 See merge request tpo/core/arti!1279
| * New ErrorKind for invalid onion addressesNick Mathewson2023-06-222-0/+16
| | | | | | | | Use this to emit HS_BAD_ADDRESS as appropriate.
* | lints: Run maint/add_warning to actually apply new lintsIan Jackson2023-06-211-0/+2
|/
* hscrypto: fix TODOs in time-period code.Nick Mathewson2023-06-132-32/+54
| | | | | | * Return a more informative error type (instead of Option) * Check that time periods are an integer number of seconds * Decide not to change the semantics of an argument.
* hscrypto: remove compatibility note about time periods.Nick Mathewson2023-06-131-9/+0
| | | | | We updated and clarified the spec in arti!107, and noted the remaining infelicities in proposal 342.
* hscrypto: write a READMENick Mathewson2023-06-131-1/+20
|
* hscrypto: note that hs_mac is not a good choice for new protocolsNick Mathewson2023-06-131-1/+4
|
* hscrypto: comment out an unused key type.Nick Mathewson2023-06-131-5/+6
| | | | | | | | (I'm not removing it entirely since maybe we _should_ use it, and maybe we _will_ as we do services. I've added a TODO HS for removing it or using it, and removed the TODO HS at the head of pk.rs about making sure that all the key types in the module really belong there.)
* hscrypto: Remove a TODO about extending an internal macro.Nick Mathewson2023-06-131-2/+0
|
* hscrypto: Remove a TODO about implementing ErrorKind.Nick Mathewson2023-06-131-1/+0
| | | | | | I think it isn't actually a great idea for HsIdParseError to implement ErrorKind, since the actual ErrorKind would depend entirely on where the problematic ID came from.
* hscrypto: clarify and downgrade TODOs about blinding secretsNick Mathewson2023-06-131-2/+10
|
* tor-hscrypto: implement Rng.gen() for RendCookieIan Jackson2023-06-092-0/+7
|
* tor-hscrypto: Break out REND_COOKIE_LENIan Jackson2023-06-091-1/+4
| | | | We need to reuse this.
* Bump crate versions in preparation for v1.1.5 release.Nick Mathewson2023-06-011-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generated with the following commands: ``` cargo set-version --bump minor -p tor-cell cargo set-version --bump minor -p tor-linkspec cargo set-version --bump minor -p tor-proto cargo set-version --bump minor -p tor-netdoc cargo set-version --bump minor -p tor-circmgr cargo set-version --bump patch -p tor-cert cargo set-version --bump patch -p tor-basic-utils cargo set-version --bump patch -p tor-rpcbase cargo set-version --bump patch -p tor-llcrypto cargo set-version --bump patch -p tor-hscrypto cargo set-version --bump patch -p tor-checkable cargo set-version --bump patch -p tor-async-utils cargo set-version --bump patch -p caret cargo set-version --bump patch -p fs-mistrust cargo set-version --bump patch -p safelog cargo set-version --bump patch -p retry-error cargo set-version --bump patch -p tor-error cargo set-version --bump patch -p tor-config cargo set-version --bump patch -p tor-events cargo set-version --bump patch -p tor-units cargo set-version --bump patch -p tor-rtcompat cargo set-version --bump patch -p tor-rtmock cargo set-version --bump patch -p tor-protover cargo set-version --bump patch -p tor-bytes cargo set-version --bump patch -p tor-socksproto cargo set-version --bump patch -p tor-consdiff cargo set-version --bump patch -p tor-netdir cargo set-version --bump patch -p tor-congestion cargo set-version --bump patch -p tor-persist cargo set-version --bump patch -p tor-chanmgr cargo set-version --bump patch -p tor-ptmgr cargo set-version --bump patch -p tor-guardmgr cargo set-version --bump patch -p tor-dirclient cargo set-version --bump patch -p tor-dirmgr cargo set-version --bump patch -p tor-hsclient cargo set-version --bump patch -p tor-hsservice cargo set-version --bump patch -p arti-client cargo set-version --bump patch -p arti-rpcserver cargo set-version --bump patch -p arti-config cargo set-version --bump patch -p arti-hyper cargo set-version --bump patch -p arti cargo set-version --bump patch -p arti-bench cargo set-version --bump patch -p arti-testing ```
* hscrypto: Remove an incorrect comment.Nick Mathewson2023-05-181-5/+0
| | | | | (It said that we want to deprecate all unescorted secret keys; in fact, only unescorted EdDSA secrets are bad.)
* hscrypto: Replace ed25519 secret keys with keypairsNick Mathewson2023-05-181-42/+32
| | | | Part of #798: We no longer use unescorted ed25519 secret keys.
* Reformat Cargo.toml files.Nick Mathewson2023-05-151-5/+2
|
* Run fixup-features --no-annotate for initial Cargo.toml fixes.Nick Mathewson2023-05-151-0/+1
| | | | | | | | | This does the following: - Gives every crate a `full`. - Cause every `full` to depend on `full` from the lower-level crates. - Makes every feature listed _directly_ in `experimental` depend on `__is_experimental`.
* hscrypto: Add comment about impl that will be removed after we address #798.Gabriela Moldovan2023-05-031-0/+2
| | | | Signed-off-by: Gabriela Moldovan <[email protected]>
* hscrypto: Add From impl for deriving KP_hsc_desc_enc out of KS_hsc_desc_enc.Gabriela Moldovan2023-05-031-0/+6
| | | | | | | | | | The `HsClientSecretKeys` stored in the HS client connection context only have the secret keys. Certain APIs (such as `HsDesc::parse`) expect a keypair (both `HsClientDescEncKey` and `HsClientDescEncSecretKey`). This `From` impl makes it possible to get a `HsClientDescEncKey` out of `HsClientDescEncSecretKey`. Signed-off-by: Gabriela Moldovan <[email protected]>
* Increment crate versions.Nick Mathewson2023-05-031-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because of the errorkind bumps, we're calling this a breaking change in everything lower-level than `arti`. Generated with: ``` cargo set-version -p tor-basic-utils --bump minor cargo set-version -p tor-async-utils --bump minor cargo set-version -p caret --bump minor cargo set-version -p fs-mistrust --bump minor cargo set-version -p safelog --bump minor cargo set-version -p retry-error --bump minor cargo set-version -p tor-error --bump minor cargo set-version -p tor-config --bump minor cargo set-version -p tor-events --bump minor cargo set-version -p tor-units --bump minor cargo set-version -p tor-rtcompat --bump minor cargo set-version -p tor-rtmock --bump minor cargo set-version -p tor-rpcbase --bump minor cargo set-version -p tor-llcrypto --bump minor cargo set-version -p tor-protover --bump minor cargo set-version -p tor-bytes --bump minor cargo set-version -p tor-hscrypto --bump minor cargo set-version -p tor-socksproto --bump minor cargo set-version -p tor-checkable --bump minor cargo set-version -p tor-cert --bump minor cargo set-version -p tor-linkspec --bump minor cargo set-version -p tor-cell --bump minor cargo set-version -p tor-proto --bump minor cargo set-version -p tor-netdoc --bump minor cargo set-version -p tor-consdiff --bump minor cargo set-version -p tor-netdir --bump minor cargo set-version -p tor-congestion --bump minor cargo set-version -p tor-persist --bump minor cargo set-version -p tor-chanmgr --bump minor cargo set-version -p tor-ptmgr --bump minor cargo set-version -p tor-guardmgr --bump minor cargo set-version -p tor-circmgr --bump minor cargo set-version -p tor-dirclient --bump minor cargo set-version -p tor-dirmgr --bump minor cargo set-version -p tor-hsclient --bump minor cargo set-version -p tor-hsservice --bump minor cargo set-version -p arti-client --bump minor cargo set-version -p arti-rpcserver --bump minor cargo set-version -p arti-config --bump minor cargo set-version -p arti-hyper --bump minor cargo set-version -p arti --bump patch cargo set-version -p arti-bench --bump patch cargo set-version -p arti-testing --bump patch ```
* Upgrade our hex-literal dependencyNick Mathewson2023-04-131-1/+1
|
* Increment MSRV to 1.65 in every crate.Nick Mathewson2023-04-111-1/+1
|
* Debug as hex strings for HsBlindId and HsDirIndexIan Jackson2023-03-311-2/+3
|
* Stop requiring the caller to supply `AuthClient`s.Gabriela Moldovan2023-03-311-0/+15
| | | | | | | | | | | | | | | | | | `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]>
* Bump crate versions that have breaking changesNick Mathewson2023-03-311-2/+2
| | | | | | | | | | 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-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ```
* tor-hscrypto: key blinding: Use consistent terminologyIan Jackson2023-03-281-10/+12
| | | | | | | | * Don't ever use the words "parameter" or "param". These doesn't appear in the spec anywhere. * Use `h` as the variable name for the unclamped blinding factor, and `blinding_factor` in function names.
* Use the type system to enforce use of blinded keys.Gabriela Moldovan2023-03-271-0/+24
| | | | | | | | | | | | | | | Hidden services use blinded singing keys derived from the identity key to sign descriptor signing keys. Before this patch, the hidden descriptor builder represented its blinded signing keys (`blinded_id`) as plain `ed25519::Keypair`s. This was not ideal, as there was nothing preventing the caller from accidentally initializing `blinded_id` with an unblinded keypair. This introduces a new `HsBlindKeypair` type to represent blinded keypairs. Signed-off-by: Gabriela Moldovan <[email protected]>
* Add builder for encoding hidden service descriptors.Gabi Moldovan2023-03-241-1/+10
| | | | | | | | | | | | | | 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]>
* Improve error from HsId parse of "www.B32.onion"Ian Jackson2023-03-091-2/+11
| | | | And add some clarity and todos about address errors.
* Test HsId parse of subdomainIan Jackson2023-03-091-0/+1
| | | | This error is not great.
* Use strip_suffix_ignore_ascii_case to quickly reject non-.onion HsId (fmt)Ian Jackson2023-03-081-1/+3
|
* Use strip_suffix_ignore_ascii_case to quickly reject non-.onion HsIdIan Jackson2023-03-082-3/+4
|
* Impl Redactable for HsIdIan Jackson2023-03-072-1/+26
|
* Debug HsId as the .onion; retain the hex printing as {:x}Ian Jackson2023-03-071-3/+10
|
* impl Display for HsIdIan Jackson2023-03-072-1/+147
|
* Merge branch 'hsconn' into 'main'Ian Jackson2023-03-011-12/+17
|\ | | | | | | | | Implement HS state management See merge request tpo/core/arti!1034