| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | |
| | |
| | |
| | |
| | | |
Fixes the numbering due to a recently added additional check.
Review using --word-diff=color.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit properly verifies the certified key type by not returning a
bug but rather invalid data in the case of the certified key not being
an Ed25519 key.
Tests and number adjustments will follow.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit adds a new type, Ed25519FamilyCert, which works very similar
to Ed25519IdentityCert, except that it supports family certificates.
A notable difference is, that the identity key must be provided during
verification because it does not make sense to verify these certificates
without it.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit implements the Ed25519IdentityCert type using EmbeddableCert
logic that was introduced recently. These certificates contain the
identity key and the signing key of a relay and the type provides two
methods: .verify() for verification and .new_signed() for construction.
Besides, edcert::* is now made public as this is required now given that
it contains public types.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit adds the test utilities required for testing the
yet-to-be-implemented Ed25519IdentityCert and Ed25519FamilyCert types,
whose interface largely overlaps, making a test "framework" useful to
avoid code duplication.
Their interfaces consist of two functions:
* `.verify(Ed25519Identity, KeyUnknownCert, Duration, SystemTime)`
* Verifies a KeyUnknownCert whether it is valid, given a SystemTime
plus post valid tolerance alongside a well-known identity key in
the case of family certificates.
* `.new_signed(&ed25519::Keypair, Ed25519Identity, SystemTime)`
* Creates a new certificate from a signing keypair plus a certified
key alongside a SystemTime at when this certificate will expire.
The commit introduces a testing trait that will be implemented for both
types once added. Then, there are two generic tests that test the
generation and verification of a valid random one as well as a test that
tests violation of various constraints common to these certificates.
The generic trait is most notable for the .new_signed() and .verify()
method which we are roughly documented. Please see the next commit for
a concrete example if understanding is hard.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | |
| | |
| | |
| | | |
While already here, do this change, in case it becomes useful later on.
|
| | | |
| | |
| | |
| | |
| | | |
This makes working with this more comfortable as those calls are
generally required anyways.
|
| | | |
| | |
| | |
| | |
| | | |
RsaIdentity implements Copy itself so it makes sense to derive it on
those wrappers too.
|
| | | |
| | |
| | |
| | | |
Helpful in tests instead of Deref.
|
| | | |
| | |
| | |
| | | |
Fixes an outstanding TODO.
|
| |/ /
| |
| |
| |
| | |
We will need an inverse of the existing From implementation so that
derivation makes sense because we will obtain it for free then.
|
| | | |
|
| | |
| |
| |
| | |
No functional change.
|
| | |
| |
| |
| | |
This commit deserves no explanation, it should be the default.
|
| | | |
|
| |/
|
|
|
|
|
|
|
|
|
| |
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().
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
| |
Only SharedRandStatuses was out of place.
|
| | |
|
| | |
|
| |
|
|
| |
This is rather ugly, because the protocol is being ad-hoc again.
|
| | |
|
| | |
|
| |
|
|
|
| |
Preamble now doesn't contain anything that's *wrong*. It is missing a
couple of fields that will be wanted when we generate votes.
|
| |
|
|
|
| |
This isn't needed for the arti dirauth consensus method, but it will
be needed for arti dirauth vote calculator.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This will let us use them in types in ordered lists in netdocs,
without fuss.
|
| |
|
|
|
| |
And document its meaning when parsing and encoding as flattened
fields.
|
| | |
|
| | |
|
| |
|
|
| |
ns_type! is a non-path type.
|
| |\
| |
| |
| |
| | |
Store fingerprint in Option<SpFingerprint>
See merge request tpo/core/arti!3978
|
| | | |
|
| | |
| |
| |
| |
| | |
Will be required and unavoidable as we will change fingerprint to
Option<SpFingerprint> in the next commit.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |\ \
| | |
| | |
| | |
| | | |
tor-netdoc: Sort out netstatus signatures
See merge request tpo/core/arti!3937
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3937#note_3405033
Suggested-by: Clara Engler <[email protected]>
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | | |
Abolish the terrible macro.
Review with --color-moved-ws=allow-indentation-change --color-moved.
|
| | | |
| | |
| | |
| | |
| | | |
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.
|
| | | | |
|