Skip to content
Surf Wiki
Save to docs
general/elliptic-curves

From Surf Wiki (app.surf) — the open knowledge base

Curve25519

Elliptic curve used in Internet cryptography


Summary

Elliptic curve used in Internet cryptography

In cryptography, Curve25519 is an elliptic curve used in elliptic-curve cryptography (ECC) offering 128 bits of security (256-bit key size) and designed for use with the Elliptic-curve Diffie–Hellman (ECDH) key agreement scheme, first described and implemented by Daniel J. Bernstein. It is one of the fastest curves in ECC, and is not covered by any known patents. The reference implementation is public domain software.

The original Curve25519 paper defined it as a Diffie–Hellman (DH) function. Bernstein has since proposed that the name Curve25519 be used for the underlying curve, and the name X25519 for the DH function.

Mathematical properties

The curve used is y^2 = x^3 + 486662x^2 + x, a Montgomery curve, over the prime field defined by the pseudo-Mersenne prime number 2^{255} - 19 (hence the numeric "" in the name), and it uses the base point x = 9. This point generates a cyclic subgroup whose order is the prime 2^{252} + 27742317777372353535851937790883648493. This subgroup has a co-factor of , meaning the number of elements in the subgroup is that of the elliptic curve group. Using a prime order subgroup prevents mounting a Pohlig–Hellman algorithm attack.

The protocol uses compressed elliptic point (only X coordinates), so it allows efficient use of the Montgomery ladder for ECDH, using only XZ coordinates.

Curve25519 is constructed such that it avoids many potential implementation pitfalls.

The curve is birationally equivalent to a twisted Edwards curve used in the Ed25519 signature scheme.

History

In 2005, Curve25519 was first released by Daniel J. Bernstein.

In 2013, interest began to increase considerably when it was discovered that the NSA had potentially implemented a backdoor into the P-256 curve based Dual_EC_DRBG algorithm. While not directly related, suspicious aspects of the NIST's P curve constants led to concerns that the NSA had chosen values that gave them an advantage in breaking the encryption.

Since 2013, Curve25519 has become the de facto alternative to P-256, being used in a wide variety of applications. Starting in 2014, OpenSSH defaults to Curve25519-based ECDH and GnuPG adds support for Ed25519 keys for signing and encryption. The use of the curve was eventually standardized for both key exchange and signature in 2020.

In 2017, NIST announced that Curve25519 and Curve448 would be added to Special Publication 800-186, which specifies approved elliptic curves for use by the US Federal Government. Both are described in RFC 7748. A 2019 draft of "FIPS 186-5" notes the intention to allow usage of Ed25519 for digital signatures. The 2023 update of Special Publication 800-186 allows usage of Curve25519.

In February 2017, the DNSSEC specification for using Ed25519 and Ed448 was published as , assigning algorithm numbers 15 and 16.

In 2018, DKIM specification was amended so as to allow signatures with this algorithm. Also in 2018, RFC 8446 was published as the new Transport Layer Security v1.3 standard. It recommends support for X25519, Ed25519, X448, and Ed448 algorithms.

Libraries

  • Libgcrypt
  • libssh
  • libssh2 (since version 1.9.0)
  • NaCl
  • GnuTLS
  • mbed TLS (formerly PolarSSL)
  • wolfSSL
  • Botan
  • Schannel
  • Libsodium
  • OpenSSL since version 1.1.0
  • LibreSSL
  • NSS since version 3.28
  • Crypto++
  • curve25519-dalek
  • Bouncy Castle

Protocols

  • OMEMO, a proposed extension for XMPP (Jabber)
  • Secure Shell
  • Signal Protocol
  • Matrix (protocol)
  • Tox
  • Zcash
  • Transport Layer Security
  • WireGuard

Applications

  • Bitchat
  • Conversations Android application
  • Cryptocat
  • DNSCrypt
  • DNSCurve
  • DNSSEC
  • Dropbear
  • Facebook Messenger
  • Gajim via plugin
  • GNUnet
  • GnuPG
  • Google Allo
  • I2P
  • IPFS
  • iOS
  • Monero
  • OpenBSD and signify
  • OpenSSH
  • Peerio
  • Proton Mail
  • PuTTY
  • Signal
  • Silent Phone
  • SmartFTP
  • SSHJ
  • SQRL
  • Threema Instant Messenger
  • TinySSH
  • TinyTERM
  • Tor
  • Viber
  • WhatsApp
  • Wire
  • WireGuard

Notes

References

References

  1. Bernstein. "Irrelevant patents on elliptic-curve cryptography".
  2. [https://cr.yp.to/ecdh.html A state-of-the-art Diffie-Hellman function] by [[Daniel J. Bernstein]]''"My curve25519 library computes the Curve25519 function at very high speed. The library is in the public domain."''
  3. (5 March 2019). "X25519".
  4. "[Cfrg] 25519 naming".
  5. (2018). "Efficient Arithmetic In (Pseudo-)Mersenne Prime Order Fields".
  6. "EFD / Genus-1 large-characteristic / XZ coordinates for Montgomery curves".
  7. (2017-01-22). "SafeCurves: Introduction". SafeCurves: choosing safe curves for elliptic-curve cryptography.
  8. (2017-01-22). "Ed25519: high-speed high-security signatures".
  9. (2011-09-26). "High-speed high-security signatures".
  10. (2007). "Advances in Cryptology – ASIACRYPT 2007". Springer.
  11. Bernstein, Daniel J.. (2006). "Public Key Cryptography - PKC 2006". Springer.
  12. Kelsey, John. (May 2014). "Dual EC in X9.82 and SP 800-90".
  13. Green, Matthew. (2015-01-14). "A Few Thoughts on Cryptographic Engineering: The Many Flaws of Dual_EC_DRBG".
  14. "SafeCurves: Introduction".
  15. Maxwell, Gregory. (2013-09-08). "[tor-talk] NIST approved crypto in Tor?".
  16. "SafeCurves: Rigidity".
  17. (5 September 2013). "The NSA Is Breaking Most Encryption on the Internet - Schneier on Security".
  18. "Things that use Curve25519".
  19. Adamantiadis, Aris. (2013-11-03). "OpenSSH introduces curve25519-sha256@libssh.org key exchange !". libssh.org.
  20. (August 2021). "GnuPG - What's new in 2.1".
  21. (February 2020). "Secure Shell (SSH) Key Exchange Method Using Curve25519 and Curve448".
  22. (February 2020). "Ed25519 and Ed448 Public Key Algorithms for the Secure Shell (SSH) Protocol".
  23. (2017-10-31). "Transition Plans for Key Establishment Schemes".
  24. RFC 7748. Retrieved from rfc:7748.
  25. (31 October 2019). "FIPS PUB 186-5".
  26. "Recommendations for Discrete Logarithm-Based Cryptography".
  27. (2024-12-05). "Domain Name System Security (DNSSEC) Algorithm Numbers". Internet Assigned Numbers Authority.
  28. John Levine. (September 2018). "A New Cryptographic Signature Method for DomainKeys Identified Mail (DKIM)". [[Internet Engineering Task Force.
  29. E Rescorla. (September 2018). "The Transport Layer Security (TLS) Protocol Version 1.3". [[Internet Engineering Task Force.
  30. Werner Koch. (15 April 2016). "Libgcrypt 1.7.0 release announcement".
  31. SSH implementation comparison. "Comparison of key exchange methods".
  32. "Introduction". yp.to.
  33. "nettle: curve25519.h File Reference".
  34. Limited, ARM. "PolarSSL 1.3.3 released - Tech Updates - mbed TLS (Previously PolarSSL)".
  35. (4 August 2017). "wolfSSL Embedded SSL/TLS Library | Products – wolfSSL".
  36. "Botan: src/lib/pubkey/curve25519/curve25519.cpp Source File".
  37. Justinha. "TLS (Schannel SSP)".
  38. Denis, Frank. "Introduction · libsodium".
  39. "OpenSSL 1.1.0 Series Release Notes".
  40. "Add support for ECDHE with X25519. · openbsd/src@0ad90c3".
  41. "NSS 3.28 release notes".
  42. "A pure-Rust implementation of group operations on ristretto255 and Curve25519".
  43. (13 October 2021). "Ed25519.java".
  44. Straub, Andreas. (25 October 2015). "OMEMO Encryption".
  45. "bitchat/BRING_THE_NOISE.md at 079f36664caf1d1deb0af56e596e3bffbc7dde1b · permissionlesstech/bitchat".
  46. "Cryptocat - Security".
  47. Frank Denis. "DNSCrypt version 2 protocol specification".
  48. Matt Johnston. "Dropbear SSH - Changes".
  49. Bahtiar Gadimov. "Gajim plugin for OMEMO Multi-End Message and Object Encryption".
  50. "GNUnet 0.10.0". gnunet.org.
  51. zzz. (2014-09-20). "0.9.15 Release - Blog".
  52. (30 March 2022). "go-ipfs_keystore.go at master". Github.com.
  53. "Apple Platform Security".
  54. "MRL-0003 - Monero is Not That Mysterious".
  55. Murenin, Constantine A.. (2014-01-19). "OpenBSD Moving Towards Signed Packages — Based On D. J. Bernstein Crypto". [[Slashdot]].
  56. Murenin, Constantine A.. (2014-05-01). "OpenBSD 5.5 Released". [[Slashdot]].
  57. Friedl, Markus. (2014-04-29). "ssh/kex.c#kexalgs".
  58. Murenin, Constantine A.. (2014-04-30). "OpenSSH No Longer Has To Depend On OpenSSL". [[Slashdot]].
  59. "How does Peerio implement end-to-end encryption?".
  60. (25 April 2019). "Proton Mail now offers elliptic curve cryptography for advanced security and faster speeds".
  61. "PuTTY Change Log".
  62. Steve Gibson. (December 2019). "SQRL Cryptography whitepaper".
  63. "Threema Cryptography Whitepaper".
  64. Roger Dingledine & Nick Mathewson. "Tor's Protocol Specifications - Blog".
  65. (3 May 2016). "Viber Encryption Overview". Viber.
  66. Nidhi Rastogi. (2017-01-24). "WhatsApp security and role of metadata in preserving privacy".
Wikipedia Source

This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page.

Want to explore this topic further?

Ask Mako anything about Curve25519 — get instant answers, deeper analysis, and related topics.

Research with Mako

Free with your Surf account

Content sourced from Wikipedia, available under CC BY-SA 4.0.

This content may have been generated or modified by AI. CloudSurf Software LLC is not responsible for the accuracy, completeness, or reliability of AI-generated content. Always verify important information from primary sources.

Report