summaryrefslogtreecommitdiff
path: root/crates/tor-hsclient/src/keys.rs
Commit message (Collapse)AuthorAgeFilesLines
* Switch to derive-deftlyIan Jackson2024-04-031-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the combination of a number of separate commits, many of which were generated by seddery, and then rebased and squashed. Cargo.toml perl -i~ -pe 's{^derive-adhoc}{derive-deftly = "0.10"}' crates/*/Cargo.toml (not regenerated during rebase) update Cargo.lock `cargo fetch` without --locked (regenerated during rebase) seddery git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{^use derive_adhoc}{use derive_deftly}' git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\bdefine_derive_adhoc\b}{define_derive_deftly}g' git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\bAdhoc\b}{Deftly}g if m{derive}' git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\#\[derive_adhoc\b}{#[derive_deftly}g' git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{use derive_adhoc}{use derive_deftly}' git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\bderive_adhoc\b}{derive_deftly_adhoc} if m{use.*deftly}' git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\bderive_adhoc!}{derive_deftly_adhoc!}' (not regenerated during rebase) Manually add `#[derive_deftly_adhoc]` where needed. seddery git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\#\[adhoc\b}{#[deftly}g' git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\bderive_adhoc_template}{derive_deftly_template}' (not regenerated during rebase) Manually fix up an import Manually update some builder attrs Manually fix up tor_rtmock::time_core This was missed in my seddery, due to me rebasing the branch and not redoing the seddery.
* tor-hsclient: Remove client nickname from the client key specifiers (fmt).Gabriela Moldovan2024-02-221-3/+1
|
* tor-hsclient: Remove client nickname from the client key specifiers.Gabriela Moldovan2024-02-221-34/+1
| | | | Closes #1283
* tor-hsclient: Rename HsClientSpecifier to HsClientNickname.Gabriela Moldovan2024-01-311-10/+8
| | | | | Service nicknames are represented by `HsNickname`, so let's rename `HsClientSpecifier` to `HsClientNickname`.
* tor-persist: Make all Slugs non-empty.Gabriela Moldovan2024-01-311-2/+0
| | | | | | | | This also removes a TODO regarding adding a `Nickname` type for representing `HsClientSpecifier` and `HsNickname` (we don't need it if `Slug`s are non-empty). Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1931#note_2990227
* tor-keymgr: Abolish ArtiPathComponent.Gabriela Moldovan2024-01-311-1/+1
| | | | | | `ArtiPathComponent`s are really just `Slugs`. Part of #1193, #1092
* tor-hsclient: Use Slug for HsClientSpecifier (fmt).Gabriela Moldovan2024-01-311-11/+3
|
* tor-hsclient: Use Slug for HsClientSpecifier.Gabriela Moldovan2024-01-311-4/+20
|
* tor-hsclient: Derive the KeySpecifier implementation (fmt).Gabriela Moldovan2024-01-101-4/+12
|
* tor-hsclient: Derive the KeySpecifier implementation.Gabriela Moldovan2024-01-101-49/+17
| | | | | | | | This addresses a `TODO HSS` about deriving the `KeySpecifier` implementation for client key specifiers. Note that we no longer have a key specifier type for intro auth keys (which are not supported anyway, see #1037).
* tor-keymgr: ArtiPathSyntaxError: rename from ArtiPathError (fmt)Ian Jackson2023-12-071-1/+2
|
* tor-keymgr: ArtiPathSyntaxError: rename from ArtiPathErrorIan Jackson2023-12-071-2/+2
| | | | | The previous name was ambiguous, and confusable with KeyPathError (of which it is, basically, a variant).
* tor-hsclient: Deprecate HsClientSecretKeysBuilder::ks_hsc_intro_auth().Gabriela Moldovan2023-11-201-1/+6
|
* tor-hsclient: Add TODO about using the new define_key_specifiers! macro.Gabriela Moldovan2023-10-301-0/+2
|
* tor-keymgr: Rename KeyPathError to ArtiPathUnavailableError (fmt).Gabriela Moldovan2023-10-191-2/+5
|
* tor-keymgr: Rename KeyPathError to ArtiPathUnavailableError.Gabriela Moldovan2023-10-191-2/+2
|
* tor-keymgr: Remove From<ArtiPathError> impl for KeyPathError.Gabriela Moldovan2023-10-191-2/+2
|
* tor-hsclient, arti-client: Make BadClientSpecifier wrap an ArtiPathError.Gabriela Moldovan2023-10-191-3/+3
|
* tor-keymgr: Use ArtiPathError for invalid ArtiPaths.Gabriela Moldovan2023-10-191-6/+7
|
* tor-hsclient: Update HsClientSecretKeys docs.Gabriela Moldovan2023-09-251-1/+1
|
* tor-hsclient, arti-client, tor-keymgr, tor-netdoc: Use a keypair instead of ↵Gabriela Moldovan2023-09-251-1/+1
| | | | StaticSecret (fmt).
* tor-hsclient, arti-client, tor-keymgr, tor-netdoc: Use a keypair instead of ↵Gabriela Moldovan2023-09-251-3/+3
| | | | | | | | | | | | | StaticSecret. Previously, when retrieving `KS_hsc_desc_enc` keys (or any other x25519 keys) from the keystore, the keymgr would discard the public part of the key (SSH private keys contain the public part of the key too). Instead of discarding the public key and returning just the `StaticSecret`, the keymgr now returns a `StaticKeypair`. This makes the x25519 `EncodableKey`/`ToEncodableKey` implementation consistent with the ed25519 one (which retrieves key pairs rather than "unescorted" secrets).
* tor-keymgr: Fix typo in key names.Gabriela Moldovan2023-09-121-4/+4
| | | | The secret keys are prefixed with `KS`, not `KP`.
* hsclient: Make HsClientSpecifier a newtype instead of a type alias.Gabriela Moldovan2023-06-291-1/+11
|
* arti-client, hsclient: Typealias HsClientSpecifier to ArtiPathComponent.Gabriela Moldovan2023-06-291-25/+2
| | | | `ArtiPathComponent` is a more generic version of `HsClientSpecifier`.
* keymgr: Move the HS client and service key specifiers out of tor-keymgr.Gabriela Moldovan2023-06-151-1/+77
| | | | | | The HS `HsClientSpecifier` and `HsClientSecretKeySpecifier` are moved to `tor-hsclient`. The HS service secret key specifier stubs are moved to `tor-hsservice`.
* hsclient: Change builder error return type to ConfigBuildError.Gabriela Moldovan2023-06-151-1/+1
| | | | | | It's not perfectly clear what this error type should be, so let's use `ConfigBuildError` for now (it makes things easier in `arti-client`, as we already have an `ErrorDetail` for it).
* Fix a docs reference to refer to HsClientIntroAuthKeypairIan Jackson2023-05-221-1/+1
| | | | | | | | Fixes warning from cargo -o doc --document-private-items --all-features --workspace This was evidentlhy overlooked during recent replacement of unescorted private keys in the code.
* netdoc, hsclient: Update remaining ed25519::SecretKey usersNick Mathewson2023-05-181-3/+3
| | | | | | Fortunately, these are all in experimental code. Closes #798
* hsclient: Use a real HsDesc instead of an unparsed string.Gabriela Moldovan2023-05-031-3/+3
| | | | Signed-off-by: Gabriela Moldovan <[email protected]>
* hsclient keys: Be more explicit about HsClientSecretKeys nullableIan Jackson2023-03-011-5/+9
| | | | | It can contain no keys; state this more prominently, and explain what it represents. Also fix a few typos etc.
* hsclient keys: Add a todo to remove spurious OptionIan Jackson2023-03-011-0/+3
|
* hsclient keys: Compare all empty sets of keys as equalIan Jackson2023-03-011-1/+5
| | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1034#note_2881575
* hsclient keys: Provide :none() and Default and .is_empty()Ian Jackson2023-03-011-1/+22
|
* hsclient keys: Fix a missing full stopIan Jackson2023-03-011-1/+1
|
* hsclient state: Test most important code pathsIan Jackson2023-03-011-2/+8
|
* hsclient: Provide some missing debug impls and trace messagesIan Jackson2023-03-011-0/+12
|
* HS secret keys: Move aggregate/config to tor-hsclientIan Jackson2023-03-011-0/+79
| | | | | | | | Provide a more cookied "secret keys for use to connecting to a particular HS" type, with a builder. This wants to use config stuff, so oughtn't to be in tor-*crypto. The individual types remain there.
* hsclient API: Remove notion of ambient keys fromk this layerIan Jackson2023-03-011-9/+5
|
* tor-hscrypto: Rename key types to correspond to new spec names.Nick Mathewson2023-02-081-2/+2
|
* Add a new stub hsclient module to connect to onion services.Nick Mathewson2023-01-241-0/+11