DevTools Logo

DNSSEC DS Record Calculator

DNSSEC DS Record Calculator

Turn a DNSKEY into registrar-ready DS records: key tag, canonical name and SHA digests, step by step.

Runs in your browser
Try an example

DNSKEY input

Paste one DNSKEY RR per line, a base64 RDATA blob, or the fields flags protocol algorithm key. Public keys only — private keys are rejected.

Takes precedence over the pasted owner; use punycode for IDNs.

Leave empty to omit TTL, as dnssec-dsfromkey does.

DS records

0 record(s)

Paste a DNSKEY to see its DS record

Key tag, RDATA and every digest are computed locally in this tab.

Examples

KSK to DS

Input
example.com. 3600 IN DNSKEY 257 3 8 AwEAA…
Output
example.com. IN DS 2646 8 2 8ad107…

A zone-signing key with the SEP bit becomes a SHA-256 DS ready for the registrar.

SHA-384 variant

Input
Same DNSKEY, digest type 4 enabled
Output
example.com. IN DS 2646 8 4 <96 hex chars>

Selecting another digest type does not change the key tag — only the hash and hex length.

Corrupted DS

Input
DS 2642 5 2 b623a93901b8e11b…0
Output
Mismatch — expected 64 hex characters

Verify mode names the difference and prints the recomputed digest for comparison.

About this tool

A DS record is the trust link between a signed child zone and its parent: the parent publishes a hash of the child's DNSKEY, and validators use it to decide whether to trust the child's keys. This calculator derives that record from a pasted DNSKEY entirely in your browser. It computes the key tag with the RFC 4034 Appendix B checksum, encodes the owner name in canonical wire format, hashes canonical name followed by DNSKEY RDATA, and prints the DS line a registrar form expects.

Every intermediate value is visible: flags are decoded bit by bit (256 for a ZSK, 257 for a KSK/ZSK with the SEP bit), protocol is checked against the required value 3, and the algorithm number is explained. The RDATA hex and the exact digest input bytes can be expanded for audit, so a mismatch is diagnosable instead of mysterious. SHA-1 (type 1), SHA-256 (type 2) and SHA-384 (type 4) are available; several digests can be generated from the same key at once.

Paste a full DNSKEY resource record, the four RDATA fields, or a base64 RDATA blob. Zone names are lowercased and encoded with length-prefixed labels; the zone field deliberately overrides an owner name in the pasted RR so the precedence is never ambiguous. Verify mode compares an existing DS against the recomputed digest, key tag and algorithm and reports a match or an explicit mismatch with the expected digest length. Only public key material is accepted, nothing is stored, and no network call is made.

What this tool does not do

  • This is a DS derivation and verification tool, not a zone signer and not a live DNS lookup.
  • Private key material is never accepted; only the public DNSKEY is processed.
  • Digest type 3 (GOST) is not implemented; types 1, 2 and 4 are supported.
  • Internationalized domain names must already be in punycode; escapes are limited to DNS presentation \. \\ and \DDD forms.
  • WebCrypto needs a secure context (HTTPS or localhost); without SubtleCrypto the tool shows an explanatory error rather than a wrong digest.
  • The pasted DNSKEY is checked for structural sanity (flags, protocol, algorithm, base64) but its cryptographic validity is not proven.

How to use this tool

  1. Paste a DNSKEY

    Add one DNSKEY RR per line, a `flags protocol algorithm key` field list, or a base64 RDATA blob. Use an example chip to see a valid key.

  2. Set the owner and digests

    Enter the zone name if the pasted key has no owner (or to override it), choose SHA-1/256/384, and optionally set a parent TTL.

  3. Read the derivation

    Check the key tag, decoded flags, protocol and algorithm; expand the byte view to see the canonical name and RDATA that were hashed.

  4. Copy or verify

    Copy individual DS lines, all records, or the four registrar fields. Switch to verify mode to compare an existing DS with the recomputed values.

Use cases

Manual DNSSEC activation

A registrar asks for key tag, algorithm, digest type and digest: generate all four from the KSK without installing the BIND toolchain.

Hosted DNS audit

Recompute a DS from the zone's published DNSKEY and verify the string your DNS provider or registrar actually publishes.

Rollover check

Compare old and new KSK digests and catch a P-256 key paired with the wrong digest type before delegating.

Accepted input and emitted DS line

FormHandling
Full DNSKEY RR / RDATA fieldsOwner, TTL and class are parsed; the zone field overrides the owner. Field form is `flags protocol algorithm key`.
Base64 RDATA blobFirst four bytes decode to flags (2), protocol (1), algorithm (1); the rest is the public key.
Digest types 1 / 2 / 4SHA-1 / SHA-256 / SHA-384 via WebCrypto; type 3 (GOST) is not supported.
DS outputexample.com. IN DS 2646 8 2 <hex> — TTL omitted unless supplied, as dnssec-dsfromkey does.

Key tags use the RFC 4034 Appendix B checksum; algorithm 1 uses its separate historical rule from Appendix B.1.

Common mistakes

Mistake:Using the ZSK instead of the KSK.

Fix:Flags 256 indicate a ZSK; the parent DS should normally reference a flags 257 KSK. The tool warns when it sees a ZSK.

Mistake:Mixing up the digest owner name.

Fix:The digest hashes the canonical owner name. Use the zone field explicitly; it overrides the pasted owner and a warning says so.

Mistake:Pasting an internationalized zone as Unicode.

Fix:Canonical DNS wire encoding is ASCII. Enter the punycode (xn--) form; this tool does not perform IDNA conversion.

Mistake:Assuming 3600 is the required DS TTL.

Fix:The DS TTL belongs to the parent and varies by registrar. No TTL is emitted unless you explicitly supply one.

Mistake:Pasting a private key 'to check it'.

Fix:Only DNSKEY public records are accepted; PEM and private-key markers are rejected outright.

Frequently asked questions

How is the DNSSEC key tag calculated?

Per RFC 4034 Appendix B, the DNSKEY RDATA (flags, protocol, algorithm and public key in wire format) is read as 16-bit big-endian words; an odd final byte is counted as the high byte of a word. Those words are added in a 32-bit accumulator, the carry is folded back with `ac += (ac >> 16) & 0xffff`, and the low 16 bits are the key tag. Algorithm 1 uses a separate historical rule. The tool shows the RDATA bytes so you can audit the result.

Which digest type should I use?

Use SHA-256 (digest type 2) unless your registrar explicitly asks otherwise. SHA-1 (type 1) is legacy; SHA-384 (type 4) is common with ECDSAP384SHA384 (algorithm 14) and is accepted by many registrars. Type 3 (GOST) is not supported. Pairing SHA-384 with a P-256 or Ed25519 key is unusual, so the tool shows an advisory when that happens.

Why does my DS not match the one at my registrar?

The most common causes are a different owner name (the digest hashes the canonical name), a key from the wrong generation after a rollover, a ZSK instead of a KSK, or a single mistyped hex digit. Verify mode recomputes the digest, key tag and algorithm from your pasted DNSKEY and tells you which field disagrees, including the expected hex length.

What is the difference between ZSK and KSK flags?

DNSKEY flags 256 set the Zone Key bit and usually mark a zone-signing key (ZSK); flags 257 also set the Secure Entry Point bit and normally mark the key-signing key (KSK). A DS at the parent should almost always reference the KSK. The tool decodes each flag bit and warns when a DS is generated from an apparent ZSK.

Is my private key involved?

No. The tool accepts only the public DNSKEY record and its public key bytes. PEM blocks and private-key markers are rejected with an explanation. Nothing is uploaded: key tag, canonical name and digests are all computed in this browser tab, and pasted keys are never saved.

Does the DS record need a TTL, and can I use a Unicode domain?

No TTL is required from the generator: the DS TTL is set by the parent zone and dnssec-dsfromkey omits it too. You may enter one if your registrar form expects it. Domain names must be ASCII in canonical DNS encoding, so convert internationalized names to punycode (xn--) before pasting them; the tool explains this instead of silently hashing the wrong bytes.

References & standards