aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-netdoc/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | | tor-netdoc: Move FromIterator doc to type docClara Engler2026-05-191-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | This commit moves the documentation for FromIterator<RelayFamilyId> for RelayFamilyIds to the type level documentation of RelayFamilyIds. It also rephrases the comment to fit in there more nicely grammatically and contextually, as a pure motion of the comment would not have been helpful to have there in any circumstance.
* | | tor-netdoc: Add TODO for sort/dedup in FromIteratorClara Engler2026-05-191-0/+3
| | | | | | | | | | | | | | | | | | | | | Adds a TODO with regard to .sort() and .dedup() in FromIterator in RelayFamilyIds and the fact that it is slightly weird. This is not a new problem with the type but stems from the fact that it tries to emulate a BTreeSet inside a Vec which is not nice.
* | | tor-netdoc: Derive PartialOrd, Ord on NumericBooleanClara Engler2026-05-191-1/+1
| | | | | | | | | | | | While already here, do this change, in case it becomes useful later on.
* | | tor-netdoc: Sort and dedup in RelayFamilyIds::from_iterClara Engler2026-05-191-1/+7
| | | | | | | | | | | | | | | This makes working with this more comfortable as those calls are generally required anyways.
* | | tor-netdoc: Derive Copy on RsaIdentity wrappersClara Engler2026-05-191-4/+4
| | | | | | | | | | | | | | | RsaIdentity implements Copy itself so it makes sense to derive it on those wrappers too.
* | | tor-netdoc: Derive Eq for NumericBooleanClara Engler2026-05-191-1/+1
| | | | | | | | | | | | Helpful in tests instead of Deref.
* | | tor-netdoc: Derive Transparent on NumericBooleanClara Engler2026-05-191-5/+8
| | | | | | | | | | | | Fixes an outstanding TODO.
* | | tor-netdoc: Derive Transparent on Ed25519PublicClara Engler2026-05-191-7/+2
|/ / | | | | | | | | We will need an inverse of the existing From implementation so that derivation makes sense because we will obtain it for free then.
* | tor-netdoc: Store ntor_onion_key as Curve25519PublicClara Engler2026-05-181-4/+3
| |
* | tor-netdoc: Use saturating SystemTime add/sub (fmt)Clara Engler2026-05-181-2/+6
| | | | | | | | No functional change.
* | tor-netdoc: Use saturating SystemTime add/subClara Engler2026-05-181-4/+3
| | | | | | | | This commit deserves no explanation, it should be the default.
* | tor-netdoc: Store published in Iso8601TimeSpClara Engler2026-05-181-6/+7
| |
* | tor-netdoc: Add intro item to RouterDescClara Engler2026-05-181-28/+26
|/ | | | | | | | | | | This commit introduces `RouterDesc::router` using `RouterDescIntroItem` by moving `nickname`, `orport`, `dirport`, and `ipv4addr` into it. A notable change is that ipv4addr is no longer stored in an `Option`. I have no idea why this was the case because it has always been mandatory and never None anyways, but I suspect it was to be able to treat it as an iterator, something we can also achieve using iter::once().
* tor-netdoc: Constructor: insist on proper Constructor non-exhaustive patternIan Jackson2026-05-131-1/+9
|
* tor-netdoc: SharedRandStatuses: Use proper Constructor non-exhaustive patternIan Jackson2026-05-133-1/+7
|
* tor-netdoc: SharedRandParticipate: Add TODO re "presence" typeIan Jackson2026-05-131-0/+2
|
* tor-netdoc: SharedRandCommitV1: Improve type of revealIan Jackson2026-05-131-1/+4
|
* tor-netdoc: SharedRandCommitV1: Improve type of commitIan Jackson2026-05-131-1/+7
| | | | | | | Use FixedB64 since it is in fact fixed length. While we're here, add the docs link I had to follow to figure this out.
* tor-netdoc: VoteAuthorityEntry: reorder fields to spec orderIan Jackson2026-05-131-4/+4
| | | | Only SharedRandStatuses was out of place.
* tor-netdoc: rustfmt (re-alphabetise and re-wrap imports)Ian Jackson2026-05-131-2/+1
|
* tor-netdoc: vote authority entry: declare it completeIan Jackson2026-05-131-3/+0
|
* tor-netdoc: vote authority entry: parse shared-rand-commitIan Jackson2026-05-131-2/+89
| | | | This is rather ugly, because the protocol is being ad-hoc again.
* tor-netdoc: vote authority entry: parse shared-rand-participateIan Jackson2026-05-131-1/+21
|
* tor-netdoc: vote authority entry: parse legacy-dir-keyIan Jackson2026-05-131-1/+6
|
* tor-netdoc: Soften a TODO.Ian Jackson2026-05-131-2/+2
| | | | | Preamble now doesn't contain anything that's *wrong*. It is missing a couple of fields that will be wanted when we generate votes.
* tor-netdoc: Add a ticket reference for a TODOIan Jackson2026-05-131-1/+1
| | | | | This isn't needed for the arti dirauth consensus method, but it will be needed for arti dirauth vote calculator.
* tor-netdoc: Add shared-rand-*-status to VoteAuthorityEntryIan Jackson2026-05-132-5/+4
|
* tor-netdoc: Break out SharedRandStatuses, and remove it from votesIan Jackson2026-05-135-14/+39
|
* tor-netdoc: impl Ord and PartialOrd for byte wrapper typesIan Jackson2026-05-131-2/+14
|
* tor-netdoc: derive Ord and PartialOrd for RSA fingerprint typesIan Jackson2026-05-131-4/+4
| | | | | This will let us use them in types in ordered lists in netdocs, without fuss.
* tor-netdoc: impl NetdocEncodableFields for NotPresentIan Jackson2026-05-131-1/+4
| | | | | And document its meaning when parsing and encoding as flattened fields.
* tor-netdoc: NetdocEncodableFields: Suppress warnings for empty structsIan Jackson2026-05-131-0/+2
|
* tor-netdoc: NetdocEncodableFields: Suppress warnings for empty structs (pre-fmt)Ian Jackson2026-05-131-1/+4
|
* tor-netdoc: Parsing with `#[netdoc(flatten)]`: cope with non-path typesIan Jackson2026-05-131-1/+1
| | | | ns_type! is a non-path type.
* Merge branch 'rd-fingerprint' into 'main'Clara Engler2026-05-131-4/+4
|\ | | | | | | | | Store fingerprint in Option<SpFingerprint> See merge request tpo/core/arti!3978
| * tor-netdoc: Change fingerprint to Option<SpFingerprint>Clara Engler2026-05-121-2/+2
| |
| * tor-netdoc: Obtain RSA identity from signing keyClara Engler2026-05-121-2/+1
| | | | | | | | | | Will be required and unavoidable as we will change fingerprint to Option<SpFingerprint> in the next commit.
| * tor-netdoc: Return copy in RouterDesc::rsa_identity()Clara Engler2026-05-121-2/+3
| | | | | | | | | | | | | | | | | | | | | | This change might seem pointless for now but it will be required and unavoidable later on, because we will have to change RouterDesc::fingerprint from RsaIdentity to Option<SpFingerprint> which will make it impossible to be used inside the getter anymore. With this change, our only resort is to obtain the RSA identity from the signing key but we can only return a copy then because that RSA identity is created ad-hoc then.
* | Merge branch 'directory-signature-3' into 'main'Clara Engler2026-05-138-568/+618
|\ \ | | | | | | | | | | | | tor-netdoc: Sort out netstatus signatures See merge request tpo/core/arti!3937
| * | tor-netdoc: Replace an IEFE with use of .and_then() (fmt)Ian Jackson2026-05-051-6/+5
| | |
| * | tor-netdoc: Replace an IEFE with use of .and_then()Ian Jackson2026-05-051-3/+4
| | | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3937#note_3405033 Suggested-by: Clara Engler <[email protected]>
| * | tor-netdoc: Apply deferred rustfmt churnIan Jackson2026-04-293-34/+41
| | |
| * | tor-netdoc: Turn DirectorySignatureHashAlgo back into a normal structIan Jackson2026-04-292-31/+12
| | | | | | | | | | | | | | | | | | Abolish the terrible macro. Review with --color-moved-ws=allow-indentation-change --color-moved.
| * | tor-netdoc: re-privatise some methodsIan Jackson2026-04-291-6/+4
| | | | | | | | | | | | | | | hash_slice_for_verification is still needed by code in poc, that we're not replacing in this MR. So that TODO gets downgraded, instead.
| * | tor-netdoc: directory-signature: don't re-hash unnecessarilyIan Jackson2026-04-291-3/+4
| | |
| * | tor-netdoc: Fix handling of explicit vs implicit dir sig SHA1 hashIan Jackson2026-04-291-6/+2
| | | | | | | | | | | | | | | Now that everything is prepared, we can add the sha1_unnamed field in the hash accumulator.
| * | tor-netdoc: Fix signature of hash_slice_for_verificationIan Jackson2026-04-292-14/+10
| | | | | | | | | | | | | | | | | | | | | In order to handle marked vs unmarked SHA1 correctly, it needs the original DigestAlgoInSignature. The only call site is in poc's verification code.
| * | tor-netdoc: Fix signature of hash_slice_for_verification (pre-fmt)Ian Jackson2026-04-291-1/+4
| | |
| * | tor-netdoc: Abolish poc's netstatus signature typeIan Jackson2026-04-292-159/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use prod's Signature instead. This gets rid of: * The old parsing code. We have a new approach based on ItemValueParseable, KeywordOrString and and DigestAlgoInSignature. * The duplicate DirectorySignaturesHashesAccu and its temporary conversions. poc's verify_timeless function needs a little adjustment for the new struct layout.
| * | tor-netdoc: Promote hash_slice_for_verification to prodIan Jackson2026-04-292-13/+13
| | | | | | | | | | | | | | | | | | This function is not right, yet. We're going to fix it later. Review with --color-moved.