DNSCrypt – how expired certificates became a thing of the past
00f.net
00f.net
There are two types of key here, a "provider public key" and a "resolver public key". The provider key signs the resolver key which signs the requests. This is a system to keep the resolver key from having problems. If you're a website, this is basically irrelevant, because you do the equivalent of having the provider key sign requests. You have no intermediate to worry about at all.
But what if you're Mozilla, and you do have a problem with intermediates expiring?
Well if you put this directly into place everything would get much worse. Extensions would expire after a few hours.
You would have to change your validation logic, to accept signatures that were made while the intermediate was valid, even though the intermediate has expired. (You could set a 12 month limit to make this no less secure than the old system.)
But... if you did this validation change, that would have prevented the extension problem in the first place, all by itself!
This system of short-lived intermediates is nice, but it's way more important in its original home. For extension signing it would almost only be a convenience.
I don't mind so much that Mozilla let their cert expire, but I'm pretty angry that I couldn't just click somewhere to dismiss the warning. Of course, I'm talking just about expired certificates, revoked ones are a different story.
Automation tooling to update the certificates is provided. The Docker image that a lot of people use to run servers does this automatically. Keys are rotated every 8 hour.
The client software issues warnings, but tolerates certificates having a time-to-live longer than 24 hours. Not all DNS operators have shifted to short-lived certificates yet, so being tolerant is a reasonable thing to do.
See the documentation of dnscrypt-wrapper: https://github.com/cofyc/dnscrypt-wrapper
Two kind of keys are involved: a long-term key ("provider key", used for signatures), and ephemeral keys (used for encryption, and signed by the long-term key).
Clients only need the public long-term key, which is included in the DNS stamp.
What you are rotating is just the ephemeral key pair (`--gen-crypt-keypair`).
This is similar to what happens to TLS certificates: you can update the certificate for a domain name as frequently as needed. But you don't need to install a new version of the operating system every time somebody adds or changes a certificate for their website.
dnscrypt-wrapper can serve multiple certificates simultaneously, so you can serve the next certificate even if the current one hasn't expired yet.
This seems really arbitrary. Elaborate?
Also, the person designing the system is evaluated on it working. If it breaks while it's on their watch, it counts against them; if it breaks while on someone else's watch, standard performance review practices are generally unreliable at making it count against them even if it really ought to. Therefore, if you assume standard performance review practices (which is the right way to model incentives for present-day developers/deployers working for for-profit companies, and because of the massive influence of for-profit companies, not a wrong way to model social incentives for everyone else), you want to incentivize them to make renewal part of the system, again either via automation or documentation.