<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/arti.git/crates/tor-key-forge/src/traits.rs, branch arti-v1.4.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.4.1</id>
<link rel='self' href='http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v1.4.1'/>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/'/>
<updated>2025-01-13T19:29:19Z</updated>
<entry>
<title>tor-key-forge: Remove no longer needed ItemType impl for KeyUnknownCert.</title>
<updated>2025-01-13T19:29:19Z</updated>
<author>
<name>Gabriela Moldovan</name>
<email>gabi@torproject.org</email>
</author>
<published>2024-12-12T16:43:18Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=d87d11c7a83b158bdb3ea52ff545462a5a5278c0'/>
<id>urn:sha1:d87d11c7a83b158bdb3ea52ff545462a5a5278c0</id>
<content type='text'>
No longer used, because we're now using `ParsedEd25519Cert` instead of
`KeyUnknownCert` to represent parsed but not yet validated certs.
</content>
</entry>
<entry>
<title>tor-key-forge: Implement ItemType for ParsedEd25519Cert.</title>
<updated>2025-01-13T19:28:23Z</updated>
<author>
<name>Gabriela Moldovan</name>
<email>gabi@torproject.org</email>
</author>
<published>2024-12-12T13:58:43Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=beacb0a729f1c598b2386a4ddbea88dc7f8aa9d8'/>
<id>urn:sha1:beacb0a729f1c598b2386a4ddbea88dc7f8aa9d8</id>
<content type='text'>
This will enable us to retrieve it from the keystore as an `ErasedKey`
(side note, we should rename `ErasedKey` to `ErasedItem`).
</content>
</entry>
<entry>
<title>tor-key-forge: Fill out the InvalidCertError type.</title>
<updated>2025-01-13T19:28:21Z</updated>
<author>
<name>Gabriela Moldovan</name>
<email>gabi@torproject.org</email>
</author>
<published>2024-12-12T17:00:36Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=88927e965a93ba9153a33068d2a04f2704b092aa'/>
<id>urn:sha1:88927e965a93ba9153a33068d2a04f2704b092aa</id>
<content type='text'>
We'll soon use this.
</content>
</entry>
<entry>
<title>tor-key-forge: Add ItemType impl for KeyUnknownCert.</title>
<updated>2025-01-13T19:22:37Z</updated>
<author>
<name>Gabriela Moldovan</name>
<email>gabi@torproject.org</email>
</author>
<published>2024-12-11T14:09:16Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=7576e1345d1230f48414a38f0c1dcd558c479984'/>
<id>urn:sha1:7576e1345d1230f48414a38f0c1dcd558c479984</id>
<content type='text'>
`KeyUnknownCert` will soon be used as the `ToEncodableCert::ParsedCert`
type for Tor ed25519 certs.

For example, the `ToEncodableCert` impl for `RelaySigningKeyCert` will
look like this:

```rust
pub struct RelaySigningKeyCert(EncodedEd25519Cert);

impl ToEncodableCert&lt;RelaySigningKeypair&gt; for RelaySigningKeyCert {
    type ParsedCert = KeyUnknownCert;
    type EncodableCert = EncodedEd25519Cert;
    type SigningKey = RelayIdentityKeypair;

    fn validate(
        cert: Self::ParsedCert,
        subject: &amp;RelaySigningKeypair,
        signed_with: &amp;Self::SigningKey,
    ) -&gt; Result&lt;Self, InvalidCertError&gt; {
        // TODO: validate `KeyUnknownCert`
        // and convert it to an EncodedEd25519Cert
        // (we don't yet an easy way to perform this conversion)
    }

    fn to_encodable_cert(self) -&gt; Self::EncodableCert {
        self.0
    }
}
```
</content>
</entry>
<entry>
<title>tor-key-forge: Split out ItemType as a separate trait.</title>
<updated>2025-01-13T19:22:36Z</updated>
<author>
<name>Gabriela Moldovan</name>
<email>gabi@torproject.org</email>
</author>
<published>2024-12-10T20:27:38Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=d45ab843b6506dfbfea456ed585c34f60100a280'/>
<id>urn:sha1:d45ab843b6506dfbfea456ed585c34f60100a280</id>
<content type='text'>
This is necessary because `ParsedCert`s will not be `EncodableItem`s.
This is because we cannot (and don't want to) write certificates that
have not yet been validated to the keystore. They do need to be
retrievable from the keystore though, so we also change `ErasedKey`
to be `Box&lt;dyn ItemType&gt;` instead.
</content>
</entry>
<entry>
<title>tor-key-forge: Distinguish between parsed certs and encodable certs.</title>
<updated>2025-01-13T19:21:45Z</updated>
<author>
<name>Gabriela Moldovan</name>
<email>gabi@torproject.org</email>
</author>
<published>2024-12-11T13:52:14Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=ff0e2a9ae1178d6f7a7b3d23ff2b87b8aa3560a0'/>
<id>urn:sha1:ff0e2a9ae1178d6f7a7b3d23ff2b87b8aa3560a0</id>
<content type='text'>
We need two different types to represent
  * certs that have been parsed, but not yet validated
    (`KeyUnknownCert`)
  * newly generated encodable certs (`EncodedEd25519Cert`)

Currently, we don't use `KeyUnknownCert` anywhere, and instead use
`EncodedEd25519Cert` to represent "parsed" but not-yet-validated certs.
This approach is wrong and relies on a broken (no-op)
`EncodedEd25519Cert::from_bytes` implementation. A future commit will
address this problem by replacing `EncodedEd25519Cert::from_bytes` with
`Ed25519Cert::decode` to actually parse the cert upon retrieving it from
the keystore.
</content>
</entry>
<entry>
<title>tor-keymgr: Replace from_encodable_cert with validation function.</title>
<updated>2025-01-13T19:21:45Z</updated>
<author>
<name>Gabriela Moldovan</name>
<email>gabi@torproject.org</email>
</author>
<published>2024-12-10T12:07:04Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=841e1f477f2bec92b5be80afcef16df9e1e50a20'/>
<id>urn:sha1:841e1f477f2bec92b5be80afcef16df9e1e50a20</id>
<content type='text'>
In practice, we won't be able to obtain an `ToEncodableCert` type from
an `EncodableItem` cert without validating it first, so we need to
collapse `validate` into `from_encodable_cert`.

Part of #1768
</content>
</entry>
<entry>
<title>tor-hscrypto: Move encodable key trait impls from tor-key-forge.</title>
<updated>2024-12-11T16:13:10Z</updated>
<author>
<name>Gabriela Moldovan</name>
<email>gabi@torproject.org</email>
</author>
<published>2024-12-11T16:11:54Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=cf6998c7e8fa42d29847759d96af3c5fe02ab5f0'/>
<id>urn:sha1:cf6998c7e8fa42d29847759d96af3c5fe02ab5f0</id>
<content type='text'>
This enables us to get rid of the tor-key-forge -&gt; tor-hscrypto
dependency, partially addressing the TODO from `tor_key_forge::traits`.

This commit is mostly code motion. Best reviewed with `--color-moved`.

See also #1778
</content>
</entry>
<entry>
<title>tor-key-forge: Implement KeystoreItem::item_type.</title>
<updated>2024-12-04T16:42:06Z</updated>
<author>
<name>Gabriela Moldovan</name>
<email>gabi@torproject.org</email>
</author>
<published>2024-11-25T12:20:58Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=9fec1799d9ac41ac7dffa085d71a82c96cb5b076'/>
<id>urn:sha1:9fec1799d9ac41ac7dffa085d71a82c96cb5b076</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tor-key-forge: s/EncodableKey/EncodableItem in documentation.</title>
<updated>2024-12-04T16:42:06Z</updated>
<author>
<name>Gabriela Moldovan</name>
<email>gabi@torproject.org</email>
</author>
<published>2024-11-25T10:32:47Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=ec173384504649bd78be2889120308342b7a9731'/>
<id>urn:sha1:ec173384504649bd78be2889120308342b7a9731</id>
<content type='text'>
</content>
</entry>
</feed>
