<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/arti.git/crates/tor-linkspec/src/ids.rs, branch arti-v1.0.1</title>
<subtitle>mirror of https://gitlab.torproject.org/tpo/core/arti
</subtitle>
<id>http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v1.0.1</id>
<link rel='self' href='http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v1.0.1'/>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/'/>
<updated>2022-08-10T14:39:47Z</updated>
<entry>
<title>tor-netdir: Add a static assertion about RelayIdType::COUNT</title>
<updated>2022-08-10T14:39:47Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-08-09T19:51:05Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=9b91edcb19d41e3d8a474080a6c11851de78c5ad'/>
<id>urn:sha1:9b91edcb19d41e3d8a474080a6c11851de78c5ad</id>
<content type='text'>
Doing this will make sure that we fix a correctness issue in netdir that
will be caused if we add more IDs.

(Also add RelayIdType::COUNT in tor-linkspec.)
</content>
</entry>
<entry>
<title>Implement `Into&lt;RelayIdRef&gt;` for `&amp;RelayId`.</title>
<updated>2022-08-10T14:39:47Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-08-05T16:55:54Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=2f4d58762cf1df74d17a60f178ec5721463d58f4'/>
<id>urn:sha1:2f4d58762cf1df74d17a60f178ec5721463d58f4</id>
<content type='text'>
This will let us use `&amp;RelayId` in all the places that take
`Into&lt;RelayIdRef&gt;`.
</content>
</entry>
<entry>
<title>Final (?) API revisions for tor-linkspec</title>
<updated>2022-08-10T14:39:37Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-08-05T15:47:05Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=2d4507ff35f8e8cf874c81d3754804b2c20f31aa'/>
<id>urn:sha1:2d4507ff35f8e8cf874c81d3754804b2c20f31aa</id>
<content type='text'>
With this change, each individual identity type becomes optional.
The functions that expose them unconditionally are now in a "legacy"
trait that only some downstream types are expected to implement.

There are new convenience APIs in HasRelayIds:
  * to return Option&lt;&amp;keytype&gt;,
  * to see if one identity-set contains another.

This commit will break several downstream crates!  For the
reviewer's convenience, I will put the fixes for those crates into a
series of squash! commits on this one.

tor-netdir
----------

Revise tor-netdir to accept optional identities.  This required some
caveats and workarounds about the cases where we have to deal with a
key type that the tor-netdir code does not currently recognize at
all.  If we start to add more identity types in the future, we may
well want more internal indices in this code.

tor-proto
---------

In order to make tor-proto support optional identities, there were
fewer changes than I thought.  Some "check" functions needed to start
looking at "all the ids we want" rather than at "the two known IDs";
they also needed to accommodate that case where we don't have an ID
that we demand.

This change will also help with bridges, since we want to be able to
connect to a bridge without knowing all of its IDs up front.

The protocol currently _requires_ the two current ID types in some
places. To deal with that, I added a new `MissingId` error.

I also removed a couple of unconditional identity accessors for
chanmgr; code should use `target().identity(...)` instead.

tor-chanmgr
-----------

This is an incomplete conversion: it does not at all handle channel
targets without Ed25519 identities yet.  It still uses those
identities to index its internal map from identity to channel; but
it gives a new `MissingId` error type if it's given a channel target
that doesn't have one.

We'll want to revise the map type again down the road when we
implement bridges, but I'd rather not step on the channel-padding
work in progress right now.

tor-guardmgr
------------

This change is mostly a matter of constructing owned identity types
more sensibly, rather than unwrapping them directly.

There are some places marked with TODOs where we still depend on
particular identity types, because of how the directory protocol
works.  This will need revisiting when we add bridge support here.

tor-circmgr
-----------

These changes are just relatively simple API changes in the tests.
</content>
</entry>
<entry>
<title>linkspec: Add more accessors (some internal) for ids.</title>
<updated>2022-08-10T14:39:37Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-08-05T15:44:05Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=2c2224d6db058ee20533483da413f332c20ec95d'/>
<id>urn:sha1:2c2224d6db058ee20533483da413f332c20ec95d</id>
<content type='text'>
These will all be used shortly.
</content>
</entry>
<entry>
<title>Introduce a RelayIdSet and use it in place of HashSet&lt;RelayId&gt;.</title>
<updated>2022-08-10T14:39:36Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-08-04T21:41:27Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=b56e1bf119252907a2ac6d2838fc5bfd1d08d6dd'/>
<id>urn:sha1:b56e1bf119252907a2ac6d2838fc5bfd1d08d6dd</id>
<content type='text'>
This makes lookups a little more efficient.  I do with that HashSet
just supported this use-case, but for now this seems our best option.
</content>
</entry>
<entry>
<title>Teach guard restrictions about RelayId.</title>
<updated>2022-08-10T14:39:36Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-08-04T14:07:54Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=deaf8b657d7b84cc1fd1ad89c5b25afd71062ebf'/>
<id>urn:sha1:deaf8b657d7b84cc1fd1ad89c5b25afd71062ebf</id>
<content type='text'>
This implementation is (sadly) too copy-heavy or now, because
HashSet&lt;RelayId&gt; can't be indexed with RelayIdRef.
</content>
</entry>
<entry>
<title>Parsing, encoding, and serde for RelayId.</title>
<updated>2022-08-10T14:39:36Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-08-03T21:38:05Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=d60d8757496311b8304764fce06c1c3e35673b00'/>
<id>urn:sha1:d60d8757496311b8304764fce06c1c3e35673b00</id>
<content type='text'>
The formats used here are backward-compatible with those used by C
tor and those used elsewhere in our code.  We need a way to encode
_both_ current kinds of identities as a string that tells you what
kind of ID they are.  Traditionally we have used hexadecimal,
sometimes with a $, for RSA ids, and we have used base64 for Ed25519
IDs.

We also introduce a new forward-compatible format for new identity
keys in the future.  (The new format is the key identity type, a
colon, and the id encoded as base64.)  We will use this new format
_only_ when we need to encode identities in a way where it would be
otherwise unclear what kind of key we are dealing with.
</content>
</entry>
<entry>
<title>Add a set of Identity-related types and accessors.</title>
<updated>2022-08-10T14:39:36Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-08-03T15:26:53Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=9d4729a0723a8bace54ceccd65e42c655dce0d10'/>
<id>urn:sha1:9d4729a0723a8bace54ceccd65e42c655dce0d10</id>
<content type='text'>
I wonder if these types are correct.  I think it makes sense to have
a Ref type like this, rather than just using `&amp;RelayId`, but it
doesn't seems that I can make `RelayId` and `RelayIdRef` implement
Borrow and ToOwned for one another, so maybe I've messed up.
</content>
</entry>
</feed>
