<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/arti.git/crates/tor-key-forge/src/traits.rs, branch arti-v1.4.6</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.6</id>
<link rel='self' href='http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v1.4.6'/>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/'/>
<updated>2025-04-03T17:32:58Z</updated>
<entry>
<title>fix `clippy::doc_overindented_list_items`</title>
<updated>2025-04-03T17:32:58Z</updated>
<author>
<name>Steven Engler</name>
<email>opara@torproject.org</email>
</author>
<published>2025-04-03T17:21:49Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=663339ffa8bd00ce59c2dd39c288d338505263c3'/>
<id>urn:sha1:663339ffa8bd00ce59c2dd39c288d338505263c3</id>
<content type='text'>
Example:

```text
warning: doc list item overindented
   --&gt; crates/arti-rpc-client-core/src/conn/connimpl.rs:322:9
    |
322 |     ///    indicates that no more messages will be received for this request.
    |         ^^^ help: try using `  ` (2 spaces)
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items
note: the lint level is defined here
   --&gt; crates/arti-rpc-client-core/src/lib.rs:8:9
    |
8   | #![warn(clippy::all)]
    |         ^^^^^^^^^^^
    = note: `#[warn(clippy::doc_overindented_list_items)]` implied by `#[warn(clippy::all)]`
```
</content>
</entry>
<entry>
<title>Use an EntropicRng trait to enforce key generation rules.</title>
<updated>2025-03-24T19:11:48Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2025-03-20T15:09:08Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=8a33afe155e9bd29d9302b4b44dd5843d00866db'/>
<id>urn:sha1:8a33afe155e9bd29d9302b4b44dd5843d00866db</id>
<content type='text'>
We want to require that whenever we generate a key that's persistent
(stored in KeyMgr), it's going to be made from a stronger-than-usual
Rng.  This trait helps us enforce that.

We also add a FakeEntropicRng struct to use for testing.

Note that this turned up a case that we'd missed, which required
an internal change in tor-hsservice.
</content>
</entry>
<entry>
<title>key-forge: Use CryptoRng from rand.</title>
<updated>2025-03-18T16:09:44Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2025-03-18T14:04:36Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=a71a64ff790c9a9aefdd622ac9d569eddae36ac0'/>
<id>urn:sha1:a71a64ff790c9a9aefdd622ac9d569eddae36ac0</id>
<content type='text'>
Previously we used the version signature::rand_core for some reason,
but that's now incompatible.
</content>
</entry>
<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>
</feed>
