aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-proto/src/crypto/binding.rs
Commit message (Collapse)AuthorAgeFilesLines
* tor-proto: Refactor the key derivationEmil Engler2023-09-291-0/+11
| | | | | | | | | | | | This commit refactors the key derivation, by applying the following: - The spaghetti slice creation with the hard-to-read boundaries got replaced by a closure, which accepts a length, advances the seed slice by n bytes as a side-effect, and returns the just advanced bytes - The use of `.except` got replaced by an `.or`, with the use of the already existing `InvalidKDFOutputLength` error, thereby removing a potential panic (probably not reachable in runtime though) - The conversion from a slice to a `CircuitBinding` got moved into a `TryFrom` trait of the appropriate data structure
* tor-proto: Add a missing cfgIan Jackson2023-09-131-0/+1
| | | | | Fixes cargo clippy -p tor-hsclient --all-features --all-targets
* proto: API to expose the `CircuitBinding` type.Nick Mathewson2023-08-141-2/+1
| | | | Closes #993
* proto: Add (not-yet-exposed) code to remember and use KH valuesNick Mathewson2023-08-141-0/+53
These values are computed as part of the circuit extension handshake, and are used as MAC keys to bind `ESTABLISH_INTRO` messages to a particular circuit so that they can't be replayed. Part of #993.