|
2 | 2 | title: "FAQ" |
3 | 3 | --- |
4 | 4 |
|
5 | | -Placeholder: Frequently asked questions and answers. |
| 5 | +## Does iroh use relay servers? |
| 6 | + |
| 7 | +Iroh uses relay servers to support establishing direct connections, to speed up initial connection times, and to provide a fallback should direct connections between two endpoints fail or be impossible otherwise. |
| 8 | +By default iroh is configured with three relay servers run by number 0. |
| 9 | +One in the US, one in Europe and one in Asia. |
| 10 | +We can afford to run these servers for free, because [hole-punching](https://en.wikipedia.org/wiki/Hole_punching_(networking)) rates with iroh are really high. |
| 11 | +Still, to prevent abuse, we rate-limit throughput through our public relays. |
| 12 | + |
| 13 | + |
| 14 | +## Can relays read the traffic they route? |
| 15 | + |
| 16 | +**No, all connections in iroh are end-to-end encrypted.** |
| 17 | +We use QUIC which is based on TLS 1.3. |
| 18 | +From the perspective of our QUIC implementation, the relay is "just another UDP socket" for sending encrypted packets around. |
| 19 | +Because the relays are relaying traffic, they theoretically know that Endpoint ID X talks to Endpoint ID Y and how many bytes are sent this way, but only for as long as these endpoints haven't established a direct connection yet. |
| 20 | +However, we don't record this data on our relays. |
| 21 | + |
| 22 | + |
| 23 | +## How secure is iroh's end-to-end encryption? |
| 24 | + |
| 25 | +Iroh provides a secure, encrypted, forward and backward-secret, authenticated data channel between you and the recipient and protects you both from eavesdroppers. |
| 26 | +This assumes the Endpoint ID you're connecting to was exchanged securely, e.g. via scanning a QR code, sharing a link with the Endpoint ID in an encrypted chat app or using a trusted server and the corresponding secret keys haven't been compromised. |
| 27 | +The established connection is a QUIC connection, which together with TLS 1.3 specifies how it's encrypted. |
| 28 | +This specification is widely used, for example as part of the latest generation of HTTP, HTTP3. |
| 29 | +Instead of PKI-based certificates, at the moment iroh uses self-signed certificates with Endpoint IDs to authenticate both ends of the connection, borrowing [the libp2p handshake specification](https://github.com/libp2p/specs/blob/master/tls/tls.md). |
| 30 | +In the future, we plan on switching to the [raw public key TLS certificate type](https://datatracker.ietf.org/doc/html/rfc7250) instead. |
| 31 | +To make use of this end-to-end encryption, no additional setup in iroh is required, it is always enabled. |
| 32 | +Be aware of security caveats to forward secrecy when using the [opt-in 0-RTT feature](https://docs.rs/iroh/latest/iroh/endpoint/struct.Connecting.html#method.into_0rtt). |
| 33 | + |
| 34 | + |
| 35 | +## What if number 0 stops running relay servers? |
| 36 | + |
| 37 | +The relay servers we run in production [are open-source](https://github.com/n0-computer/iroh/tree/main/iroh-relay), and we highly encourage you to run your own! |
| 38 | +You need a server with a public IP address and a DNS name that points to that IP address. |
| 39 | +Automatic TLS setup via [ACME](https://en.wikipedia.org/wiki/Automatic_Certificate_Management_Environment) is built into the iroh-relay code. |
| 40 | +Use the configured DNS name to add your relay to the [`RelayMap`](https://docs.rs/iroh/latest/iroh/endpoint/struct.Builder.html#method.relay_mode) you configure your iroh endpoint with. |
| 41 | +Running a custom relay server doesn't prevent you from connecting to others connected to other relay servers. |
| 42 | + |
| 43 | + |
| 44 | +## Is establishing a connection without relays or when offline possible? |
| 45 | + |
| 46 | +Yes. |
| 47 | +When you share a `EndpointAddr`s with "direct addresses", then iroh will try to use these addresses to establish a connection with or without a relay. |
| 48 | +If you're in a local network together you can enable [local network discovery](https://docs.rs/iroh/latest/iroh/endpoint/struct.Builder.html#method.discovery_local_network) to help establish connections in LANs even when the `EndpointAddr` doesn't contain direct addresses. |
| 49 | + |
| 50 | + |
| 51 | +## How can I control which relay servers iroh connects to? |
| 52 | + |
| 53 | +Iroh will only talk to relay servers that it knows URLs for. |
| 54 | +By default iroh is configured with 3 relay servers from the [default `RelayMap`](https://docs.rs/iroh/latest/iroh/defaults/prod/index.html). |
| 55 | +If you do not disable the default discovery services or other discovery services, then iroh might connect to relay servers discovered that way. |
| 56 | +By changing iroh's relay mode or relay map you can control the home relay the endpoint connects to, and by wrapping or writing your own `Discovery` service, you gain control over the relay URLs iroh can discover. |
| 57 | + |
| 58 | + |
| 59 | +## What is "Discovery" in iroh and which one should I enable? |
| 60 | + |
| 61 | +For most usage, using the services that are enabled by default in the `iroh::Endpoint::builder` is the best default. |
| 62 | +Discovery helps iroh find ways to connect to a specific Endpoint ID. |
| 63 | +The Endpoint ID on its own can only be used to identify if you're talking to the right recipient, but doesn't tell how to address the recipient on its own. |
| 64 | +Via configured discovery mechanisms, iroh resolves an Endpoint ID to IP addresses and relay URLs that help to actually attempt a connection. |
| 65 | +For more information on available discovery mechanisms, take a look at the [discovery module](https://docs.rs/iroh/latest/iroh/discovery/index.html). |
| 66 | +It's also possible to combine multiple discovery mechanisms at once, or write your own. |
| 67 | +We think it's particularly helpful to write application-specific discovery mechanisms that are tailored to an application's need. |
| 68 | + |
| 69 | + |
| 70 | +## How is iroh development funded? |
| 71 | + |
| 72 | +The company behind iroh is number 0. |
| 73 | +It is partly venture capital and partly founder backed (as in: founders have invested their own money). |
| 74 | +Number 0 is healthy and has investors we actually think are a value-add. |
| 75 | +We earn revenue from customers today through https://n0.computer/n0ps, and are re-launching an “AWS for iroh protocols” in 2025. |
| 76 | +While it will be a service you can pay for, it won’t have special treatment beyond being convenient. |
| 77 | +We rely on iroh remaining open source, and are committed to keeping it that way, including server-side code for relays and DNS discovery. |
| 78 | + |
| 79 | + |
| 80 | +## How do iroh and libp2p compare? |
| 81 | + |
| 82 | +Generally, we've put a lot of effort into making iroh "peer to peer connections that *just work*". |
| 83 | +This means we've kept the scope small: There's no DHT, swarm, or gossipsub. |
| 84 | +Instead, what you get are reliable direct [QUIC](https://en.wikipedia.org/wiki/QUIC) connections between iroh endpoints. |
| 85 | +On top of these, some of said libp2p features can be implemented as *protocols* on top, see for example [iroh-gossip](https://github.com/n0-computer/iroh-gossip/) which provides gossipsub-like functionality. |
| 86 | +While there are some features in libp2p like a DHT implementation based on kademlia that don't exist in the iroh ecosystem yet, we believe the features iroh *does* have work better. |
| 87 | +The iroh project was founded by developers who were deeply involved with libp2p, and wanted to build a more focused library with less configuration that would be easier to deploy and use with high reliability. |
| 88 | + |
| 89 | + |
| 90 | +## Is iroh post-quantum-secure? |
| 91 | + |
| 92 | +No. |
| 93 | +Iroh uses Ed25519 for signing and X25519/P-256 for ECDH. |
| 94 | +These algorithms are not post-quantum-secure. |
| 95 | +Adopting the current best post-quantum-secure algorithm, for example Xyber, would incur a very significant network overhead: |
| 96 | +A Xyber public key is 37x larger than an Ed25519 public key. |
| 97 | +This has implications for connection establishment speed: |
| 98 | +For example, the initial handshake for a connection wouldn't fit into a normal UDP packet anymore. |
| 99 | +It also means DNS packets used for DNS discovery at the moment might get fragmented, etc. |
| 100 | +It would also mean Endpoint IDs would be exactly 37x as big. |
| 101 | +To support post-quantum-cryptography, we would need to trade off usability with the risk should a sufficiently powerful quantum computers would become real. |
| 102 | +We believe it is much more important to serve existing use cases efficiently, so they have encryption *today*. |
| 103 | +We fully believe the work on post-quantum-cryptography is good and important and follow developments closely. |
0 commit comments