Protocols

Roughtime: Getting the Time From Servers You Don't Have to Trust

June 23, 2026 7 min read Haven Team

A surprising amount of security depends on your device knowing roughly what time it is. Certificate validity, token expiry, update freshness, and log ordering all assume an honest clock. The traditional way to set that clock, NTP, was built when nobody was attacking it. Roughtime is a newer protocol with a sharper question at its center: how do you get accurate time from a server without simply trusting it to tell the truth?


Think about what breaks when a clock is wrong. If an attacker can convince your device that it is three years in the future, expired certificates become valid again, and a revoked or long-dead certificate can be used to impersonate a site. Push it into the past and you can replay credentials that should have expired, or stall security updates that are gated on a date. A wrong clock is not a cosmetic bug. It quietly disables time-based defenses across the whole system.

The classic fix is the Network Time Protocol. NTP works well for accuracy, but most deployments run it unauthenticated. Your device asks a server for the time and believes the answer. An attacker positioned on the network can forge or tamper with NTP responses and walk your clock anywhere they like. Network Time Security (NTS) was created to add authentication to NTP, and it is a solid upgrade. Roughtime comes at the same problem from a different direction.

The Bootstrapping Problem

Here is the circularity that makes secure time hard. To validate a TLS certificate, you need to know the current time, because the certificate has a validity window. But to securely fetch the time over TLS, you would need a valid certificate, which requires knowing the time. Time and certificate validation depend on each other. You cannot cleanly bootstrap one from the other.

The chicken and egg

Validating a certificate requires a trusted clock. Setting the clock over a TLS connection requires a valid certificate. Roughtime sidesteps the loop by signing time responses with long-lived keys you can ship in advance, so time does not depend on the certificate system at all.

Roughtime, originally developed at Google and later carried forward as an IETF effort, avoids the loop. A Roughtime server signs its responses with a long-term public key using elliptic-curve signatures. Clients ship with those public keys built in. Because the verification does not rely on the certificate authority system, you can check a Roughtime answer even when your clock is wildly wrong, which is exactly the situation where you most need to.

The Clever Part: Servers That Catch Each Other Lying

Signatures prove a response came from a particular server. They do not prove the server told the truth. A signed lie is still a lie. Roughtime's most interesting design choice is a mechanism that makes lying detectable, so that a misbehaving server can be caught and called out with cryptographic proof.

It works through chaining. When a client queries a Roughtime server, it includes a random nonce. The server's signed response commits to that nonce and to its own timestamp. The client then takes that response and uses it to derive the nonce it sends to the next server it queries. Each server's answer is therefore cryptographically tied to the previous server's answer.

Now suppose one server lies and reports a wildly wrong time. The client can query several servers, build this chain, and end up holding a set of signed statements. If the lying server's timestamp is inconsistent with the others, the client has a signed, verifiable record proving that a specific server, identified by its key, returned a bad time at a position fixed in the chain. The dishonesty is not just suspected, it is provable to a third party. That accountability is the deterrent.

Property Plain NTP NTS Roughtime
Authenticates the server No Yes Yes
Works with a badly wrong clock Yes Depends on cert setup Yes
Detects a lying server with proof No No Yes, via chaining
Precision High High Coarse by design

Why "Rough" Is in the Name

Roughtime is deliberately not built for microsecond precision. It aims to get your clock correct to within a comfortable margin, on the order of a second or better, which is plenty for the security decisions that depend on time: is this certificate within its validity window, is this token expired, is this update older than the one I have. Those checks care about being approximately right and resistant to attack, not about being precise to the nanosecond.

This is a sensible division of labor. If you need tight synchronization for distributed databases or financial timestamping, you reach for NTP or NTS, ideally authenticated. If you need a clock that is hard to fool and good enough for trust decisions, Roughtime fits, and it can serve as the secure floor that the more precise protocols build on. The two are not competitors so much as answers to different questions.

Where It Fits in a Threat Model

Roughtime matters most for devices that cannot assume a trustworthy network: clients on hostile Wi-Fi, embedded systems that boot with no clock at all, and anything where an attacker might sit between the device and its time source. It also helps with first-boot scenarios, where a device powers on with a meaningless clock and needs to establish trusted time before it can safely validate anything over TLS.

For most users, time security is invisible plumbing, and that is fine. The reason it is worth understanding is the same reason certificate transparency and key transparency are worth understanding: they all replace "trust the operator" with "verify the operator, and make cheating detectable." Roughtime applies that principle to something as mundane as the clock. The pattern, designing systems where a dishonest party can be caught rather than merely hoped against, is one of the more durable ideas in modern security engineering.

Try Haven free for 15 days

Encrypted email and chat in one app. No credit card required.

Get Started →