Algorithm

Algorithm identifiers.

This is an enumeration of algorithms and has support for multiple registries, including COSE, JOSE, and the Named Information Hash Algorithm Registry.

Applications should not rely on the ordinals in this enumeration, they might change in the future as algorithms are added or things are rearranged. Use name for a stable identifier if serialization is needed.

Parameters

coseAlgorithmIdentifier

the COSE algorithm identifier or null if this algorithm does not exists in this registry.

joseAlgorithmIdentifier

the JOSE algorithm identifier or null if this algorithm does not exists in this registry.

hashAlgorithmName

the hash algorithm name from the Named Information Hash Algorithm Registry or null if this algorithm does not exists in this registry.

fullySpecified

true if this completely specifies an algorithm, false otherwise. See Fully-Specified Algorithms for JOSE and COSE draft for more information on what constitutes a fully specified algorithm.

curve

the EcCurve used in the algorithm or null if not applicable or not a fully specified algorithm.

hashAlgorithm

the hash algorithm in the the algorithm or null if not applicable or not a fully specified algorithm.

isSigning

true if the algorithm is for signing, false if not applicable or not a fully specified algorithm.

isKeyAgreement

true if the algorithm is for key agreement, false if not applicable or not a fully specified algorithm.

description

A human readable description of the algorithm.

Entries

Link copied to clipboard

Used to indicate the algorithm is unset.

Link copied to clipboard

The algorithm identifier for signatures using ECDSA with SHA-256

Link copied to clipboard

The algorithm identifier for signatures using ECDSA with SHA-384

Link copied to clipboard

The algorithm identifier for signatures using ECDSA with SHA-512

Link copied to clipboard

The algorithm identifier for signatures using EdDSA

Link copied to clipboard

SHA-1 Hash (insecure, shouldn't be used)

Link copied to clipboard

SHA-2 256-bit Hash

Link copied to clipboard

SHA-2 384-bit Hash

Link copied to clipboard

SHA-2 512-bit Hash

Link copied to clipboard

HMAC w/ SHA-256

Link copied to clipboard

HMAC w/ SHA-384

Link copied to clipboard

HMAC w/ SHA-512

Link copied to clipboard

AES-GCM mode w/ 128-bit key, 128-bit tag

Link copied to clipboard

AES-GCM mode w/ 192-bit key, 128-bit tag

Link copied to clipboard

AES-GCM mode w/ 256-bit key, 128-bit tag

Link copied to clipboard

Cipher suite for COSE-HPKE in Base Mode that uses the DHKEM(P-256, HKDF-SHA256) KEM, the HKDF-SHA256 KDF and the AES-128-GCM AEAD.

Link copied to clipboard

RSASSA-PKCS1-v1_5 using SHA-256

Link copied to clipboard

RSASSA-PKCS1-v1_5 using SHA-384

Link copied to clipboard

RSASSA-PKCS1-v1_5 using SHA-512

Link copied to clipboard

ECDSA using P-256 curve and SHA-256

Link copied to clipboard

ECDSA using P-384 curve and SHA-384

Link copied to clipboard

ECDSA using P-521 curve and SHA-512

Link copied to clipboard

ECDSA using BrainpoolP256r1 curve and SHA-256

Link copied to clipboard

ECDSA using BrainpoolP320r1 curve and SHA-384

Link copied to clipboard

ECDSA using BrainpoolP384r1 curve and SHA-384

Link copied to clipboard

ECDSA using BrainpoolP512r1 curve and SHA-512

Link copied to clipboard

EdDSA using Ed25519 curve

Link copied to clipboard

EdDSA using Ed448 curve

Link copied to clipboard

ECDH using P-256 curve without KDF

Link copied to clipboard

ECDH using P-384 curve without KDF

Link copied to clipboard

ECDH using P-521 curve without KDF

Link copied to clipboard

ECDH using BrainpoolP256r1 curve without KDF

Link copied to clipboard

ECDH using BrainpoolP320r1 curve without KDF

Link copied to clipboard

ECDH using BrainpoolP384r1 curve without KDF

Link copied to clipboard

ECDH using BrainpoolP512r1 curve without KDF

Link copied to clipboard

ECDH using X25519 curve without KDF

Link copied to clipboard

ECDH using X448 curve without KDF

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
val curve: EcCurve? = null
Link copied to clipboard
Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard
val fullySpecified: Boolean = false
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val isKeyAgreement: Boolean = false
Link copied to clipboard
val isSigning: Boolean = false
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun valueOf(value: String): Algorithm

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.