Skip to content
ntp.alastyr.com — home page connecting TR — Türkçe sürüme geç

New service · IETF draft

Roughtime: signed time

Time from the same GPS-referenced clock, with every reply signed with Ed25519. A device that has no idea what time it is can still get the correct time and verify it; a server reporting the wrong time can be caught cryptographically; a file can be proven to have existed before a given second. Free, no registration, over IPv4 and IPv6.

roughtime.alastyr.com:2002 click to copy
IPv4
5.2.80.90
IPv6
2a06:ad40:0:1::90
Port
2002/udp
Public key (Ed25519)
/2Al59PlwUTJHas/VS+FN6BhO9ify/wIjoH2Ezv4V7w=
Status
signed self-query once a minute
Radius
the error margin attached to the time
Delegation
expiry of the signing key
Last 24 hours
requests answered

Live signed reply

a real reply the server just gave

The values below are a field-by-field dump of a real request sent to our server once a minute and the reply it received. The signature, delegation certificate and Merkle path were verified on the client side, outside the server. Look at the two pink rows: the random value the client sent comes back unchanged inside the reply the server signed.

Request
VER
supported protocol version
SRV
which long-term key we expect (hash)
NONC
32 random bytes generated by the client
TYPE
0 = request
ZZZZ
padding: a request must be at least 1024 bytes
Reply
MIDP
the server’s time (UTC, whole seconds)
RADI
error margin: true time lies within MIDP ± RADI
NONC
the same nonce, inside the signature
SIG
Ed25519 signature (64 bytes)
CERT
online key and its validity window
Size
reply smaller than request: cannot amplify a reflection attack

Values are read from /api/roughtime.json and refresh every minute.

What Roughtime is

three problems NTP cannot solve

NTP replies are unsigned: anyone on the path can change the time. NTS fixes that, but to start NTS the client must validate a TLS certificate, and validating a certificate requires a clock that is roughly right. A device whose battery died and that boots up in 1970 cannot get out of this loop. And neither NTP nor NTS lets you prove to a third party that a server gave you the wrong time.

Roughtime was designed to fill that gap. Started by Google and developed further by Cloudflare and Netnod, the protocol has been standardised in the IETF NTP working group. The draft (draft-ietf-ntp-roughtime-19) has passed the working group and is with the RFC Editor awaiting publication.

NTPNTSRoughtime
Replies can be verifiedNoWith a session keyPublic-key signature
No correct time needed to startNot neededNeeded (TLS)Not needed
Proof you can show a third partyNoneNoneSigned reply can be kept
Proving a server liedNoNoChained queries
Resolutionnanosecondsnanoseconds1 second
Used forkeeping the clock disciplinedsame, authenticatedsecure boot time, evidence, audit

How it works

one round trip, one UDP packet
  1. 01Request

    The client generates a 32-byte random value (nonce) and sends it. The packet is padded to at least 1024 bytes.

    at least 1024 bytes
  2. 02Batch signing

    The server collects requests that arrive together into a Merkle tree and signs the root together with the time in a single signature.

    one signature, many requests
  3. 03Reply

    Time (MIDP), radius (RADI), signature, delegation certificate and the nonce’s path in the tree come back. Because the nonce is inside the signature, the reply was produced after your request.

    reply ≤ request
  4. 04Verification

    The client checks the signature, certificate and Merkle path against the long-term public key. No clock is needed; the only configuration value is the public key.

    Ed25519
  5. 05Chaining

    The nonce sent to the next server is derived from a hash of the previous reply. If two servers disagree, the chain in your hands is the proof.

    at least 3 servers

We do not hard-code the radius: the server reads the maximum error the operating system kernel keeps for the clock (maxerror) and derives the radius from it. While GPS is locked this is a few microseconds, so the radius comes out at 1 second, the smallest value the standard allows. If the clock ever falls out of sync the error margin grows automatically; the server never claims a certainty it does not have.

Where it is used

from the draft and from the field

Bootstrapping NTS

Validating the NTS-KE server’s TLS certificate requires a clock. First a verified rough time from Roughtime, then NTS.

draft, section 6

Devices without a clock

Boards without a battery-backed clock (RTC) such as the Raspberry Pi, embedded systems and devices that sit powered off for long periods get verifiable time at boot.

IoT · embedded

TLS and certificate errors

A client with a skewed clock sees valid certificates as “expired”. Check the clock against an independent, signed source before certificate validation.

browsers · clients

Auditing time servers

A server reporting the wrong time, by accident or on purpose, is caught with chained queries and reported with signed proof.

malfeasance report

Log and document integrity

Show that a log file, report or incident record existed before a given second, in a form that can be verified offline.

roughtime-stamp

Event time in distributed systems

Periodically compare each device’s clock with an independent, signed reference and keep the proof alongside the event records.

multi-sensor systems

Document timestamping and event-time uses are not features defined in the draft; they are application patterns built on the protocol’s guarantee that “the reply was produced after the nonce”, and ready-made open source tools implement them.

Try it now

every command was tested against this server

The easiest client is the tannerryan/roughtime tool set written in Go (BSD licence, supports drafts 01–19). It needs Go 1.27 or later.

Install the client

go install github.com/tannerryan/roughtime/cmd/roughtime-client@latest

Query a single server does not touch your clock

roughtime-client -addr roughtime.alastyr.com:2002 \
  -pubkey /2Al59PlwUTJHas/VS+FN6BhO9ify/wIjoH2Ezv4V7w=

With our server list

curl -sO https://ntp.alastyr.com/roughtime.json
roughtime-client -servers roughtime.json -all

With Python

git clone https://github.com/dansarie/pyroughtime
pip install pycryptodomex
python3 pyroughtime/pyroughtime.py \
  -s roughtime.alastyr.com 2002 /2Al59PlwUTJHas/VS+FN6BhO9ify/wIjoH2Ezv4V7w=

In the output you should see Radius: 1s and Status: in-sync. The Drift line shows the difference from your clock; since the time arrives in whole seconds, up to half a second is normal. If you pass the wrong key the server does not answer at all: by design the protocol has no error messages.

Verifying with several servers

do not trust a single server, not even ours

Roughtime’s strength comes from chaining queries across at least three servers run by different organisations. Each nonce is derived from the previous reply, so the order is fixed.

If the third reply looks as though it was produced before the second, one of the two servers is lying, and the signed chain you hold proves it to anyone. To add our server to the community list and run a two-pass measurement:

curl -sO https://raw.githubusercontent.com/tannerryan/roughtime/main/ecosystem.json
curl -sO https://ntp.alastyr.com/roughtime.json
jq -s '{servers: (.[0].servers + .[1].servers)}' \
  ecosystem.json roughtime.json > list.json
roughtime-client -servers list.json -two-pass

A Chain: ok line at the end means every signature and the time ordering are consistent. Trust the keys in a list only as far as you trust its source; you can confirm our key on this page and in roughtime.json.

Document timestamping

“this file existed before this moment”

roughtime-stamp uses the file’s SHA-256 hash as the nonce, queries three independent operators in two passes and writes the result to a 2–3 KB proof file. Verification needs no network connection.

Timestamp

go install github.com/tannerryan/roughtime/cmd/roughtime-stamp@latest
roughtime-stamp -doc report.pdf -servers list.json \
  -out report.pdf.proof

Verify offline

roughtime-stamp -mode verify -doc report.pdf \
  -in report.pdf.proof -servers list.json

If a single byte of the file changes, verification fails with proof does not cover document. Keep the proof file, the document and the list.json you used together: whoever verifies it years later should also see which keys you trusted.

Technical details

Addressroughtime.alastyr.com:2002IPv4 5.2.80.90 · IPv6 2a06:ad40:0:1::90 · UDP only
Protocoldraft-ietf-ntp-roughtime-19wire version 0x8000000c (shared by drafts 12–19)
Public keyEd25519/2Al59PlwUTJHas/VS+FN6BhO9ify/wIjoH2Ezv4V7w=
ff6025e7d3e5c144c91dab3f552f8537a0613bd89fcbfc088e81f6133bf857bc
Server listroughtime.jsonhttps://ntp.alastyr.com/roughtime.json · application/roughtime-server+json
Live statusAPIhttps://ntp.alastyr.com/api/roughtime.json · every minute
Time sourcestratum 1the same clock as NTP: GNSS + hardware-timestamped PPS (colophon)
Radiuskernel maxerror1 s while in sync; grows automatically if sync is lost
Softwareroughtimed 1.3.0by Marcus Dansarie (co-author of the draft), GPL-3.0, with a small patch for request logging
Continuitysystemd + watchdogrestarts within 5 s after a crash; if it stops answering, a signed query every minute restarts it after 3 failures
Leap secondsno smearingon leap second days the radius is raised to at least 3 seconds

Key management

the root key is not on this server

The key that signs replies is not the long-term root key. The root key is kept offline and used only to sign a delegation certificate. The server holds only that certificate and its private key. The certificate is valid for one year and is renewed every year with the root key; the public key does not change. Even if the delegation key were stolen, an attacker could only sign within the certificate’s validity window.

Public keyIn useStatus
/2Al59PlwUTJHas/VS+FN6BhO9ify/wIjoH2Ezv4V7w=2026-09-24 →Active. Delegation valid until 2027-09-25 00:00 UTC.

This table is permanent: if the key ever changes, the old key is not removed but stays here with its period of use, and your old proofs remain verifiable against it.

Limits

what you should know

Resolution is one second

If you need millisecond precision, use NTS.

Not a legally qualified timestamp

Those come from accredited trust service providers. Roughtime is technical, independently verifiable evidence.

One server is one witness

For evidence that matters, use at least three servers from different organisations. Our clock relies on a single GNSS receiver; if the satellites are lost it switches to stratum-1 sources on the network.

A stamp proves an upper bound

It shows the document existed before that moment, not when it was created.

The first server sees the hash

Predictable content can be recovered from its hash. For sensitive content, add a random value before hashing and keep it with the document.

UDP only for now

The draft also recommends TCP; the server software we use does not support it yet.

Not an RFC yet

On publication the version number changes from 0x8000000c to 1 and IANA may assign a port. We will support both during the transition and announce it here in advance.

Frequently asked technical questions

19 questions · what it is, how it works, where it is used

What is Roughtime?

Roughtime is a network protocol for getting signed time from a server. The client sends a random value; the server signs the current time, its error margin and the client's value together with Ed25519 and sends them back. The client verifies the signature with the server's public key, which it knows in advance. That proves the reply really came from that server, was not altered on the way, and was produced after your request.

Google started the protocol, Cloudflare and Netnod developed it further, and it is now being standardised by the IETF NTP working group as draft-ietf-ntp-roughtime. The "rough" in the name refers to resolution: time comes in whole seconds, but it is highly trustworthy.

What is it used for?

Four main purposes:

  • Giving a device that has no idea of the time a secure starting point. A device with a dead battery, no RTC, or one that sat powered off for a long time cannot validate TLS certificates; Roughtime needs no prior correct time.
  • Bootstrapping NTS. NTS key exchange runs over TLS, so it needs roughly correct time first. Roughtime makes that first step secure.
  • Auditing time servers. Querying several servers in a chain catches a server that reports the wrong time and shows it with signed proof.
  • Producing evidence. Showing that a file, log or incident record existed before a given second, in a way that can be verified later without network access.

Does Roughtime replace NTP?

No, they do different jobs. NTP keeps your clock continuously disciplined to milliseconds or better. Roughtime answers "what time is it" with one-second resolution, but every answer is signed. The usual setup runs both: at boot the device gets a rough but verified time from Roughtime, then moves on to NTP protected by NTS. Section 6 of the draft describes this combination.

Why only one-second resolution?

That is how the standard defines it: the timestamp (MIDP) is sent in whole seconds and the radius (RADI) is also in seconds and may not be zero. The goal is verifiability, not precision. One second is plenty to check certificate validity, to show when a record existed, or to catch a server that reports the wrong time. For precise time use the NTS service on the same server.

How do I prove a file existed at a given moment?

You derive the random value in the request (the nonce) from a hash of the file. Because the server signs that value together with the time, the signed reply is cryptographic proof that "this hash existed before this second". The roughtime-stamp tool does this automatically across three independent operators in two passes and writes a small proof file that can be verified later without network access. The commands are in the document timestamping section.

This is not a feature defined in the draft; it is an application pattern built on the protocol. The proof only shows an upper bound: the file existed before that moment and has not changed since. It does not show when the file was created.

What is a nonce and why does it matter so much?

The nonce is a 32-byte one-time random value the client generates for each request. The server includes it in the signed part of the reply. Because it cannot be predicted, the signed reply cannot have been prepared before your request: an attacker replaying an old reply cannot know the nonce you generated.

If you derive the nonce from a hash of some data instead of randomly, the same logic runs the other way: now it proves the data existed before the reply. Document timestamping rests on this idea.

What does the radius (RADI) mean?

The time the server sends (MIDP) is not a single point but the middle of an interval. The radius is half its width: the server commits, and signs, that "the true time is between MIDP − RADI and MIDP + RADI". The standard puts the radius in seconds and forbids zero.

On our server the radius is not a hand-written constant; it is derived from the maximum error the operating system keeps for the clock. While GPS is locked it is 1 second. If the clock falls out of sync, the radius grows automatically.

Why a Merkle tree?

Ed25519 is fast, but signing each of thousands of requests per second separately still costs CPU. So the server places requests that arrive together at the leaves of a Merkle tree, signs the tree's root together with the time once, and sends each client the path from its leaf to the root. The client uses that path to check that its own nonce is bound to the signed root. One signature covers hundreds of requests, with no loss of security.

What is a delegation certificate?

The server's identity is a long-term key; clients only know its public half. Keeping that key on an internet-facing machine to sign every reply would be risky. So the long-term key signs a certificate that authorises a short-lived online key for a given time window (MINT–MAXT). The online key signs the replies, and the certificate is sent along with every reply.

Our root key is kept offline; the delegation on the server is valid for one year and is renewed every year. Details are in the key management section.

How can a server that lies about the time be proven wrong?

The client queries at least three servers in turn and derives each nonce from a hash of the previous reply. That creates a cryptographic order between replies: the second reply must have been produced after the first. If a later reply's time interval lies entirely before an earlier one's, one of the two servers is lying.

The chain of signed replies you hold is then publicly verifiable proof of the contradiction. The draft defines a standard JSON format for reporting it, called a "malfeasance report".

Why UDP, and why a request of at least 1024 bytes?

UDP completes in a single round trip, keeps no connection state and is simple enough for a device that does not know the time. Its well-known risk is spoofed-source packets that make a server send large replies to someone else (a reflection attack). Roughtime prevents this by design: the client pads its request to at least 1024 bytes and the server never replies with more than it received. Shorter requests go unanswered. The draft also defines TCP; our server speaks only UDP for now.

Why port 2002?

Because the draft is not yet an RFC, IANA has not assigned Roughtime an official port. The community has used 2002/udp for years; most servers, including Netnod, roughtime.se and Time.nl, are on it. If a port is assigned when the standard is published, we will open it too and keep 2002 running in parallel for a while.

Can chrony, Windows or systemd-timesyncd use Roughtime?

Not today. Common NTP clients, including the chrony 4.8 we run, have no built-in Roughtime support. You use Roughtime with a separate client: with the Go or Python clients you can check the clock, timestamp documents, or run it in your boot script as a verification step before NTS. Keep using NTP/NTS to keep the clock disciplined.

Is Ed25519 safe against quantum computers?

No. The draft says so plainly: a large enough quantum computer could break Ed25519 signatures, and when that day comes a new version of the protocol will be needed. Some implementations experimentally support a post-quantum signature (ML-DSA-44), but it is not part of the standard yet and we do not offer it. For now, Ed25519 is considered secure.

Why is one server not enough? Why at least three?

If a single server gives the wrong time, you cannot notice it without another source as long as its signature is valid. If two servers disagree, you cannot tell which one is right. With three or more servers run by different organisations you see what the majority says and can prove who lied with the signed chain. That is why the draft asks clients to use at least three independent servers.

Is this a legally qualified timestamp?

No. Qualified timestamps (in Türkiye under Electronic Signature Law No. 5070, in the EU under eIDAS) are issued by accredited trust service providers, and we are not one. Roughtime replies are technical evidence: anyone can verify them independently with the public key, and they can be cross-checked against several operators. They suit audits, incident investigations and showing time consistency between systems; they do not replace a legal procedure.

What do you log, and for how long?

For every request we answer: the time, source IP address and port, the request nonce, the time and radius we sent, the request length, the position in the Merkle tree and the tree root. These records are kept for 365 days and then deleted automatically. They are not published and are not shared with anyone except where the law requires it. Per-minute totals (how many requests, how many invalid) are kept indefinitely.

Why we keep them: to see abuse, and to be able to confirm from our own records that a given proof really came from this server. When you timestamp a document the nonce is derived from its hash, so the hash ends up in this log too; for sensitive content use a salted hash.

What happens to my old proofs if your key changes?

They stay valid. Proofs are verified against the long-term public key, and every public key we have used is listed permanently on this page with its dates of use. The yearly delegation renewal does not change the public key. If we ever suspect the root key has been compromised we will announce it here and in the server list, stating the affected period explicitly.

Is it free? Are there limits?

It is free and needs no registration. To set a device's clock, one query at boot and then one every few hours is enough; there is no need to query more than once a minute. By design a reply can never be larger than its request, so the server cannot be used as an amplifier in reflection attacks.

References