Nist521gs
A 521-bit elliptic-curve key exchange with a NIST-style curve and 104-byte private key
Source found and wired, correctness not fully proven. Root API only. Reach it with NextSSL(root=True) in Python or the nextssl_root_* functions in C.
About Nist521gs
Nist521gs is a key exchange from the NIST521-GS family. It uses a 144-byte public key, a 104-byte secret key and a 72-byte shared secret. NextSSL lists it in the unverified tier and exposes it through the root API only (NextSSL(root=True) in Python, nextssl_root_* in C).
Overview
NIST521-GS is an elliptic-curve key exchange entry on a 521-bit curve in the NIST-style family. Its public key is 144 bytes, its private key 104 bytes and its shared secret 72 bytes. It relies on the elliptic-curve discrete logarithm problem and is not post-quantum.
NIST521-GS is an elliptic-curve key exchange built on a 521-bit curve of the kind standardised by NIST. The 521-bit size gives roughly 256 bits of classical security, and the 'GS' suffix is used in the archive for the parameterisation, which the archive does not define in detail.
NextSSL records a 144-byte public key, a 104-byte private key and a 72-byte shared secret. Its private key is shorter than the Ed521-GS entry's 130 bytes, which reflects a different encoding of the scalar, not a different security level. The archive tier is unverified.
Shor's algorithm would break this scheme on a large quantum computer, so it is a classical comparison point and a possible hybrid component rather than a post-quantum choice.
How it works
- Each party picks a private scalar and computes the matching public point on the curve.
- The parties exchange public points and multiply each other's point by their own scalar.
- The shared curve point is hashed into the 72-byte shared secret.
Security notes
Unverified in NextSSL. Not post-quantum, since Shor's algorithm breaks the discrete logarithm. Use ML-KEM for post-quantum key establishment.
Typical uses
Sizes
| Field | Bytes | Meaning |
|---|---|---|
| pk | 144 | Public key |
| sk | 104 | Secret key |
| ss | 72 | Shared secret |
| seed | 0 | Seed |
Use it
from nextssl_demo import NextSSL
root = NextSSL(root=True) # tier 'unverified' is reachable from the root API only
pk_a, sk_a = root.call("kex_keygen", "nist521gs", None, outs=2)
ss = root.call("kex_agree", "nist521gs", None, sk_a, peer_pk)[0]
nextssl_root_kex_keygen("nist521gs", NULL, pk, sk);
nextssl_root_kex_agree("nist521gs", NULL, sk, peer_pk, ss);
use nextssl_core::Params;
use nextssl_registry::{self as reg, Policy};
let alg = reg::new_kex_in(reg::all(), Policy::Any, "nist521gs", &Params::new())?;
let (pk, sk) = alg.keypair(&mut *rng)?;
let ss = alg.agree(&sk, &peer_pk)?;
Calls follow the NextSSL C ABI and its language bindings. Buffer sizes are validated against the sizes above.
Similar names
Looking for something else?More key exchange
All 7Frequently asked questions
What is Nist521gs?
Nist521gs is a key exchange in the NIST521-GS family. NIST521-GS is an elliptic-curve key exchange entry on a 521-bit curve in the NIST-style family.
What are the Nist521gs sizes?
In NextSSL, Nist521gs uses: public key 144 bytes, shared secret 72 bytes.
Is Nist521gs safe to use?
Nist521gs is in the unverified tier. Source found and wired, correctness not fully proven. Root API only. It is only reachable through the root API (NextSSL(root=True) in Python, nextssl_root_* in C).
Related families
Deterministic hashing of byte strings to elliptic curve points with the SSWU map
Hash-to-curve (RFC 9380)Deterministic hashing of byte strings to elliptic curve points with the SSWU map
ML-KEMNIST's primary post-quantum key encapsulation mechanism, standardised in FIPS 203
ECDH (including X25519 and X448)Elliptic-curve Diffie-Hellman key agreement on NIST curves, Curve25519 and Curve448
Ed521-GSA 521-bit elliptic-curve key exchange on a Goldilocks-style Edwards curve, not post-quantum