aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-netdoc/src/doc
Commit message (Collapse)AuthorAgeFilesLines
...
| * tor-netdoc: relay flags with: Use ns_type! rather than conditional importIan Jackson2026-05-181-4/+7
| | | | | | | | | | | | | | | | Previously, this was't possible because derive-deftly wanted a string. But now it can take a type, and types can contain macro calls inside their generics etc. This makes the code much more local and direct.
| * tor-netdoc: Fix comments in rs variety filesIan Jackson2026-05-183-3/+3
| | | | | | | | This is router *status* not router *descriptor*.
| * tor-netdoc: Fix NotPresent to use same Each valueIan Jackson2026-05-181-2/+2
| |
* | 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: 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
|
* 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-133-355/+580
|\ \ | | | | | | | | | | | | 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-292-8/+12
| | |
| * | tor-netdoc: Turn DirectorySignatureHashAlgo back into a normal structIan Jackson2026-04-291-2/+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-291-5/+8
| | | | | | | | | | | | | | | | | | | | | 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-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-291-0/+12
| | | | | | | | | | | | | | | | | | This function is not right, yet. We're going to fix it later. Review with --color-moved.
| * | tor-netdoc: impl SignatureItemParseable for netstatus::SignatureIan Jackson2026-04-291-1/+14
| | | | | | | | | | | | | | | This is now pretty straightforward. The functions it calls need some work - we have blocking TODOs for that.
| * | tor-netdoc: Introduce DirectorySignaturesHashesAccu::update_fromIan Jackson2026-04-291-3/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This now contains the hashing code that was in poc. In poc it was entangled with the signature type, mostly because once upon a time the hash was inside the signature. In the real code we can make it a standalone method. It takes DigestAlgoInSignature so that it will be able to handle the explicit vs implicit sha1 anomaly correctly - but it can't do that yet because the necessary field doesn't exist yet. Also, we are going to want to make it a bit lazier - preserve the MR-blocking todo for that. A handful of lines are being actually moved verbatim, so --color-moved may help a bit.
| * | tor-netdoc: Promote poc's DirectorySignaturesHashesAccu to prodIan Jackson2026-04-291-1/+39
| | | | | | | | | | | | | | | | | | | | | There are definitely some things wrong with this, but they all have MR-blocking TODOs so we can promote this type now. Largely code motion. Review with --color-moved.
| * | tor-netdoc: derive ItemValue parsing/encoding for SignatureIan Jackson2026-04-292-4/+10
| | | | | | | | | | | | This doesn't let us do any verification or anything.
| * | tor-netdoc: impl parsing/encoding for AuthCertKeyIds in directory-signatureIan Jackson2026-04-291-1/+68
| | | | | | | | | | | | | | | This module will be used when we derive ItemValueParseable on Signature.
| * | tor-netdoc: Introduce DigestAlgoInSignature parsing/encoding typeIan Jackson2026-04-291-3/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And change the type of the field in Signature. We are going to abandon the almost completely manual parsing approach taken in poc's NdiDirectorySignature. That parsing approach was heavily influenced by poc's struct layout, which in turn was influenced by the way that previously, hashes were inside signatures. Instead we'll derive ItemValueParseable from Signature, and semi-manually implement the hash update. This type is the one that embodies the `directory-signature` item's parsing strangeness: the optional initial positional argument.
| * | tor-netdoc: Unify authcert test modules (fmt)Ian Jackson2026-04-291-313/+308
| | |
| * | tor-netdoc: Unify authcert test modulesIan Jackson2026-04-291-32/+18
| | | | | | | | | | | | | | | | | | | | | | | | Abolish the parse2_test and encode_test modules. These mostly existed because of cfg gates. Now, we can unify the test module namespace, and also remove an indentation level (that will come next, with rustfmt).
| * | tor-netdoc: netsatus: glob import from types, not types::miscIan Jackson2026-04-291-1/+1
| | | | | | | | | | | | | | | | | | This way we import via the public names, which is more sensible, and we include things that aren't in misc. The whole of types is pretty good as a glob import here.
| * | tor-netdoc: parse2: Add missing ItemObjectParseable to preludeIan Jackson2026-04-291-2/+0
| | | | | | | | | | | | And remove a then-unneeded import in a using module.
* | | Upgrade rand crates to 0.10.Wesley Aptekar-Cassels2026-05-126-19/+17
| |/ |/| | | | | | | | | | | | | | | | | | | When the circ-padding feature is enabled, we use maybenot, which does not yet support rand 0.10. In the meantime, enabling this feature pulls in rand 0.9. This is not ideal, but should be okay as a temporary situation. This also replaces the use of ReseedingRng (which was removed in 0.10) with the reseeding_rng crate. This is somewhat less performant, but it should be okay.
* | tor-netdoc: Rename RouterDesc real items to their real nameClara Engler2026-05-121-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit changes the name of all (except accept/reject) real items in RouterDesc to their proper name as found in the spec. This is a breaking change and semver.md has been updated properly. In the instanciation of RouterDesc in the legacy parser, we now use a "weird" syntax of some fields using a different name throughout the code, but that is ok. Changing this would make the diff way larger at the risk of breaking things, especially because many variables such as identity_cert get shadowed countless times within the function, making it harder and error prone to change.