Repository navigation
Replies: 5 comments 4 replies
|
First of all, thank you for this well-written and thoughtful discussion post!
I'd be somewhat hesitant on introducing this trait. We've changed a lot of things in the past couple of months, but we're now starting to stabilize our choices in the upcoming iroh 1.0 release. This doesn't mean a
Making it async would be nice because then e.g. browser could make use of
You listed them well, and I don't know any more off the top of my head right now. So yes: QUIC handshake/the rustls raw-public-key certificate, address lookup service signing of publishing records (pkarr as of now), and the iroh-relay authentication handshake.
It's likely we won't add that to iroh-base, unless it is used by iroh itself. I recommend having a think through what that would mean for stabilizing iroh-base: iroh-base is re-exported in iroh itself, so anything in iroh-base needs to be 1.0, including its dependencies that are exposed (or we need to be really careful about pinning them to a specific version, similar to what we're doing with rustls 0.23.X). In general, for the use case you mention, I'd recommend a different design more similar to HTTP auth headers:
|
|
Thanks @matheus23 — this is the kind of redirect I was hoping for. The "auth as a post-connection step" framing makes more sense than what I proposed. Restating to confirm I've understood:
This kills the 10–100ms-on-handshake problem, which was my biggest concern. It also means Two clarifying questions before drafting:
I'll build the first cut externally against current iroh and post back here with a link once it's running end-to-end with a real TPM on one side. No expectation of upstream adoption — the goal is to validate the shape against a second backend (probably Thanks again for engaging in detail. |
|
Following up with a link, as promised. First cut is built and running: https://github.com/Ryujiyasu/iroh-hyde-auth It came out exactly as the thread converged on. Transport identity stays a normal in-memory ephemeral How it works
On the two questions I had
Second backend (portability) — done. There's an Status (being precise) — it runs end-to-end over loopback in tests (two real endpoints, relay + discovery disabled), validated with the software hyde backend and the ssh-agent backend. The TPM backend is the default and compiles, but I haven't done the real-TPM hardware bring-up yet — that's the remaining step before I'd call it validated on silicon. One small note for anyone following the same pattern: the auth handshake has to dial the full No expectation of upstream changes (completely understand the 1.0 freeze) — posting the link as a reference point, per the plan. Thanks again @matheus23 and @Frando for the detailed steer. |
|
Quick update closing the one open item from my last post: the TPM backend is now validated end-to-end on a real hardware TPM ( So the shape holds on hardware, with a second (ssh-agent) backend behind the same |
|
I'd highly recommend using https://secretspec.dev/ (disclaimer: I'm the author) so any provider can be used. There's a Rust crate at https://crates.io/crates/secretspec That gives you flexbility in the span of clouds, personal computers, etc. |
Uh oh!
There was an error while loading. Please reload this page.
Hi n0 team,
The FAQ explicitly invites people with "specific needs around key types" to open a discussion, so here's mine. To be clear up front: I'm not asking for pluggable curve types. The Ed25519 commitment makes sense to me. I'm asking how to plug a hardware-bound signer in behind the existing Ed25519 identity.
The use case
Multi-institutional confidential computation transport — concretely, hospitals participating in a threshold-FHE computation, where each institution's iroh endpoint identity needs two properties beyond what filesystem-stored keys provide:
Today the secret key lives on disk (or in
IROH_SECRETenv var in the workshop examples). For this threat model that's not sufficient — the private key needs to live in a TPM 2.0, Apple Secure Enclave, or Android StrongBox, where signing is an oracle and extraction is physically impossible.This overlaps in motivation (not mechanism) with the FROST blog post: "the device itself has a key share, but that alone is insufficient." Hardware binding is a different way to make a single key uncompromisable. It's also adjacent in spirit to #3168 (authorization) — both are about strengthening the trust basis of an
Endpoint, but at different layers: that one asks "who is allowed to connect," this one asks "where does the identity actually live."What I've already built
I maintain
hyde, an MIT-licensed crate on crates.io that wraps TPM 2.0 (viatss-esapi) and exposes hardware-bound Ed25519 sign/verify where the key never leaves the TPM. So the signer side exists. The question is what shape of integration with iroh ages well.What I'm seeing in the API
From reading
iroh-baseand theEndpoint::builder().secret_key(...)flow:SecretKeyis a concrete struct holding an in-processed25519_dalek::SigningKey. Sign/verify is synchronous and in-memory.The recent rename from
DiscoverytoAddressLookupand the introduction ofEndpointHookssuggest the team is actively reshaping the extension surface aroundEndpoint. ASignerBackendtrait would sit naturally alongside these — same kind of extension point, same connection-lifecycle layer.TPM signing is the opposite shape: an async IPC to a hardware device, ~10–100ms per op. Fine for handshakes and pkarr republishes, almost certainly wrong for any per-packet path. From what I've read I don't think there is one at this layer, but please correct me.
The questions I'd like guidance on
Trait extraction. Would you be open in principle to
SecretKeybeing backed by a trait (something likeSignerBackend) that the in-memory implementation also implements? Or do you prefer this to live entirely outside, with adapter types feeding into the existingSecretKey? I can see arguments either way and want to follow your aesthetic before drafting anything.Async signing. If a trait, should
signbeasync? rustls'sSigningKeyis sync but its cert resolver path isn't, so there's at least one boundary that could absorb async. Has the team thought about this for unrelated reasons?Hot paths. Could you point me to the call sites where
SecretKey::signis actually invoked? I want to verify none of them are on a path that would make 10–100ms hardware signing structurally unworkable.Relationship to FROST. The threshold-signing post effectively builds an external co-signer protocol on top of iroh. Is there appetite for the signer abstraction itself — not TPM-specific — to live in
iroh-base, so FROST, TPM, HSMs, and remote-signing services can all plug in via one shape? Or do you see those as application-layer concerns by design?Prior art check. I searched Discussions and recent issues and didn't find an existing thread on this specific topic, but happy to be redirected if there's prior art I should engage with first rather than starting fresh.
What I plan to do regardless
Ship
iroh-hydeas an external crate against the current API, whatever shape that requires. Happy for it to stay external indefinitely — the goal of this discussion is to make sure the adapter ages well, not to push anything into core.If there's interest in upstreaming a signer trait later, I'd be glad to draft a PR proposal once the abstraction is validated by ≥2 real backends (TPM + e.g. ssh-agent or a remote KMS).
Thanks for the FAQ note that opened this door, and for the FROST post — that's what convinced me this is the right project to engage on this topic.
All reactions