summaryrefslogtreecommitdiff
path: root/crates/tor-relay-crypto
Commit message (Collapse)AuthorAgeFilesLines
* 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 ```
* 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 minor versions in tor-*, arti-*.Nick Mathewson2025-03-031-9/+9
|
* Upgrade to derive_more 2Nick Mathewson2025-02-261-1/+1
| | | | | This took a little refactoring, since derive_more::Foo no longer re-exports std::ops::Foo.
* Enable derive-deftly beta featuresIan Jackson2025-02-121-1/+1
| | | | | | | | Right now this will give us `${Xmeta as ... default ...}`, which may improve things in the future. The Cargo.toml syntax is precisely that from https://docs.rs/derive-deftly/1.0.0/derive_deftly/doc_changelog/index.html#t:beta
* Update to derive-deftly 1.0Ian Jackson2025-02-121-1/+1
| | | | | | | | | This is released now. Prepared with: cargo upgrade -i -p derive-deftly There is some new duplication now I think mostly because pwd-grp uses old derive-deftly.
* Merge branch 'versions' into 'main'Ian Jackson2025-02-061-9/+9
|\ | | | | | | | | Version bumps for 1.4.0 See merge request tpo/core/arti!2773
| * Version bumps to 0.27.0Ian Jackson2025-02-061-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See Release.md. maint/list_crates | grep -P '^tor-|^arti-' | xargs -n1 nailing-cargo -Eu set-version --bump minor -p This completes the version bumps. The report of changed crates, before I started the release work, is: $ maint/changed_crates -v "arti-v$LAST_VERSION" oneshot-fused-workaround: No change. slotmap-careful: No change. test-temp-dir: No change. fslock-guard: No change. hashx: No change. equix: No change. tor-basic-utils: No change. caret: No change. fs-mistrust safelog: No change. retry-error: No change. tor-error tor-general-addr: No change. tor-geoip: No change. tor-rtcompat tor-rtmock tor-async-utils tor-config tor-config-path tor-rpc-connect tor-log-ratelim: No change. tor-rpcbase tor-memquota: No change. tor-units tor-llcrypto: No change. tor-protover: No change. tor-bytes tor-checkable: No change. tor-cert tor-key-forge tor-hscrypto: No change. tor-socksproto: No change. tor-linkspec: No change. tor-cell: No change. tor-proto tor-netdoc: No change. tor-consdiff: No change. tor-netdir tor-relay-selection: No change. tor-persist tor-chanmgr tor-ptmgr: No change. tor-guardmgr: No change. tor-circmgr tor-dirclient: No change. tor-dirmgr: No change. tor-keymgr tor-hsclient tor-hsservice tor-hsrproxy: No change. tor-relay-crypto arti-client arti-relay arti-rpcserver arti arti-rpc-client-core $
* | Fix Cargo.toml features formattingIan Jackson2025-02-061-1/+3
| | | | | | | | Manual line breaks which fixup-features doesn't know how to add.
* | Add some missing "full" featuresIan Jackson2025-02-061-1/+1
|/ | | | | | | Precisely the results of maint/fixup-features. Some crates end up with slightly odd formatting, which I will fix in a moment.
* tor-relay-crypto: Remove TODO about validating cert extensions.Gabriela Moldovan2025-01-131-2/+0
| | | | | | | There is no need for validation here. If any validation is required, it will be handled by the calling code. Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2672?commit_id=10845d5e6a06d4d9548d536846eb470128d8a7d4#note_3147517
* tor-relay-crypto: Use the new cert_type() function to get the cert type.Gabriela Moldovan2025-01-131-2/+8
|
* tor-relay-crypto: Use the high-level cert types instead of EncodedEd25519Cert.Gabriela Moldovan2025-01-131-2/+4
| | | | | | | This will come in handy later on, when we start using these function in conjunction with `KeyMgr::get_or_generate_key_and_cert`, which expects the `make_certificate` callback to return a type that implements `ToEncodableCert`.
* tor-relay-crypto: Implement ToEncodableCert for the relay cert types.Gabriela Moldovan2025-01-132-0/+92
| | | | Closes #1777
* tor-relay-crypto: Add high-level cert types.Gabriela Moldovan2025-01-132-1/+41
| | | | | | These will be the `ToEncodableCert`s we write to the keystore. Part of #1777
* Bump versions of internal arti crates for Arti 1.3.2Nick Mathewson2025-01-071-7/+7
| | | | | | | | | | | | | The affected crates follow our regular versioning. They all get bumped to 0.26.0. Done with ``` for crate in $(./maint/list_crates |grep '^arti-\|tor-' ); do cargo set-version --bump minor -p $crate; done ```
* clippy: deny `mod_module_files`Steven Engler2025-01-061-0/+1
| | | | | | Denies 'mod.rs' files for consistency. https://rust-lang.github.io/rust-clippy/master/index.html#mod_module_files
* add_warnings, *: Allow clippy::needless_lifetimesNick Mathewson2024-12-031-0/+1
| | | | | | | | In 1.83, this warning triggers on many of our crates. We're thinking of fixing them all, but for now, we're going to disable the warning. This is part of #1765.
* Bump all the unstable tor- and arti- crates to 0.25.0.Gabriela Moldovan2024-12-021-7/+7
| | | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.25.0 done ```
* Fix several Cargo.tomls to satisfy cargo-sort.Gabriela Moldovan2024-12-021-1/+1
|
* Run fixup-features in preparation for release (fmt).Gabriela Moldovan2024-12-021-1/+7
|
* Run fixup-features in preparation for release.Gabriela Moldovan2024-12-021-1/+1
|
* tor-relay-crypto: Rename RelaySigningKeypairSpecifier's timestamp to ↵Gabriela Moldovan2024-10-311-3/+9
| | | | | | | valid_until. As per our discussion in https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2577#note_3099356
* tor-relay-crypto: Add tests for relay key specifier serialization.Gabriela Moldovan2024-10-312-0/+55
|
* tor-relay-crypto: Add a denotator to RelaySigningKeypairSpecifier.Gabriela Moldovan2024-10-312-8/+63
| | | | | | | This will enable us to store more than one `K_relaysign_ed` in the keystore. Closes #1692
* tor-relay-crypto: Add a specifier for the public part of the identity keypair.Gabriela Moldovan2024-10-311-0/+9
| | | | | | | We'll eventually need this specifier (for example, if the `KS_relayid_ed` private key stored offline, the public part of the keypair will be stored in the online keystore, and will be retrievable using the new `RelayIdentityPublicKeySpecifier` specifier).
* tor-relay-crypto: Fix typo in doc comment.Gabriela Moldovan2024-10-311-1/+1
|
* tor-relay-crypto: Use the KS_ prefix for RelayIdentityKeySpecifier.Gabriela Moldovan2024-10-311-3/+3
| | | | | | | | | | According to its docs, `RelayIdentityKeySpecifier` was meant to be the key specifier for the relay identity keypair, so its role prefix should be `KS_`. This also renames `RelayIdentityKeySpecifier` to `RelayIdentityKeypairSpecifier` for clarity (we're about to add another specifier here, for the public relay identity key).
* Bump unstable tor-* and arti-* crates to 0.24.0Ian Jackson2024-10-301-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cargo set-version -p tor-async-utils 0.24.0 cargo set-version -p tor-basic-utils 0.24.0 cargo set-version -p tor-bytes 0.24.0 cargo set-version -p tor-cell 0.24.0 cargo set-version -p tor-cert 0.24.0 cargo set-version -p tor-chanmgr 0.24.0 cargo set-version -p tor-checkable 0.24.0 cargo set-version -p tor-circmgr 0.24.0 cargo set-version -p tor-config 0.24.0 cargo set-version -p tor-config-path 0.24.0 cargo set-version -p tor-consdiff 0.24.0 cargo set-version -p tor-dirclient 0.24.0 cargo set-version -p tor-dirmgr 0.24.0 cargo set-version -p tor-error 0.24.0 cargo set-version -p tor-general-addr 0.24.0 cargo set-version -p tor-geoip 0.24.0 cargo set-version -p tor-guardmgr 0.24.0 cargo set-version -p tor-hsclient 0.24.0 cargo set-version -p tor-hscrypto 0.24.0 cargo set-version -p tor-hsrproxy 0.24.0 cargo set-version -p tor-hsservice 0.24.0 cargo set-version -p tor-key-forge 0.24.0 cargo set-version -p tor-keymgr 0.24.0 cargo set-version -p tor-linkspec 0.24.0 cargo set-version -p tor-llcrypto 0.24.0 cargo set-version -p tor-log-ratelim 0.24.0 cargo set-version -p tor-memquota 0.24.0 cargo set-version -p tor-netdir 0.24.0 cargo set-version -p tor-netdoc 0.24.0 cargo set-version -p tor-persist 0.24.0 cargo set-version -p tor-proto 0.24.0 cargo set-version -p tor-protover 0.24.0 cargo set-version -p tor-ptmgr 0.24.0 cargo set-version -p tor-relay-crypto 0.24.0 cargo set-version -p tor-relay-selection 0.24.0 cargo set-version -p tor-rpcbase 0.24.0 cargo set-version -p tor-rtcompat 0.24.0 cargo set-version -p tor-rtmock 0.24.0 cargo set-version -p tor-socksproto 0.24.0 cargo set-version -p tor-units 0.24.0 cargo set-version -p arti-client 0.24.0 cargo set-version -p arti-relay 0.24.0 cargo set-version -p arti-rpc-client-core 0.24.0 cargo set-version -p arti-rpcserver 0.24.0
* tor-relay-crypto: Temporarily comment out RelaySigningKeySpecifier.Gabriela Moldovan2024-10-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `RelaySigningKeySpecifier` is currently defined as: ```rust #[non_exhaustive] #[derive(Deftly, PartialEq, Debug, Constructor)] #[derive_deftly(KeySpecifier)] #[deftly(prefix = "relay")] #[deftly(role = "KP_relaysign_ed")] #[deftly(summary = "Relay medium-term signing keypair")] /// The key sepcifier of the relay medium-term signing key (RelaySigningKeypair) pub struct RelaySigningKeySpecifier; ``` This means there can only be a single `relaysign_ed` key with an `ArtiPath` of the form `relay/KP_relaysign_ed`. This is a problem, because relays storing their identity key offline will want to generate a number of `relaysign_ed` keys ahead of time, so we need the keystores to be able to contain multiple such keys. We will need their `ArtiPath` to encode a variable component (for example, a timestamp). We also need to teach `KeyMgr` to retrieve such keys (`KeyMgr::get` should return the first key that has a valid and timely certificate). This will involve extending the `KeySpecifier` trait with a function for obtaining the `KeySpecifier` of the certificate of the key, if there is one. For now, let's comment it out and rethink its `ArtiPath` as part of #1692.
* Bump arti- and tor- crates to 0.23.0Nick Mathewson2024-09-301-4/+4
| | | | | | | | | | | | | | 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.)
* 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.
* | Merge branch 'upgrades-20240925' into 'main'Nick Mathewson2024-09-261-1/+1
|\ \ | |/ |/| | | | | Upgrade dependencies in preparation for next week's releases. See merge request tpo/core/arti!2450
| * 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.
* | Run fixup-features in preparation for upcoming release.Nick Mathewson2024-09-251-0/+1
|/
* tor-key-forge: encapsulate `define_ed25519_keypair` macro depsSteven Engler2024-09-182-7/+1
| | | | | | | | | This re-exports the types/traits needed by the `define_ed25519_keypair` macro so that the macro caller doesn't need to import a bunch of extra packages in its Cargo.toml that it doesn't use, and so that the caller doesn't need a `use prelude::*` before invoking the macro. This makes the macro nicer to use for the caller, and should prevent the macro from causing "cannot find ... in this scope" errors.
* key-forge: Support extra docs and attributes to ed25519 keypairDavid Goulet2024-09-181-6/+12
| | | | Signed-off-by: David Goulet <[email protected]>
* relay-crypto: Initial import of new tor-relay-crypto crateDavid Goulet2024-09-185-0/+175
This adds a new crate called tor-relay-crypto which is responsible for declaring the relay keys and certificate that will be used by a relay and stored in a KeyMgr. This is in its own crate and considered pretty low level so other crates can use it to access the relay keys, like tor-proto, for cryptographic actions like channel authentication or descriptor signing. The lower level cryptographic keys are wrapped in a higher level object in this crate, using tor-key-forge crate, so we can have proper semantic and strong type check on those keys so they are not misused or confused with other keys. At this point, the key declaration might change once the KeyMgr supports attaching a certificate to a key. We are likely going to see more code related to certificate creation in this crate in the future. Part of #1604 Signed-off-by: David Goulet <[email protected]>