ArticleslgStudy

computer science

DNSCurve

DNSCurve is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand DNSCurve rather than just read about it. In short: DNSCurve is a proposed secure protocol for the Domain Name System (DNS), designed by Daniel J. Bernstein.

Key takeaways

  • DNSCurve belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect DNSCurve to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of DNSCurve from memory before moving on to harder problems.

Reference excerpt

DNSCurve is a proposed secure protocol for the Domain Name System (DNS), designed by Daniel J. Bernstein. It encrypts and authenticates DNS packets between resolvers and authoritative servers. DNSCurve claims advantages over previous DNS services of:

Confidentiality—conventional DNS requests and responses are not encrypted, so are readable to everyone along the path of transmission. Integrity—conventional DNS has some protection, but with patience and sniffing attackers can forge DNS records; this is prevented by DNSCurve cryptographic authentication. Availability—conventional DNS has no protection against denial of service (DoS) by a sniffing attacker sending a few forged packets per second. DNSCurve recognizes and discards forged DNS packets, providing some protection, though SMTP, HTTP, HTTPS, are also vulnerable to DoS.

Structure DNSCurve uses Curve25519 elliptic curve cryptography to establish the identity of authoritative servers. Public keys for remote authoritative servers are encoded in NS records as the host name component of the server's fully qualified domain name, so recursive resolvers know whether the server supports DNSCurve. Keys begin with the magic string uz5 and are followed by a 51-byte Base32 encoding of the server's 255-bit public key. E.g., in BIND format:

The identity is used to establish keys used by an authenticated encryption scheme consisting of Salsa20 and Poly1305.The cryptographic setup is called a cryptographic box, specifically crypto_box_curve25519xsalsa20poly1305. The cryptographic box tool used in DNSCurve are the same used in CurveCP, a UDP-based protocol which is similar to TCP but uses elliptic-curve cryptography to encrypt and authenticate data. An analogy is that while DNSSEC is like signing a webpage with Pretty Good Privacy (PGP), CurveCP and DNSCurve are like encrypting and authenticating the channel using Transport Layer Security (TLS). Just as PGP-signed webpages can be sent over an encrypted channel using SSL, DNSSEC data can be protected using DNSCurve.

Operation The resolver first retrieves the public key from the NS record, see § Structure above. The resolver then sends to the server a packet containing its DNSCurve public key, a 96-bit nonce, and a cryptographic box containing the query. The cryptographic box is created using the resolver's private key, the server's public key, and the nonce. The response from the server contains a different 96-bit nonce and its own cryptographic box containing the answer to the query.

Security DNSCurve uses 256-bit elliptic-curve cryptography, which NIST estimates to be roughly equivalent to 3072-bit RSA. ECRYPT reports a similar equivalence. It uses per-query public-key crypto (like SSH and SSL), and 96-bit nonces to protect against replay attacks.

Speed Adam Langley has posted speed tests on his personal website showing Curve25519, used by DNSCurve, to be the fastest among elliptic curves tested. According to the U.S. National Security Agency (NSA), elliptic curve cryptography offers vastly superior performance over RSA and Diffie–Hellman at a geometric rate as key sizes increase.

Implementations DNSCurve first gained recursive support in dnscache via a patch by Matthew Dempsky. Dempsky also has a GitHub repository which includes Python DNS lookup tools and a forwarder in C. Adam Langley has a GitHub repository as well. There is an authoritative forwarder called CurveDNS which allows DNS administrators to protect existing installations without patching. Jan Mojžíš has released curveprotect, a software suite which implements DNSCurve and CurveCP protection for common services like DNS, SSH, HTTP, and SMTP. DNSCurve.io (2023) recommends two implementations: Jan Mojžíš's dqcache for recursive resolvers, CurveDNS for authoritative servers.

Deployment OpenDNS, which has 50 million users, announced support for DNSCurve on its recursive resolvers on February 23, 2010. In other words, its recursive resolvers now use DNSCurve to communicate to authoritative servers if available. On December 6, 2011, OpenDNS announced a new tool, called DNSCrypt. DNSCrypt is based on similar cryptographic tools as DNSCurve, but instead protects the channel between OpenDNS and its users. No equally large authoritative DNS providers have yet deployed DNSCurve.

See also DNSCurve is intended to secure communication between a resolver and an authoritative server. For securing communication between DNS clients and resolvers, there are several options:

DNS over TLS, defined by two standards-track RFCs, RFC 7858 and RFC 8310 DNS over HTTPS, standardized in RFC 8484 DNSCrypt

Notes

External links Official website DNSCurve.io: a community for DNSCurve users High-speed cryptography and DNSCurve, a June 2009 presentation by the author DNSCurve: Usable security for DNS, an August 2008 presentation by the author draft-dempsky-dnscurve-01 Proposed standard "DNSCurve: Link-Level Security for the Domain Name System", sent by M. Dempsky (from OpenDNS) to IETF (updated in February 2010) OpenDNS adopts DNSCurve Archived 2010-02-26 at the Wayback Machine, official OpenDNS blog entry CurveDNS, DNSCurve forwarding name server NaCl, Networking and Cryptography library

Worked examples

Example 1 — a first encounter with DNSCurve

Start with the simplest possible case. Write down what DNSCurve claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to DNSCurve before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about DNSCurve ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of DNSCurve

In research
DNSCurve appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses DNSCurve in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
DNSCurve is common in secondary-school and first-year university syllabi. It links to neighbouring topics Domain Name System, Elliptic curve cryptography, so understanding it makes those chapters shorter.
In everyday life
Look for DNSCurve outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “DNSCurve” →

How to study DNSCurve in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what DNSCurve means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain DNSCurve out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is DNSCurve in simple terms?

DNSCurve is a proposed secure protocol for the Domain Name System (DNS), designed by Daniel J. Bernstein.

Why does DNSCurve matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study DNSCurve?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on DNSCurve.

Tags

  • Domain Name System
  • Elliptic curve cryptography

Keep exploring