Home / Security & Crypto Tools / ECDH Shared Secret Generator
Security & Crypto Tools

ECDH Shared Secret Generator

Compare Alice and Bob derived bits locally for P-256, P-384, or P-521 without transmitting private keys.

ReadyDemonstration only: a real protocol also needs authentication and a KDF.

All cryptographic operations run locally in your browser. Keep private keys secret and use production key-management practices for real systems.

Peer-key interoperability & HKDF lab

Generate a disposable local key pair, export only its public key, import a peer SPKI public key on the same curve, and derive both the raw ECDH secret and a 32-byte HKDF-SHA-256 test key locally.

Generate a local key pair to begin. Private key material stays in memory and is not displayed.

Browser-local cryptographic utilities

preserves the established Web Crypto workflows while connecting token, key, KDF, encryption/signature, fingerprint and verification jobs. Inputs stay in your browser unless the page clearly states that a network request is required.

Protocol boundary

Correct primitive output does not certify a complete protocol, key-management system, parameter choice, endpoint, or production deployment. Match the source system exactly and use established application/security libraries for production authentication and storage.

Use this result with confidence

Verify curve and key format before deriving

ECDH succeeds only when both public keys use the same named curve and the imported representation is interpreted correctly. A PEM label can look plausible while wrapping the wrong object type. Check the selected curve, confirm the peer public key is SPKI or another format the importer explicitly supports, and reject malformed input rather than guessing.

Treat the raw shared secret as intermediate material

The bytes produced by ECDH are not normally the final application key. Real protocols feed the shared secret into a key-derivation function with protocol-specific salt and context, then use the derived key for a defined purpose. Keep the derivation inputs with the test record so another implementation can reproduce the same result.

Authentication is separate from agreement

Matching shared-secret bytes prove that two compatible key pairs completed the mathematical agreement. They do not prove who owns the peer key. Production protocols add certificates, signatures, authenticated key exchange, or another identity layer. Use this page as an interoperability and verification lab, not as a complete secure-channel design.

Use disposable test material in browser experiments

For troubleshooting, use generated or otherwise non-production keys. Avoid pasting long-lived private credentials into general-purpose browser tools. A useful round-trip is to export the local public key, derive against an independent peer implementation, and compare only the derived test output and public-key fingerprints.

Search by task, tool name, or category. Press Esc to close.
Start typing to find a tool.