/** * @see {@link https://datatracker.ietf.org/doc/html/rfc7518 JSON Web Algorithms (JWA)} * * * File automatically generated using json-schema-to-typescript. * ! DO NOT MODIFY IT BY HAND ! * Instead, modify the source file ./jose/jwa.schema.json of @oada/formats * and run `$ yarn build` to regenerate this file. * * @packageDocumentation */ /** * `$id` of the source schema * @see {@link https://formats.openag.io/jose/jwa.schema.json} */ export declare const $id = "https://formats.openag.io/jose/jwa.schema.json"; /** * JSON Schema used to generate this type * @see {@link https://formats.openag.io/jose/jwa.schema.json} */ export declare const schema: { readonly $id: "https://formats.openag.io/jose/jwa.schema.json"; readonly $schema: "http://json-schema.org/draft-07/schema#"; readonly title: "JWA"; readonly description: "@see {@link https://datatracker.ietf.org/doc/html/rfc7518 JSON Web Algorithms (JWA)}"; readonly definitions: { readonly alg: { readonly title: "alg (Algorithm) parameter"; readonly description: "JSON Web Signature and Encryption Algorithms"; readonly definitions: { readonly registered: { readonly title: "Registered alg"; readonly description: "IANA registered values for JSON Web Signature and Encryption Algorithms\n@see {@link https://www.iana.org/assignments/jose/jose.xhtml#web-signature-encryption-algorithms}"; readonly $comment: "Enum retrieved dynamically from https://www.iana.org/assignments/jose/jose.xhtml#web-signature-encryption-algorithms on Tue May 19 2026 18:03:05 GMT-0700 (Pacific Daylight Time)"; readonly oneOf: readonly [{ readonly title: "HS256"; readonly description: "HMAC using SHA-256\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-3.2}"; readonly const: "HS256"; }, { readonly title: "HS384"; readonly description: "HMAC using SHA-384\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-3.2}"; readonly const: "HS384"; }, { readonly title: "HS512"; readonly description: "HMAC using SHA-512\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-3.2}"; readonly const: "HS512"; }, { readonly title: "RS256"; readonly description: "RSASSA-PKCS1-v1_5 using SHA-256\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-3.3}"; readonly const: "RS256"; }, { readonly title: "RS384"; readonly description: "RSASSA-PKCS1-v1_5 using SHA-384\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-3.3}"; readonly const: "RS384"; }, { readonly title: "RS512"; readonly description: "RSASSA-PKCS1-v1_5 using SHA-512\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-3.3}"; readonly const: "RS512"; }, { readonly title: "ES256"; readonly description: "ECDSA using P-256 and SHA-256\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-3.4}"; readonly const: "ES256"; }, { readonly title: "ES384"; readonly description: "ECDSA using P-384 and SHA-384\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-3.4}"; readonly const: "ES384"; }, { readonly title: "ES512"; readonly description: "ECDSA using P-521 and SHA-512\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-3.4}"; readonly const: "ES512"; }, { readonly title: "PS256"; readonly description: "RSASSA-PSS using SHA-256 and MGF1 with SHA-256\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-3.5}"; readonly const: "PS256"; }, { readonly title: "PS384"; readonly description: "RSASSA-PSS using SHA-384 and MGF1 with SHA-384\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-3.5}"; readonly const: "PS384"; }, { readonly title: "PS512"; readonly description: "RSASSA-PSS using SHA-512 and MGF1 with SHA-512\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-3.5}"; readonly const: "PS512"; }, { readonly title: "none"; readonly description: "No digital signature or MAC performed\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-3.6}"; readonly const: "none"; }, { readonly title: "RSA1_5"; readonly description: "RSAES-PKCS1-v1_5\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-4.2}"; readonly const: "RSA1_5"; }, { readonly title: "RSA-OAEP"; readonly description: "RSAES OAEP using default parameters\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-4.3}"; readonly const: "RSA-OAEP"; }, { readonly title: "RSA-OAEP-256"; readonly description: "RSAES OAEP using SHA-256 and MGF1 with SHA-256\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-4.3}"; readonly const: "RSA-OAEP-256"; }, { readonly title: "A128KW"; readonly description: "AES Key Wrap using 128-bit key\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-4.4}"; readonly const: "A128KW"; }, { readonly title: "A192KW"; readonly description: "AES Key Wrap using 192-bit key\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-4.4}"; readonly const: "A192KW"; }, { readonly title: "A256KW"; readonly description: "AES Key Wrap using 256-bit key\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-4.4}"; readonly const: "A256KW"; }, { readonly title: "dir"; readonly description: "Direct use of a shared symmetric key\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-4.5}"; readonly const: "dir"; }, { readonly title: "ECDH-ES"; readonly description: "ECDH-ES using Concat KDF\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-4.6}"; readonly const: "ECDH-ES"; }, { readonly title: "ECDH-ES+A128KW"; readonly description: "ECDH-ES using Concat KDF and \"A128KW\" wrapping\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-4.6}"; readonly const: "ECDH-ES+A128KW"; }, { readonly title: "ECDH-ES+A192KW"; readonly description: "ECDH-ES using Concat KDF and \"A192KW\" wrapping\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-4.6}"; readonly const: "ECDH-ES+A192KW"; }, { readonly title: "ECDH-ES+A256KW"; readonly description: "ECDH-ES using Concat KDF and \"A256KW\" wrapping\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-4.6}"; readonly const: "ECDH-ES+A256KW"; }, { readonly title: "A128GCMKW"; readonly description: "Key wrapping with AES GCM using 128-bit key\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-4.7}"; readonly const: "A128GCMKW"; }, { readonly title: "A192GCMKW"; readonly description: "Key wrapping with AES GCM using 192-bit key\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-4.7}"; readonly const: "A192GCMKW"; }, { readonly title: "A256GCMKW"; readonly description: "Key wrapping with AES GCM using 256-bit key\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-4.7}"; readonly const: "A256GCMKW"; }, { readonly title: "PBES2-HS256+A128KW"; readonly description: "PBES2 with HMAC SHA-256 and \"A128KW\" wrapping\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-4.8}"; readonly const: "PBES2-HS256+A128KW"; }, { readonly title: "PBES2-HS384+A192KW"; readonly description: "PBES2 with HMAC SHA-384 and \"A192KW\" wrapping\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-4.8}"; readonly const: "PBES2-HS384+A192KW"; }, { readonly title: "PBES2-HS512+A256KW"; readonly description: "PBES2 with HMAC SHA-512 and \"A256KW\" wrapping\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-4.8}"; readonly const: "PBES2-HS512+A256KW"; }, { readonly title: "A128CBC-HS256"; readonly description: "AES_128_CBC_HMAC_SHA_256 authenticated encryption algorithm\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-5.2.3}"; readonly const: "A128CBC-HS256"; }, { readonly title: "A192CBC-HS384"; readonly description: "AES_192_CBC_HMAC_SHA_384 authenticated encryption algorithm\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-5.2.4}"; readonly const: "A192CBC-HS384"; }, { readonly title: "A256CBC-HS512"; readonly description: "AES_256_CBC_HMAC_SHA_512 authenticated encryption algorithm\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-5.2.5}"; readonly const: "A256CBC-HS512"; }, { readonly title: "A128GCM"; readonly description: "AES GCM using 128-bit key\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-5.3}"; readonly const: "A128GCM"; }, { readonly title: "A192GCM"; readonly description: "AES GCM using 192-bit key\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-5.3}"; readonly const: "A192GCM"; }, { readonly title: "A256GCM"; readonly description: "AES GCM using 256-bit key\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-5.3}"; readonly const: "A256GCM"; }, { readonly title: "EdDSA"; readonly description: "EdDSA signature algorithms\n@see {@link https://datatracker.ietf.org/doc/html/rfc9864#section-2.2}"; readonly const: "EdDSA"; }, { readonly title: "RS1"; readonly description: "RSASSA-PKCS1-v1_5 with SHA-1\n@see {@link https://www.w3.org/TR/WebCryptoAPI}"; readonly const: "RS1"; }, { readonly title: "RSA-OAEP-384"; readonly description: "RSA-OAEP using SHA-384 and MGF1 with SHA-384\n@see {@link https://www.w3.org/TR/WebCryptoAPI}"; readonly const: "RSA-OAEP-384"; }, { readonly title: "RSA-OAEP-512"; readonly description: "RSA-OAEP using SHA-512 and MGF1 with SHA-512\n@see {@link https://www.w3.org/TR/WebCryptoAPI}"; readonly const: "RSA-OAEP-512"; }, { readonly title: "A128CBC"; readonly description: "AES CBC using 128 bit key\n@see {@link https://www.w3.org/TR/WebCryptoAPI}"; readonly const: "A128CBC"; }, { readonly title: "A192CBC"; readonly description: "AES CBC using 192 bit key\n@see {@link https://www.w3.org/TR/WebCryptoAPI}"; readonly const: "A192CBC"; }, { readonly title: "A256CBC"; readonly description: "AES CBC using 256 bit key\n@see {@link https://www.w3.org/TR/WebCryptoAPI}"; readonly const: "A256CBC"; }, { readonly title: "A128CTR"; readonly description: "AES CTR using 128 bit key\n@see {@link https://www.w3.org/TR/WebCryptoAPI}"; readonly const: "A128CTR"; }, { readonly title: "A192CTR"; readonly description: "AES CTR using 192 bit key\n@see {@link https://www.w3.org/TR/WebCryptoAPI}"; readonly const: "A192CTR"; }, { readonly title: "A256CTR"; readonly description: "AES CTR using 256 bit key\n@see {@link https://www.w3.org/TR/WebCryptoAPI}"; readonly const: "A256CTR"; }, { readonly title: "HS1"; readonly description: "HMAC using SHA-1\n@see {@link https://www.w3.org/TR/WebCryptoAPI}"; readonly const: "HS1"; }, { readonly title: "ES256K"; readonly description: "ECDSA using secp256k1 curve and SHA-256\n@see {@link https://datatracker.ietf.org/doc/html/rfc8812#section-3.2}"; readonly const: "ES256K"; }, { readonly title: "ML-DSA-44"; readonly description: "ML-DSA-44 as described in US NIST FIPS 204\n@see {@link https://datatracker.ietf.org/doc/html/rfcNaN}"; readonly const: "ML-DSA-44"; }, { readonly title: "ML-DSA-65"; readonly description: "ML-DSA-65 as described in US NIST FIPS 204\n@see {@link https://datatracker.ietf.org/doc/html/rfcNaN}"; readonly const: "ML-DSA-65"; }, { readonly title: "ML-DSA-87"; readonly description: "ML-DSA-87 as described in US NIST FIPS 204\n@see {@link https://datatracker.ietf.org/doc/html/rfcNaN}"; readonly const: "ML-DSA-87"; }, { readonly title: "Ed25519"; readonly description: "EdDSA using the Ed25519 parameter set in Section 5.1 of [RFC8032]\n@see {@link https://datatracker.ietf.org/doc/html/rfc9864#section-2.2}"; readonly const: "Ed25519"; }, { readonly title: "Ed448"; readonly description: "EdDSA using the Ed448 parameter set in Section 5.2 of [RFC8032]\n@see {@link https://datatracker.ietf.org/doc/html/rfc9864#section-2.2}"; readonly const: "Ed448"; }]; }; }; readonly oneOf: readonly [{ readonly $ref: "#/definitions/alg/definitions/registered"; }, { readonly $ref: "../utils.schema.json#/definitions/anyOtherString"; }]; }; readonly kty: { readonly title: "kty (Key Type) parameter"; readonly description: "Identifies the cryptographic algorithm family used with the key"; readonly definitions: { readonly registered: { readonly title: "Registered kty"; readonly description: "IANA registered values for JSON Web Key Types\n@see {@link https://www.iana.org/assignments/jose/jose.xhtml#web-key-types}"; readonly $comment: "Enum retrieved dynamically from https://www.iana.org/assignments/jose/jose.xhtml#web-key-types on Tue May 19 2026 18:03:05 GMT-0700 (Pacific Daylight Time)"; readonly oneOf: readonly [{ readonly title: "EC"; readonly description: "Elliptic Curve\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-6.2}"; readonly const: "EC"; }, { readonly title: "RSA"; readonly description: "RSA\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-6.3}"; readonly const: "RSA"; }, { readonly title: "oct"; readonly description: "Octet sequence\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-6.4}"; readonly const: "oct"; }, { readonly title: "OKP"; readonly description: "Octet string key pairs\n@see {@link https://datatracker.ietf.org/doc/html/rfc8037#section-2}"; readonly const: "OKP"; }, { readonly title: "AKP"; readonly description: "Algorithm Key Pair\n@see {@link https://datatracker.ietf.org/doc/html/rfcNaN}"; readonly const: "AKP"; }]; }; }; readonly oneOf: readonly [{ readonly $ref: "#/definitions/kty/definitions/registered"; }, { readonly $ref: "../utils.schema.json#/definitions/anyOtherString"; }]; }; readonly zip: { readonly title: "zip (Compression Algorithm) parameter"; readonly description: "JSON Web Encryption Compression Algorithms"; readonly definitions: { readonly registered: { readonly title: "Registered zip"; readonly description: "IANA registered values for JSON Web Encryption Compression Algorithms\n@see {@link https://www.iana.org/assignments/jose/jose.xhtml#web-encryption-compression-algorithms}"; readonly $comment: "Enum retrieved dynamically from https://www.iana.org/assignments/jose/jose.xhtml#web-encryption-compression-algorithms on Tue May 19 2026 18:03:05 GMT-0700 (Pacific Daylight Time)"; readonly oneOf: readonly [{ readonly title: "DEF"; readonly description: "DEFLATE\n@see {@link https://datatracker.ietf.org/doc/html/rfc7516}"; readonly const: "DEF"; }]; }; }; readonly oneOf: readonly [{ readonly $ref: "#/definitions/zip/definitions/registered"; }, { readonly $ref: "../utils.schema.json#/definitions/anyOtherString"; }]; }; readonly crv: { readonly title: "crv (Curve) parameter"; readonly description: "JSON Web Key Elliptic Curve"; readonly definitions: { readonly registered: { readonly title: "Registered crv"; readonly description: "IANA registered values for JSON Web Key Elliptic Curve\n@see {@link https://www.iana.org/assignments/jose/jose.xhtml#web-key-elliptic-curve}"; readonly $comment: "Enum retrieved dynamically from https://www.iana.org/assignments/jose/jose.xhtml#web-key-elliptic-curve on Tue May 19 2026 18:03:05 GMT-0700 (Pacific Daylight Time)"; readonly oneOf: readonly [{ readonly title: "P-256"; readonly description: "P-256 Curve\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-6.2.1.1}"; readonly const: "P-256"; }, { readonly title: "P-384"; readonly description: "P-384 Curve\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-6.2.1.1}"; readonly const: "P-384"; }, { readonly title: "P-521"; readonly description: "P-521 Curve\n@see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-6.2.1.1}"; readonly const: "P-521"; }, { readonly title: "Ed25519"; readonly description: "Ed25519 signature algorithm key pairs\n@see {@link https://datatracker.ietf.org/doc/html/rfc8037#section-3.1}"; readonly const: "Ed25519"; }, { readonly title: "Ed448"; readonly description: "Ed448 signature algorithm key pairs\n@see {@link https://datatracker.ietf.org/doc/html/rfc8037#section-3.1}"; readonly const: "Ed448"; }, { readonly title: "X25519"; readonly description: "X25519 function key pairs\n@see {@link https://datatracker.ietf.org/doc/html/rfc8037#section-3.2}"; readonly const: "X25519"; }, { readonly title: "X448"; readonly description: "X448 function key pairs\n@see {@link https://datatracker.ietf.org/doc/html/rfc8037#section-3.2}"; readonly const: "X448"; }, { readonly title: "secp256k1"; readonly description: "SECG secp256k1 curve\n@see {@link https://datatracker.ietf.org/doc/html/rfc8812#section-3.1}"; readonly const: "secp256k1"; }]; }; }; readonly oneOf: readonly [{ readonly $ref: "#/definitions/crv/definitions/registered"; }, { readonly $ref: "../utils.schema.json#/definitions/anyOtherString"; }]; }; }; }; /** * Returns true if `val` is a @type `JWA`, false otherwise */ export declare function is(val: unknown): val is JWA; /** * Asserts that `val` is a @type `JWA` */ export declare function assert(val: unknown): asserts val is JWA; /** * @see {@link https://datatracker.ietf.org/doc/html/rfc7518 JSON Web Algorithms (JWA)} * */ export default JWA; /** * JSON Web Signature and Encryption Algorithms * * This interface was referenced by `JWA`'s JSON-Schema * via the `definition` "alg". */ export type AlgAlgorithmParameter = RegisteredAlg | AnyOtherString; /** * IANA registered values for JSON Web Signature and Encryption Algorithms * @see {@link https://www.iana.org/assignments/jose/jose.xhtml#web-signature-encryption-algorithms} */ export type RegisteredAlg = HS256 | HS384 | HS512 | RS256 | RS384 | RS512 | ES256 | ES384 | ES512 | PS256 | PS384 | PS512 | None | RSA1_5 | RSAOAEP | RSAOAEP256 | A128KW | A192KW | A256KW | Dir | ECDHES | ECDHESA128KW | ECDHESA192KW | ECDHESA256KW | A128GCMKW | A192GCMKW | A256GCMKW | PBES2HS256A128KW | PBES2HS384A192KW | PBES2HS512A256KW | A128CBCHS256 | A192CBCHS384 | A256CBCHS512 | A128GCM | A192GCM | A256GCM | EdDSA | RS1 | RSAOAEP384 | RSAOAEP512 | A128CBC | A192CBC | A256CBC | A128CTR | A192CTR | A256CTR | HS1 | ES256K | MLDSA44 | MLDSA65 | MLDSA87 | Ed25519 | Ed448; /** * HMAC using SHA-256 * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-3.2} */ export type HS256 = 'HS256'; /** * HMAC using SHA-384 * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-3.2} */ export type HS384 = 'HS384'; /** * HMAC using SHA-512 * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-3.2} */ export type HS512 = 'HS512'; /** * RSASSA-PKCS1-v1_5 using SHA-256 * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-3.3} */ export type RS256 = 'RS256'; /** * RSASSA-PKCS1-v1_5 using SHA-384 * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-3.3} */ export type RS384 = 'RS384'; /** * RSASSA-PKCS1-v1_5 using SHA-512 * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-3.3} */ export type RS512 = 'RS512'; /** * ECDSA using P-256 and SHA-256 * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-3.4} */ export type ES256 = 'ES256'; /** * ECDSA using P-384 and SHA-384 * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-3.4} */ export type ES384 = 'ES384'; /** * ECDSA using P-521 and SHA-512 * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-3.4} */ export type ES512 = 'ES512'; /** * RSASSA-PSS using SHA-256 and MGF1 with SHA-256 * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-3.5} */ export type PS256 = 'PS256'; /** * RSASSA-PSS using SHA-384 and MGF1 with SHA-384 * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-3.5} */ export type PS384 = 'PS384'; /** * RSASSA-PSS using SHA-512 and MGF1 with SHA-512 * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-3.5} */ export type PS512 = 'PS512'; /** * No digital signature or MAC performed * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-3.6} */ export type None = 'none'; /** * RSAES-PKCS1-v1_5 * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-4.2} */ export type RSA1_5 = 'RSA1_5'; /** * RSAES OAEP using default parameters * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-4.3} */ export type RSAOAEP = 'RSA-OAEP'; /** * RSAES OAEP using SHA-256 and MGF1 with SHA-256 * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-4.3} */ export type RSAOAEP256 = 'RSA-OAEP-256'; /** * AES Key Wrap using 128-bit key * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-4.4} */ export type A128KW = 'A128KW'; /** * AES Key Wrap using 192-bit key * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-4.4} */ export type A192KW = 'A192KW'; /** * AES Key Wrap using 256-bit key * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-4.4} */ export type A256KW = 'A256KW'; /** * Direct use of a shared symmetric key * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-4.5} */ export type Dir = 'dir'; /** * ECDH-ES using Concat KDF * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-4.6} */ export type ECDHES = 'ECDH-ES'; /** * ECDH-ES using Concat KDF and "A128KW" wrapping * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-4.6} */ export type ECDHESA128KW = 'ECDH-ES+A128KW'; /** * ECDH-ES using Concat KDF and "A192KW" wrapping * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-4.6} */ export type ECDHESA192KW = 'ECDH-ES+A192KW'; /** * ECDH-ES using Concat KDF and "A256KW" wrapping * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-4.6} */ export type ECDHESA256KW = 'ECDH-ES+A256KW'; /** * Key wrapping with AES GCM using 128-bit key * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-4.7} */ export type A128GCMKW = 'A128GCMKW'; /** * Key wrapping with AES GCM using 192-bit key * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-4.7} */ export type A192GCMKW = 'A192GCMKW'; /** * Key wrapping with AES GCM using 256-bit key * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-4.7} */ export type A256GCMKW = 'A256GCMKW'; /** * PBES2 with HMAC SHA-256 and "A128KW" wrapping * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-4.8} */ export type PBES2HS256A128KW = 'PBES2-HS256+A128KW'; /** * PBES2 with HMAC SHA-384 and "A192KW" wrapping * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-4.8} */ export type PBES2HS384A192KW = 'PBES2-HS384+A192KW'; /** * PBES2 with HMAC SHA-512 and "A256KW" wrapping * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-4.8} */ export type PBES2HS512A256KW = 'PBES2-HS512+A256KW'; /** * AES_128_CBC_HMAC_SHA_256 authenticated encryption algorithm * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-5.2.3} */ export type A128CBCHS256 = 'A128CBC-HS256'; /** * AES_192_CBC_HMAC_SHA_384 authenticated encryption algorithm * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-5.2.4} */ export type A192CBCHS384 = 'A192CBC-HS384'; /** * AES_256_CBC_HMAC_SHA_512 authenticated encryption algorithm * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-5.2.5} */ export type A256CBCHS512 = 'A256CBC-HS512'; /** * AES GCM using 128-bit key * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-5.3} */ export type A128GCM = 'A128GCM'; /** * AES GCM using 192-bit key * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-5.3} */ export type A192GCM = 'A192GCM'; /** * AES GCM using 256-bit key * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-5.3} */ export type A256GCM = 'A256GCM'; /** * EdDSA signature algorithms * @see {@link https://datatracker.ietf.org/doc/html/rfc9864#section-2.2} */ export type EdDSA = 'EdDSA'; /** * RSASSA-PKCS1-v1_5 with SHA-1 * @see {@link https://www.w3.org/TR/WebCryptoAPI} */ export type RS1 = 'RS1'; /** * RSA-OAEP using SHA-384 and MGF1 with SHA-384 * @see {@link https://www.w3.org/TR/WebCryptoAPI} */ export type RSAOAEP384 = 'RSA-OAEP-384'; /** * RSA-OAEP using SHA-512 and MGF1 with SHA-512 * @see {@link https://www.w3.org/TR/WebCryptoAPI} */ export type RSAOAEP512 = 'RSA-OAEP-512'; /** * AES CBC using 128 bit key * @see {@link https://www.w3.org/TR/WebCryptoAPI} */ export type A128CBC = 'A128CBC'; /** * AES CBC using 192 bit key * @see {@link https://www.w3.org/TR/WebCryptoAPI} */ export type A192CBC = 'A192CBC'; /** * AES CBC using 256 bit key * @see {@link https://www.w3.org/TR/WebCryptoAPI} */ export type A256CBC = 'A256CBC'; /** * AES CTR using 128 bit key * @see {@link https://www.w3.org/TR/WebCryptoAPI} */ export type A128CTR = 'A128CTR'; /** * AES CTR using 192 bit key * @see {@link https://www.w3.org/TR/WebCryptoAPI} */ export type A192CTR = 'A192CTR'; /** * AES CTR using 256 bit key * @see {@link https://www.w3.org/TR/WebCryptoAPI} */ export type A256CTR = 'A256CTR'; /** * HMAC using SHA-1 * @see {@link https://www.w3.org/TR/WebCryptoAPI} */ export type HS1 = 'HS1'; /** * ECDSA using secp256k1 curve and SHA-256 * @see {@link https://datatracker.ietf.org/doc/html/rfc8812#section-3.2} */ export type ES256K = 'ES256K'; /** * ML-DSA-44 as described in US NIST FIPS 204 * @see {@link https://datatracker.ietf.org/doc/html/rfcNaN} */ export type MLDSA44 = 'ML-DSA-44'; /** * ML-DSA-65 as described in US NIST FIPS 204 * @see {@link https://datatracker.ietf.org/doc/html/rfcNaN} */ export type MLDSA65 = 'ML-DSA-65'; /** * ML-DSA-87 as described in US NIST FIPS 204 * @see {@link https://datatracker.ietf.org/doc/html/rfcNaN} */ export type MLDSA87 = 'ML-DSA-87'; /** * EdDSA using the Ed25519 parameter set in Section 5.1 of [RFC8032] * @see {@link https://datatracker.ietf.org/doc/html/rfc9864#section-2.2} */ export type Ed25519 = 'Ed25519'; /** * EdDSA using the Ed448 parameter set in Section 5.2 of [RFC8032] * @see {@link https://datatracker.ietf.org/doc/html/rfc9864#section-2.2} */ export type Ed448 = 'Ed448'; /** * Workaround to make TypeScript autocomplete better for string enums */ export type AnyOtherString = string & Record; /** * Identifies the cryptographic algorithm family used with the key * * This interface was referenced by `JWA`'s JSON-Schema * via the `definition` "kty". */ export type KtyKeyTypeParameter = RegisteredKty | AnyOtherString; /** * IANA registered values for JSON Web Key Types * @see {@link https://www.iana.org/assignments/jose/jose.xhtml#web-key-types} */ export type RegisteredKty = EC | RSA | Oct | OKP | AKP; /** * Elliptic Curve * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-6.2} */ export type EC = 'EC'; /** * RSA * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-6.3} */ export type RSA = 'RSA'; /** * Octet sequence * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-6.4} */ export type Oct = 'oct'; /** * Octet string key pairs * @see {@link https://datatracker.ietf.org/doc/html/rfc8037#section-2} */ export type OKP = 'OKP'; /** * Algorithm Key Pair * @see {@link https://datatracker.ietf.org/doc/html/rfcNaN} */ export type AKP = 'AKP'; /** * JSON Web Encryption Compression Algorithms * * This interface was referenced by `JWA`'s JSON-Schema * via the `definition` "zip". */ export type ZipCompressionAlgorithmParameter = RegisteredZip | AnyOtherString; /** * IANA registered values for JSON Web Encryption Compression Algorithms * @see {@link https://www.iana.org/assignments/jose/jose.xhtml#web-encryption-compression-algorithms} */ export type RegisteredZip = DEF; /** * DEFLATE * @see {@link https://datatracker.ietf.org/doc/html/rfc7516} */ export type DEF = 'DEF'; /** * JSON Web Key Elliptic Curve * * This interface was referenced by `JWA`'s JSON-Schema * via the `definition` "crv". */ export type CrvCurveParameter = RegisteredCrv | AnyOtherString; /** * IANA registered values for JSON Web Key Elliptic Curve * @see {@link https://www.iana.org/assignments/jose/jose.xhtml#web-key-elliptic-curve} */ export type RegisteredCrv = P256 | P384 | P521 | Ed255191 | Ed4481 | X25519 | X448 | Secp256K1; /** * P-256 Curve * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-6.2.1.1} */ export type P256 = 'P-256'; /** * P-384 Curve * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-6.2.1.1} */ export type P384 = 'P-384'; /** * P-521 Curve * @see {@link https://datatracker.ietf.org/doc/html/rfc7518#section-6.2.1.1} */ export type P521 = 'P-521'; /** * Ed25519 signature algorithm key pairs * @see {@link https://datatracker.ietf.org/doc/html/rfc8037#section-3.1} */ export type Ed255191 = 'Ed25519'; /** * Ed448 signature algorithm key pairs * @see {@link https://datatracker.ietf.org/doc/html/rfc8037#section-3.1} */ export type Ed4481 = 'Ed448'; /** * X25519 function key pairs * @see {@link https://datatracker.ietf.org/doc/html/rfc8037#section-3.2} */ export type X25519 = 'X25519'; /** * X448 function key pairs * @see {@link https://datatracker.ietf.org/doc/html/rfc8037#section-3.2} */ export type X448 = 'X448'; /** * SECG secp256k1 curve * @see {@link https://datatracker.ietf.org/doc/html/rfc8812#section-3.1} */ export type Secp256K1 = 'secp256k1'; /** * @see {@link https://datatracker.ietf.org/doc/html/rfc7518 JSON Web Algorithms (JWA)} */ export interface JWA { [k: string]: unknown; }