Generate an elliptic-curve key pair on a selected SEC1 curve.
The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.
Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.
A private scalar is chosen within the curve order and multiplied by the generator point to produce the public point; the key is serialized in the selected SEC1 or PKCS#8 format. The curve parameters define the field, generator, and order used for that multiplication.
Curve: P-256 Format: jwk
=== EC Public Key (P-256, JWK) ===
{
"crv": "P-256",
"ext": true,
"key_ops": [
"verify"
],
"kty": "EC",
"x": "aj7Qm5ZhAjDhv-nCudAhDdtw2_8cr1A1KFI8rThs-w4",
"y": "GIi0Lrl96-ndnFtznnv8M_ZNiOrThAnr6mabRXRKGNc"
}
=== EC Private Key (P-256, JWK) ===
{
"crv": "P-256",
"d": "lesTspB1cQpwBTGHdQw8PrnMc2qtuumH3kLCNiNftF4",
"ext": true,
"key_ops": [
"sign"
],
"kty": "EC",
"x": "aj7Qm5ZhAjDhv-nCudAhDdtw2_8cr1A1KFI8rThs-w4",
"y": "GIi0Lrl96-ndnFtznnv8M_ZNiOrThAnr6mabRXRKGNc"
}
Wallets, TLS clients, and test fixtures generate elliptic-curve keys.