You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
dnscrypt_ephemeral_keys has no effect on PQDNSCrypt servers #3377
I read the documentation and this is not answered there
Initially raised as discussion #...
What's happening?
dnscrypt_ephemeral_keys has no effect on post-quantum servers. The option is documented as creating a new key pair for every query so that a resolver cannot link queries together. For classical servers each query does carry a fresh client key. For PQ servers every query reuses the same material: the same X-Wing ciphertext while no ticket is held, and then the same resumption ticket on every later query. A resolver, or a relay, can group all of a client's PQ queries by that constant value, which is what the option is meant to prevent. The user gets no warning that the setting does nothing here.
When does this occur?
With dnscrypt_ephemeral_keys = true and pqdnscrypt = true (the default) against a server that offers a PQ certificate.
Where does it happen?
encryptPQ in pq.go never reads proxy.ephemeralKeys. It caches one X-Wing encapsulation per network epoch and reuses the stored resumption ticket. The flag is only consulted in the classical path, Encrypt in crypto.go.
How do we replicate the issue?
Set dnscrypt_ephemeral_keys = true and keep pqdnscrypt = true.
Use a server that offers a PQ certificate.
Send several queries and capture the outgoing packets.
Every PQ query carries the same client-magic and the same ticket bytes. With a classical server, the client public key differs on every query.
Expected behavior
Either dnscrypt_ephemeral_keys forces a fresh PQ key exchange per query, matching the classical behavior, or the documentation states that the option does not apply to post-quantum servers.
Additional context
Reproduced on commit 71c139a. A standalone Go test shows a classical server receiving four different client keys while a PQ server receives one ciphertext followed by the same ticket three times.
This is impractical. That would be way too slow and CPU intensive.
This is why the specification says that PQ key pairs must be updated on client IP changes. dnscrypt-proxy now tries to do that (hence the new warning messages you may have seen) even though that can't be instantaneous.
Activity
jedisct1 commentedon Oct 22, 2026
This is impractical. That would be way too slow and CPU intensive.
This is why the specification says that PQ key pairs must be updated on client IP changes. dnscrypt-proxy now tries to do that (hence the new warning messages you may have seen) even though that can't be instantaneous.