summaryrefslogtreecommitdiff
path: root/crates/tor-hscrypto/src/pk.rs
Commit message (Collapse)AuthorAgeFilesLines
* hscrypto: Use minutes, not seconds, in blinding parameter.Nick Mathewson2023-02-101-8/+4
| | | | | | | | | | | | Fixes an instance of #768. The problem with the test vectors is that I used a random time period number (1234) and the default-in-tor period length (1440) without checking whether 1440 _meant_ minutes or seconds. I'll add another test to Tor to make sure that the time period matches now. With this change, I can test Tor-generated hsdescs with encryption, so I'm fairly confident that the new behavior is correct.
* hs time handling: Make TimePeriod contain length as IntegerMinutesIan Jackson2023-02-091-1/+4
| | | | | | Locally, the only functional effect is that now we refuse to handle non-whole-number-of-minutes lengths - but since the consensus parameter can't represent those, there's no overall functional change.
* hscrypto,netdoc: Add and use a type for KP_hss_desc_enc.Nick Mathewson2023-02-081-0/+8
|
* tor-hscrypto: Rename key types to correspond to new spec names.Nick Mathewson2023-02-081-62/+56
|
* Rename key identifiers that have changed in the specNick Mathewson2023-02-081-1/+1
| | | | | | | | | Generated with perl: s/K([PS])_hs_intro_tid/K$1_hs_ipt_sid/g; s/K([PS])_onion_ntor/K$1_ntor/g; s/K([PS])_hs_intro_ntor/K$1_hss_ntor/g; s/K([PS])_hs_desc_ephem/K$1_hss_desc_enc/g;
* hscrypto: Impl From<Ed25519Identity> for BlindedOnionId.Nick Mathewson2023-02-071-0/+6
|
* Allow clippy::unchecked_duration_subtraction in testsNick Mathewson2023-01-271-0/+1
| | | | | This panics on error, and we're fine with a panic on misbehavior in tests.
* 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
|
* Apply several clarifications (and fixes for missing refs)Ian Jackson2023-01-251-0/+2
|
* hscrypto: Revise TimePeriod to account for variable offset.Nick Mathewson2023-01-241-1/+4
| | | | | | | | 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-241-1/+5
|
* hscrypto: Add our standard clippy warningsNick Mathewson2023-01-241-0/+10
| | | | | | (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-241-8/+223
| | | | | This implementation was made based on the specification, and then validated against itself, and against C Tor.
* hscrypto: use a macro to define our byte wrappers too.Nick Mathewson2023-01-241-3/+7
|
* hscrypto: Add and use a macro to define all PK types.Nick Mathewson2023-01-241-36/+26
|
* 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-241-8/+10
|
* CircMgr: Draft APIs used to implement onion service clients.Nick Mathewson2023-01-241-0/+9
|
* hscrypto: Add several derivesNick Mathewson2023-01-111-0/+9
| | | | | 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-061-0/+124
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.