JwkCurve uses ConstantsTrait
Enumeration of cryptographic curves used by a JSON Web Key (the `crv` member of a JWK).
The crv parameter appears on Elliptic Curve keys (JwkKeyType::EC)
and on Octet Key Pair keys (JwkKeyType::OKP). It selects the curve the key is defined over.
Example:
$jwk =
[
JwkParameter::KTY => JwkKeyType::OKP ,
JwkParameter::CRV => JwkCurve::ED25519 ,
JwkParameter::X => $x ,
] ;
References:
- RFC 7518 §6.2.1.1 —
P-256,P-384,P-521(EC keys) - RFC 8812 §3 —
secp256k1(used withES256K) - RFC 8037 §3.1 —
Ed25519,Ed448,X25519,X448(OKP keys) - IANA JSON Web Key Elliptic Curve registry
Tags
Table of Contents
Constants
- ED25519 : string = 'Ed25519'
- `Ed25519` — EdDSA signature curve (RFC 8037).
- ED448 : string = 'Ed448'
- `Ed448` — EdDSA signature curve (RFC 8037).
- P_256 : string = 'P-256'
- `P-256` — NIST P-256 (secp256r1), used with `ES256` (RFC 7518).
- P_384 : string = 'P-384'
- `P-384` — NIST P-384 (secp384r1), used with `ES384` (RFC 7518).
- P_521 : string = 'P-521'
- `P-521` — NIST P-521 (secp521r1), used with `ES512` (RFC 7518).
- SECP256K1 : string = 'secp256k1'
- `secp256k1` — SEC 2 curve, used with `ES256K` (RFC 8812).
- X25519 : string = 'X25519'
- `X25519` — ECDH key-agreement curve (RFC 8037).
- X448 : string = 'X448'
- `X448` — ECDH key-agreement curve (RFC 8037).
Constants
ED25519
`Ed25519` — EdDSA signature curve (RFC 8037).
public
string
ED25519
= 'Ed25519'
ED448
`Ed448` — EdDSA signature curve (RFC 8037).
public
string
ED448
= 'Ed448'
P_256
`P-256` — NIST P-256 (secp256r1), used with `ES256` (RFC 7518).
public
string
P_256
= 'P-256'
P_384
`P-384` — NIST P-384 (secp384r1), used with `ES384` (RFC 7518).
public
string
P_384
= 'P-384'
P_521
`P-521` — NIST P-521 (secp521r1), used with `ES512` (RFC 7518).
public
string
P_521
= 'P-521'
SECP256K1
`secp256k1` — SEC 2 curve, used with `ES256K` (RFC 8812).
public
string
SECP256K1
= 'secp256k1'
X25519
`X25519` — ECDH key-agreement curve (RFC 8037).
public
string
X25519
= 'X25519'
X448
`X448` — ECDH key-agreement curve (RFC 8037).
public
string
X448
= 'X448'