An open challenge
Prove it.
Below is a short message encrypted with X25519 key agreement and AES-256-GCM. The private keys were generated in memory, used once, and thrown away. Nobody holds them, including the person who runs this site. If you think modern elliptic-curve cryptography is weak, decrypt the message and paste it below.
The ciphertext
Submit the plaintext
How long would it take?
Each figure assumes one CPU thread and the best known classical attack. Nothing about the curve has to be broken. These are plain counts of the work involved.
| Attack | Expected work | Your browser | Native, 108/s |
|---|
Since you opened this page, a generous native thread would have tried 0 keys. Its chance of having found the key by now is about 0.
Exactly what was done
- Generate a recipient X25519 key pair
(r, R)and an ephemeral key pair(e, E). shared = X25519(e, R), which equalsX25519(r, E).key = HKDF-SHA256(ikm = shared, salt = E ‖ R, info = "", length = 32)ciphertext ‖ tag = AES-256-GCM(key, nonce, plaintext, aad = info). The 16-byte tag is the last 16 bytes.- Publish
R,E, the nonce, the ciphertext andSHA-256(plaintext). Thenrandeare discarded. They are never written to disk.
To win you need r or e. Recovering either from its public key is the elliptic-curve discrete logarithm problem on Curve25519. You could also find the 256-bit AES key directly. If you get a private key, this decrypts the message:
pip install cryptography
from cryptography.hazmat.primitives.asymmetric.x25519 import X25519PrivateKey, X25519PublicKey
from cryptography.hazmat.primitives.kdf.hkdf import HKDF
from cryptography.hazmat.primitives.hashes import SHA256
from cryptography.hazmat.primitives.ciphers.aead import AESGCM
c = { ...paste "Copy all as JSON" here... }
r = X25519PrivateKey.from_private_bytes(bytes.fromhex("<the private key you recovered>"))
R, E = bytes.fromhex(c["recipientPublicKey"]), bytes.fromhex(c["ephemeralPublicKey"])
info = c["scheme"].encode()
shared = r.exchange(X25519PublicKey.from_public_bytes(E))
key = HKDF(algorithm=SHA256(), length=32, salt=E + R, info=info).derive(shared)
print(AESGCM(key).decrypt(bytes.fromhex(c["nonce"]), bytes.fromhex(c["ciphertext"]), info).decode())
This is not post-quantum safe
X25519 is safe against classical computers. It is not safe against a large, fault-tolerant quantum computer. Shor's algorithm solves the elliptic-curve discrete logarithm in polynomial time, so a big enough machine could recover the key quickly. No such machine exists today. That's why this challenge is open, and why new protocols are adding post-quantum key exchange (such as ML-KEM) alongside X25519.