summaryrefslogtreecommitdiff
path: root/crates/tor-hscrypto
Commit message (Collapse)AuthorAgeFilesLines
* Bump the patch version of every crate that had API additionsNick Mathewson2023-02-011-1/+1
| | | | | | These crates had API or behavior changes that may affect downstream crates. Fortunately, they're all version 0.x, and don't need minor bumps for this.
* netdir: Implement ring-param constructors and time period accessorsNick Mathewson2023-01-281-0/+16
| | | | | | | | | | | | | | This logic is a bit tricky, so I've tried to document it and add fairly good tests. The silver lining is that the external API for all of this logic will make it invisible and hidden. There are some cases where I added functions that I think might eventually get lowered into MdConsensus: But I don't want to lower too much right now, since the convention for our netdoc accessors is that they are fairly unsophisticated, and they show you the document as it is. Closes #686
* Allow clippy::unchecked_duration_subtraction in testsNick Mathewson2023-01-273-0/+3
| | | | | This panics on error, and we're fine with a panic on misbehavior in tests.
* Disable clippy::unlinlined-format-argsNick Mathewson2023-01-271-0/+1
| | | | | | | | This warning kind of snuck up on us! (See #748) For now, let's disable it. (I've cleaned it up in a couple of examples, since those are meant to be more idiomatic and user-facing.) Closes #748.
* hscrypto: Remove Credential.Nick Mathewson2023-01-251-19/+2
| | | | | | It turns out that the credential is only calculated as an intermediate result in order to blind keys and produce the subcredential. As such, it has no need to leave the hscrypto module.
* hscrypto: add a note about maybe replacing epoch_offset with voting_intervalNick Mathewson2023-01-251-0/+3
|
* hscrypto: Explain why vanity onions require expanded secret keys.Nick Mathewson2023-01-251-1/+11
|
* hscrypto: document why we have keys in un-expanded formNick Mathewson2023-01-251-3/+12
|
* hscrypto: Note that maybe Duration is the wrong type to use.Nick Mathewson2023-01-251-0/+5
|
* hscrypto: Note the need for a Result rather than an OptionNick Mathewson2023-01-251-0/+4
|
* Apply several clarifications (and fixes for missing refs)Ian Jackson2023-01-253-1/+7
|
* hscrypto: Use derive_more, and derive Deref for public keys.Nick Mathewson2023-01-252-32/+3
|
* hscrypto: Revise TimePeriod to account for variable offset.Nick Mathewson2023-01-242-22/+34
| | | | | | | | Previously, the offset was set to 12 hours unconditionally (like the spec says). But based on a conversation on tor-dev, it seems that the offset should actually be 12 times the voting interval. I'm also opening an MR to change the spec.
* hscrypto: Add documentation for ClientSecretKeysNick Mathewson2023-01-241-0/+3
|
* Add a note about why we use ExpandedSecretKey for OnionIdSecretKeyNick Mathewson2023-01-242-2/+7
|
* hscrypto: Add our standard clippy warningsNick Mathewson2023-01-244-1/+66
| | | | | | (I have squashed the fixes for these warnings into the earlier commits in this branch, so it will look like I did everything right the first time.)
* hscrypto: Implement key blinding.Nick Mathewson2023-01-243-11/+231
| | | | | This implementation was made based on the specification, and then validated against itself, and against C Tor.
* hscrypto: Add an implementation for TimePeriodNick Mathewson2023-01-242-11/+119
| | | | | This required some API tweaks, which is probably to be expected; these time periods are a wonky kind of thing.
* hscrypto: Implement hs_mac.Nick Mathewson2023-01-242-2/+57
|
* hscrypto: Improve documentation for RendCookieNick Mathewson2023-01-241-1/+5
|
* hscrypto: use a macro to define our byte wrappers too.Nick Mathewson2023-01-243-10/+56
|
* hscrypto: Add and use a macro to define all PK types.Nick Mathewson2023-01-244-37/+90
|
* hscrypto: A couple of spelling fixes.Nick Mathewson2023-01-241-2/+2
|
* hscrypto: Associate each type with new name from rend-spec-v3.txtNick Mathewson2023-01-242-10/+12
|
* CircMgr: Draft APIs used to implement onion service clients.Nick Mathewson2023-01-241-0/+9
|
* Sketch APIs for the onion service directory ring.Nick Mathewson2023-01-111-4/+0
| | | | | | | | | These are a bit complex internally, but the API they present is pretty simple. I've left some discussion of points where the design isn't totally fleshed out, and where we need to look harder at the spec. Part of #716.
* hscrypto: Add several derivesNick Mathewson2023-01-113-1/+14
| | | | | The important addition here is the Copy derives, which affect API design. I'm applying them to the types that are 32 byte or smaller.
* Create a new tor-hscrypto crate.Nick Mathewson2023-01-066-0/+250
This module has types and operations needed in multiple places for an onion service implementation. There are a bunch of TODO hs-crypto comments that we'll need to fill in.