#[non_exhaustive]
pub enum Algorithm {
Show 65 variants RS1, WalnutDSA, RS512, RS384, RS256, ES256K, HSS_LMS, SHAKE256, SHA_512, SHA_384, RSAES_OAEP_SHA_512, RSAES_OAEP_SHA_256, RSAES_OAEP_RFC_8017_default, PS512, PS384, PS256, ES512, ES384, ECDH_SS_A256KW, ECDH_SS_A192KW, ECDH_SS_A128KW, ECDH_ES_A256KW, ECDH_ES_A192KW, ECDH_ES_A128KW, ECDH_SS_HKDF_512, ECDH_SS_HKDF_256, ECDH_ES_HKDF_512, ECDH_ES_HKDF_256, SHAKE128, SHA_512_256, SHA_256, SHA_256_64, SHA_1, Direct_HKDF_AES_256, Direct_HKDF_AES_128, Direct_HKDF_SHA_512, Direct_HKDF_SHA_256, EdDSA, ES256, Direct, A256KW, A192KW, A128KW, Reserved, A128GCM, A192GCM, A256GCM, HMAC_256_64, HMAC_256_256, HMAC_384_384, HMAC_512_512, AES_CCM_16_64_128, AES_CCM_16_64_256, AES_CCM_64_64_128, AES_CCM_64_64_256, AES_MAC_128_64, AES_MAC_256_64, ChaCha20Poly1305, AES_MAC_128_128, AES_MAC_256_128, AES_CCM_16_128_128, AES_CCM_16_128_256, AES_CCM_64_128_128, AES_CCM_64_128_256, IV_GENERATION,
}
Expand description

IANA-registered COSE algorithms.

From IANA registry https://www.iana.org/assignments/cose/cose.xhtml#algorithms as of 2021-03-19.

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.

RS1

RSASSA-PKCS1-v1_5 using SHA-1

WalnutDSA

WalnutDSA signature

RS512

RSASSA-PKCS1-v1_5 using SHA-512

RS384

RSASSA-PKCS1-v1_5 using SHA-384

RS256

RSASSA-PKCS1-v1_5 using SHA-256

ES256K

ECDSA using secp256k1 curve and SHA-256

HSS_LMS

HSS/LMS hash-based digital signature

SHAKE256

SHAKE-256 512-bit Hash Value

SHA_512

SHA-2 512-bit Hash

SHA_384

SHA-2 384-bit Hash

RSAES_OAEP_SHA_512

RSAES-OAEP w/ SHA-512

RSAES_OAEP_SHA_256

RSAES-OAEP w/ SHA-256

RSAES_OAEP_RFC_8017_default

RSAES-OAEP w/ SHA-1

PS512

RSASSA-PSS w/ SHA-512

PS384

RSASSA-PSS_SHA-384

PS256

RSASSA-PSS w/ SHA-256

ES512

ECDSA w/ SHA-512

ES384

ECDSA w/ SHA-384

ECDH_SS_A256KW

ECDH SS w/ Concat KDF and AES Key Wrap w/ 256-bit key

ECDH_SS_A192KW

ECDH SS w/ Concat KDF and AES Key Wrap w/ 192-bit key

ECDH_SS_A128KW

ECDH SS w/ Concat KDF and AES Key Wrap w/ 128-bit key

ECDH_ES_A256KW

ECDH ES w/ Concat KDF and AES Key Wrap w/ 256-bit key

ECDH_ES_A192KW

ECDH ES w/ Concat KDF and AES Key Wrap w/ 192-bit key

ECDH_ES_A128KW

ECDH ES w/ Concat KDF and AES Key Wrap w/ 128-bit key

ECDH_SS_HKDF_512

ECDH SS w/ HKDF - generate key directly

ECDH_SS_HKDF_256

ECDH SS w/ HKDF - generate key directly

ECDH_ES_HKDF_512

ECDH ES w/ HKDF - generate key directly

ECDH_ES_HKDF_256

ECDH ES w/ HKDF - generate key directly

SHAKE128

SHAKE-128 256-bit Hash Value

SHA_512_256

SHA-2 512-bit Hash truncated to 256-bits

SHA_256

SHA-2 256-bit Hash

SHA_256_64

SHA-2 256-bit Hash truncated to 64-bits

SHA_1

SHA-1 Hash

Direct_HKDF_AES_256

Shared secret w/ AES-MAC 256-bit key

Direct_HKDF_AES_128

Shared secret w/ AES-MAC 128-bit key

Direct_HKDF_SHA_512

Shared secret w/ HKDF and SHA-512

Direct_HKDF_SHA_256

Shared secret w/ HKDF and SHA-256

EdDSA

EdDSA

ES256

ECDSA w/ SHA-256

Direct

Direct use of CEK

A256KW

AES Key Wrap w/ 256-bit key

A192KW

AES Key Wrap w/ 192-bit key

A128KW

AES Key Wrap w/ 128-bit key

Reserved

Reserved

A128GCM

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

A192GCM

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

A256GCM

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

HMAC_256_64

HMAC w/ SHA-256 truncated to 64 bits

HMAC_256_256

HMAC w/ SHA-256

HMAC_384_384

HMAC w/ SHA-384

HMAC_512_512

HMAC w/ SHA-512

AES_CCM_16_64_128

AES-CCM mode 128-bit key, 64-bit tag, 13-byte nonce

AES_CCM_16_64_256

AES-CCM mode 256-bit key, 64-bit tag, 13-byte nonce

AES_CCM_64_64_128

AES-CCM mode 128-bit key, 64-bit tag, 7-byte nonce

AES_CCM_64_64_256

AES-CCM mode 256-bit key, 64-bit tag, 7-byte nonce

AES_MAC_128_64

AES-MAC 128-bit key, 64-bit tag

AES_MAC_256_64

AES-MAC 256-bit key, 64-bit tag

ChaCha20Poly1305

ChaCha20/Poly1305 w/ 256-bit key, 128-bit tag

AES_MAC_128_128

AES-MAC 128-bit key, 128-bit tag

AES_MAC_256_128

AES-MAC 256-bit key, 128-bit tag

AES_CCM_16_128_128

AES-CCM mode 128-bit key, 128-bit tag, 13-byte nonce

AES_CCM_16_128_256

AES-CCM mode 256-bit key, 128-bit tag, 13-byte nonce

AES_CCM_64_128_128

AES-CCM mode 128-bit key, 128-bit tag, 7-byte nonce

AES_CCM_64_128_256

AES-CCM mode 256-bit key, 128-bit tag, 7-byte nonce

IV_GENERATION

For doing IV generation for symmetric algorithms.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.