summaryrefslogtreecommitdiff
path: root/crates/tor-relay-crypto/src
Commit message (Collapse)AuthorAgeFilesLines
* tor-key-forge: encapsulate `define_ed25519_keypair` macro depsSteven Engler2024-09-181-1/+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-183-0/+123
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]>