Okp

data class Okp(val crv: String, val x: String, val d: String? = null, val use: String? = null, val keyOps: List<String>? = null, val alg: String? = null, val kid: String? = null) : Jwk(source)

Octet Key Pair (OKP) key (kty = "OKP") as defined in RFC 8037.

Supports EdDSA signing algorithms (Ed25519, Ed448). The crv field identifies the curve and the x field holds the base64url-encoded public key bytes. The optional d field holds the base64url-encoded private key bytes.

Constructors

Link copied to clipboard
constructor(crv: String, x: String, d: String? = null, use: String? = null, keyOps: List<String>? = null, alg: String? = null, kid: String? = null)

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Thumbprint computed from the OKP key parameters crv (curve) and x (public key bytes).

Properties

Link copied to clipboard
open override val alg: String?

The alg parameter (RFC 7517 §4.4); identifies the algorithm intended for use with this key.

Link copied to clipboard
val crv: String

The curve name, e.g. "Ed25519" or "Ed448".

Link copied to clipboard
val d: String?

The base64url-encoded private key bytes; present only for private keys.

Link copied to clipboard
open override val isPrivate: Boolean

Whether this JWK contains private key material.

Link copied to clipboard
open override val keyOps: List<String>?

The key_ops parameter (RFC 7517 §4.3); lists the operations for which this key is intended to be used.

Link copied to clipboard
open override val kid: String?

The kid parameter (RFC 7517 §4.5); a hint used to identify a specific key within a key set.

Link copied to clipboard
open override val thumbprint: Jwk.Thumbprint

The JWK Thumbprint for this key as defined by RFC 7638.

Link copied to clipboard
open override val use: String?

The use parameter (RFC 7517 §4.2); indicates the intended use of the public key ("sig" for signature or "enc" for encryption).

Link copied to clipboard
val x: String

The base64url-encoded public key bytes.