Ed25519 signs data. This page encrypts to an Ed25519 public key by converting it to X25519 the same way libsodium does, then using X25519, HKDF-SHA-256, and AES-256-GCM. Decryption uses the 32-byte Ed25519 seed. Keys and messages stay in memory for this page. They are not written to the URL, browser storage, or analytics.
A normal encryption picks a new ephemeral X25519 key and a new 12-byte nonce. The ciphertext is version 0x01, the ephemeral public key, the nonce, the AES-GCM ciphertext, and the 16-byte tag. HKDF salt is the ephemeral public key followed by the recipient X25519 public key. The info string is the UTF-8 bytes of devtest.run ed25519-seal-v1. Additional data is empty. Authentication failure clears the plaintext.
This calculation
- Ephemeral X25519 public key
- Shared secret
- AES-256 key
Public sample
Recompute this vector with Node.js crypto: SHA-512 and the clamp for the X25519 secret, X25519 for the public keys and shared secret, hkdfSync SHA-256, and AES-256-GCM with an empty additional-data field. The private conversion hashes only the 32-byte seed. The public conversion uses the first 255 bits as y and calculates u = (1+y)/(1-y) mod 2^255-19.
- Plaintext
- UTF-8, 12 bytes:
ed25519-seal - Ed25519 seed
- 32 bytes, RFC 8032 test 1
- Ed25519 public key
- 32 bytes
- X25519 private key
- 32 bytes, first 32 bytes of SHA-512(seed), then clamped
- X25519 public key
- 32 bytes
- Ephemeral secret
- 32 bytes: 000102…1e1f
- Ephemeral public key
- 32 bytes
- Nonce
- 12 bytes: 000102030405060708090a0b
- HKDF info
- UTF-8, 27 bytes:
devtest.run ed25519-seal-v1 - HKDF salt
- 64 bytes: ephemeral public key || recipient X25519 public key
- Shared secret
- 32 bytes
- AES-256 key
- 32 bytes
- Ciphertext body
- 12 bytes
- Tag
- 16 bytes
- Wire
- 73 bytes: version + ephemeral public key + nonce + body + tag
Seed and public key
9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60 d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a
Derived X25519 private and public keys
307c83864f2833cb427a2ef1c00a013cfdff2768d980c0a3a520f006904de94f d85e07ec22b0ad881537c2f44d662d1a143cf830c57aca4305d85c7a90f6b62e
Ephemeral public key, nonce, shared secret, and AES key
8f40c5adb68f25624ae5b214ea767a6ec94d829d3d7b5e1ad1ba6f3e2138285f 000102030405060708090a0b 0636af465fa2b32b319cbe5e3f38f0c65ba4c8cf7fce159f2d2f2473f05fed55 00f065f9dfd81e783d003c31e3ca298a591c51e9aa2031ace21dd6c7ec73168d
Ciphertext HEX and Base64
018f40c5adb68f25624ae5b214ea767a6ec94d829d3d7b5e1ad1ba6f3e2138285f000102030405060708090a0b8417ed749c9c0f4c8aa158fdde1475392711db8d2145be0deff8815d AY9Axa22jyViSuWyFOp2em7JTYKdPXteGtG6bz4hOChfAAECAwQFBgcICQoLhBftdJycD0yKoVj93hR1OScR240hRb4N7/iBXQ==
PKCS#8 / SPKI PEM
-----BEGIN PRIVATE KEY----- MC4CAQAwBQYDK2VwBCIEIJ1hsZ3v/VpguoRK9JLsLMREScVpezJpGXA7rAMcrn9g -----END PRIVATE KEY----- -----BEGIN PUBLIC KEY----- MCowBQYDK2VwAyEA11qYAYKxCrfVS/7TyWQHOg7hcvPapiMlrwIaaPcHURo= -----END PUBLIC KEY-----