aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-cell/src/relaycell/hs/est_intro.rs
Commit message (Collapse)AuthorAgeFilesLines
* tor-llcrypto: Stop deriving Deref in CtByteArrayNeel Chauhan2025-11-241-1/+1
|
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-071-3/+3
| | | | | | | | | | | | | | First, run ``` git grep -l "^edition =" | xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;' ``` Second, manually verify that all Cargo.toml files have changed, and nothing else has changed. Third, run cargo fmt again.
* cell: Make decl_extension_group macro more self-contained.Nick Mathewson2025-05-071-1/+1
| | | | Previously it required the caller to import a whole bunch of stuff.
* cell: move ExtList module out of hs module.Nick Mathewson2025-05-071-1/+1
| | | | We're going to use it for ntorv3 extensions as well.
* Wrap ed25519-dalek types.Nick Mathewson2025-03-181-1/+0
| | | | | | | | | | | With this change, we'll no longer need to expose the types from dalek-cryptography as part of our API, and we'll have more freedom to switch ed25519 implementations, or to upgrade to a newer `rand` ahead of their schedule. Unlike with x25519-dalek, I had to tweak the API a bit: There's no way to get a &PublicKey out of a Keypair now, and implementing the old ed25519-dalek traits seemed unnecessary.
* Some HasMemoryCost impls in tor-cellIan Jackson2024-10-021-4/+10
|
* tor-cell: impl Eq, PartialEq, Hash for est_intro::DosParamsIan Jackson2024-02-211-1/+1
| | | | | | We only need Eq and PartialEq but given those we should have Hash too. (We're going to want to be able to compare parameters for equality.)
* Convert to the latest versions of dalek-cryptographyNick Mathewson2023-11-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main changes that we have to adjust for are as follows: * In x25519-dalek: * `StaticSecret` is now behind a feature. * `StaticSecret::new` is deprecated in favor of `StaticSecret::random_from_rng`. * StaticSecret no longer does its own clamping. * In ed25519-dalek: * `SecretKey` has (in effect) been renamed to `SigningKey`. The name `SecretKey` is now an alias for `[u8; 32]`. * `SigningKey` is effectively a keypair, since it contains a public key as well. * `PublicKey` has been renamed to `VerifyingKey`. * The functions to extract a signing key and verifying key have been renamed as you might expect. * `ExpandedSecretKey` has been moved to `hasmat` and no longer implements `sign`. * `ExpanededSecretKey` now has as its elements a scalar and a hash prefix. * Various functions that took `&[u8]` now take `&[u8; N]`. * We no longer need a wrapper for older versions of rand. There is a single test in tor-keymgr that does not pass. I've marked it as ignore for now, in hopes that @gabi-250 can help me figure it out. This closes #808. There are several changes I want to make before we merge, however. They are marked with TODO DALEK.
* Add more reference links.Nick Mathewson2023-11-201-1/+5
|
* Improve documentation in/around DosParams extensionNick Mathewson2023-11-201-1/+11
| | | | | | It does not help that C tor has a set of parameters and a set of configuration options with exactly the same names which configure the same thing in two slightly different ways.
* cell: make establish_intro accept impl<Into<HsMacKey>>Nick Mathewson2023-08-141-15/+14
| | | | | | | | | | | This allows us to allow passing in opaque HsMacKey objects, rather than untyped byte slices. Additionally, we now check both MAC and signature unconditionally, to avoid the large timing side-channel. The small timing side-channel of combining booleans with `&` is considered safe. Part of #993.
* cell: Remove some TODOsNick Mathewson2023-06-131-3/+0
| | | | | Yes, we still will need more accessors for onion services, but we can add them as we find the need.
* cell: remove/localize "allow(dead-code)"Nick Mathewson2023-06-131-2/+1
|
* Serval rustdoc link fixes.Nick Mathewson2023-03-081-2/+2
|
* tor-cell: Use a match when checking auth_key_typeNick Mathewson2023-03-011-6/+8
|
* tor_cell: Use nested readers and writers for EstablishIntroNick Mathewson2023-03-011-18/+12
|
* tor-cell: tweak comments on EstablishIntro members.Nick Mathewson2023-03-011-2/+2
|
* Introduce a constant for the length of the output of hs_mac()Nick Mathewson2023-03-011-3/+3
|
* tor-cell: Rename EstablishIntro{Body => Details}Nick Mathewson2023-03-011-8/+8
|
* tor-cell: Make EstablishIntro do signaturesNick Mathewson2023-03-011-38/+229
| | | | | | | | | | | | | | | | The old code parsed and encoded a signature and a mac... but there was no way to actually set them properly. Now EstablishIntro is built around an EstablishIntroBody, and has the ability to check signatures and macs. Because there is no way to handle one of these messages if we can't check the signature, we no longer accept unrecognized `auth_key` types in this message. I've added a test to make sure that we can validate a message from the C tor implementation, and a test to make sure we can validate our own cells. I also had to modify the previous tests so that their keys were well-formed.
* tor-cell: Use a more generic mechanism for managing extensionsNick Mathewson2023-02-151-47/+33
| | | | | | | | | | Several HS message types have an extension list type. They all use the same framing for extensions, but each of them has separate extension types and separate extension namespaces. This commit simplifies establish_intro a little, and adds support for maintaining unrecognized extension types--at the expense of some new internal code.
* tor-cell: Extract establish-intro into its own module.Nick Mathewson2023-02-151-0/+217
Some of the HS message types have a lot of dependent types, like extensions and options for those extensions, and so on. Except when those extensions are portable across cell types, it makes sense to put them in their own modules.