aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-keymgr
Commit message (Collapse)AuthorAgeFilesLines
* tor-keymgr: Remove redundant _private suffix from key extension.Gabriela Moldovan2023-09-122-4/+4
| | | | The privateness of the keys is encoded in their name.
* Remove semver.md now that 1.1.8 is out.Nick Mathewson2023-09-051-9/+0
|
* Update patchlevel for crates with nontrivial changes.Nick Mathewson2023-09-051-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are: ``` hashx equix tor-async-utils tor-error tor-config tor-rtmock tor-llcrypto tor-bytes tor-hscrypto tor-hspow tor-cert tor-linkspec tor-cell tor-proto tor-netdoc tor-netdir tor-chanmgr tor-guardmgr tor-dirmgr tor-keymgr tor-hsclient tor-hsservice arti-client arti ```
* tor-keymgr: Bump ssh-key to 0.6.1 and remove unnecessary dependency.Gabriela Moldovan2023-08-241-11/+1
| | | | | | | Now that [ssh-key 0.6.1] is out, we no longer need the explicit sec1 dependency in tor-keymgr. [ssh-key 0.6.1]: https://github.com/RustCrypto/SSH/pull/155
* tor-keymgr, tor-hsservice: Run rustfmt to make derives uglierIan Jackson2023-08-231-3/+13
|
* tor-keymgr, tor-hsservice: deser for ArtiPathComponent and HsNicknameIan Jackson2023-08-233-0/+27
|
* tor-keymgr: Improve ArtiPathComponent a bitIan Jackson2023-08-232-0/+18
| | | | And add a TODO about the error type.
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-235-0/+5
|
* Resolve warnings about ambiguous/redundant doc linksNick Mathewson2023-08-221-1/+1
| | | | | Nightly rustdoc now warns if you have a link that isn't necessary, and if you have a link that might refer to two different things.
* keymgr: Write a registry sketch.Gabriela Moldovan2023-08-161-2/+49
| | | | This comment will form the basis for the protocol name registry.
* tor-keymgr: Add sec1 0.7.3 dependency.Gabriela Moldovan2023-08-161-0/+10
|
* tor-keymgr: Re-export ssh-key.Gabriela Moldovan2023-08-164-13/+16
| | | | | | | | | | The `KeypairData` type from [ssh-key] at some point leaked into the keymgr API (via the `EncodableKey` trait). Instead of re-exporting just `KeypairData`, let's re-export the entire `ssh_key` crate (`EncodableKey` implementors would need additional types from `ssh_key` to construct a `KeypairData` object anyway). [ssh-key]: https://crates.io/crates/ssh-key
* keymgr: Implement as_ssh_keypair_data for curve25519 keys.Gabriela Moldovan2023-08-161-4/+13
|
* keymgr: Import internal! (fmt).Gabriela Moldovan2023-08-161-4/+2
|
* keymgr: Import internal!.Gabriela Moldovan2023-08-161-3/+3
|
* keymgr: Remove unused helper.Gabriela Moldovan2023-08-161-33/+0
| | | | | This helper is no longer needed (the logic from `parse_ssh_format_erased` changed).
* tor-keymgr: Test x25519 key parsing.Gabriela Moldovan2023-08-163-0/+44
|
* keymgr: Do not expect x25519 keys to be stored as ed25519 ssh keys.Gabriela Moldovan2023-08-161-13/+48
| | | | | | | | | | | | | | | | | | | | | | Previously, the Arti key store would store x25519 secret keys as ed25519 OpenSSH keys, which it would convert to x25519 upon loading (using the conversion function added in !1297 (merged)). This approach isn't good enough though: most people will probably want to bring their existing x25519 keys, and in order to store those in OpenSSH format, we'd need convert them to ed25519, which is impossible (because the secret part of an x25519 key contains a SHA512'd secret, whereas the corresponding, "un-expanded", ed25519 secret key contains the secret itself rather than the SHA). Now that `ssh-key` has support for ssh keys with [custom algorithm names], we can store x25519 in OpenSSH format directly. This commit changes the storage format used by the keymgr for x25519 client auth keys (from ed25519-ssh to our own custom key type with an algorithm name of `"[email protected]"`). Closes #936 [custom algorithm names]: https://github.com/RustCrypto/SSH/pull/136
* keymgr: Bump ssh-key to 0.6.0.Gabriela Moldovan2023-08-162-2/+11
| | | | This brings in the changes from #936.
* tor-error: Remove KeystoreFsPermissions variant.Gabriela Moldovan2023-08-081-1/+1
| | | | | | | | According to the `ErrorKind` lumping guidelines, `KeystoreFsPermissions` should be lumped with `FsPermissions`: they represent the same type of error, and their "location" is the same ("Host"). Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1315#note_2916455
* Run add_warnings on all files.Nick Mathewson2023-08-041-2/+2
|
* keymgr: Add TODO regarding SshEncodableKey impl for x25519.Gabriela Moldovan2023-08-021-0/+1
|
* keymgr: Implement SshEncodableKey for ed25519::Keypair.Gabriela Moldovan2023-08-022-4/+10
|
* keymgr: Remove KeyType::to_ssh_format.Gabriela Moldovan2023-08-023-11/+16
| | | | | | | | This function isn't actually needed (it's not the responsibility of `KeyType` to encode keys). This commit also rewrites `ArtiNativeKeystore::insert` to use the new `as_ssh_keypair_data` function instead of `to_ssh_format`.
* keymgr: Replace EncodableKey::to_bytes() with SSH-specific function.Gabriela Moldovan2023-08-024-12/+20
| | | | | | | | | | | The `EncodableKey::to_bytes` function didn't make much sense, because not all keys have a canonical byte representation. This commit replaces `EncodableKey::to_bytes` with `EncodableKey::as_ssh_keypair_data`. In the future, `EncodableKey` will grow functions for encoding keys in other storage formats too. Closes #965
* Remove semver.md files now that 1.1.7 is out.Nick Mathewson2023-08-011-18/+0
|
* Merge branch 'bump_versions_117' into 'main'arti-v1.1.7Nick Mathewson2023-08-011-5/+5
|\ | | | | | | | | Vesion bumps for 1.1.7. See merge request tpo/core/arti!1458
| * Increment patchlevel versions of crates with minor changesNick Mathewson2023-08-011-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ```
| * Update minor versions on crates that have had breaking changesNick Mathewson2023-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These crates had first-order breaking changes: ``` retry-error tor-keymgr tor-proto tor-hsclient tor-rtmock ``` Additionally, these broke because they re-exposed RetryError: ``` tor-circmgr ``` Additionally, these broke because they may re-expose something from tor-proto: ``` arti-client tor-chanmgr tor-dirclient tor-dirmgr tor-guardmgr ``` Additionally, these broke for other fiddly reasons: `tor-ptmgr` implements traits from tor-chanmgr, which has a breaking change above. `arti-hyper` exposes types from arti-client in its API.
* | Run "fixup features" in preparation for a release.Nick Mathewson2023-08-011-1/+1
|/
* keymgr: Add TODO regarding generate() being racy.Gabriela Moldovan2023-07-271-0/+3
|
* keymgr: Document the TOCTOU issue with generate().Gabriela Moldovan2023-07-271-0/+16
|
* keymgr: Make the return value of generate() indicate if a new key was created.Gabriela Moldovan2023-07-271-3/+5
|
* keymgr: Make Keystore::generate() return a Result.Gabriela Moldovan2023-07-272-8/+8
|
* keymgr: Move duplicated match block to KeyMgr::select_keystore().Gabriela Moldovan2023-07-241-22/+14
|
* keymgr: Add KeyMgr::generate() for generating new keys.Gabriela Moldovan2023-07-243-1/+71
|
* keymgr: Add function for generating EncodableKeys.Gabriela Moldovan2023-07-245-1/+38
|
* keymgr: Test whether insert() creates the missing directories.Gabriela Moldovan2023-07-241-9/+21
|
* keymgr: Return an unimplemented error instead of panicking.Gabriela Moldovan2023-07-241-2/+2
| | | | | | This will enable us to test the parts of `ArtiNativeKeystore::insert` that _are_ implemented (such as the part where it creates the missing directories).
* keymgr: Create the parent directories as neededGabriela Moldovan2023-07-241-1/+12
|
* keymgr: Add a Keystore::contains accessor.Gabriela Moldovan2023-07-244-1/+34
|
* Fix typosDimitris Apostolou2023-07-222-2/+2
|
* Merge branch 'keymgr-api-updates-minor-fixes' into 'keymgr-api-updates'gabi-2502023-07-212-10/+1
|\ | | | | | | | | Keymgr api updates minor fixes See merge request gabi-250/arti!1
| * keymgr: Remove unnecessary dependency.Gabriela Moldovan2023-07-201-1/+0
| |
| * keymgr: Use std::cfg instead of if_cfg.Gabriela Moldovan2023-07-201-9/+1
| |
* | keymgr: Use KeystoreId instead of a static string.Gabriela Moldovan2023-07-214-30/+50
| |
* | keymgr: Add a newtype for keystore identifiers.Gabriela Moldovan2023-07-211-0/+22
| |
* | keymgr, tor-error: Remove unused error type and HasKind.Gabriela Moldovan2023-07-211-20/+2
| |
* | keymgr: Use BadApiUsage instead of KeystoreMisuse.Gabriela Moldovan2023-07-211-9/+7
| | | | | | | | Trying to use a keystore that doesn't exist is `bad_api_usage!`.
* | keymgr: Remove unused KeystoreSelector::All variant.Gabriela Moldovan2023-07-212-30/+0
| | | | | | | | | | | | This also removes the corresponding `KeyMgrError::UnsupportedKeystoreSelector` error, because it's not needed anymore.