#[repr(i32)]pub enum COSEAlgorithm {
ES256 = -7,
ES384 = -35,
ES512 = -36,
RS256 = -257,
RS384 = -258,
RS512 = -259,
PS256 = -37,
PS384 = -38,
PS512 = -39,
EDDSA = -8,
INSECURE_RS1 = -65_535,
PinUvProtocol = 4294901762,
}
Expand description
A COSE signature algorithm, indicating the type of key and hash type that should be used. You shouldn’t need to alter or use this value.
Variants§
ES256 = -7
Identifies this key as ECDSA (recommended SECP256R1) with SHA256 hashing
ES384 = -35
Identifies this key as ECDSA (recommended SECP384R1) with SHA384 hashing
ES512 = -36
Identifies this key as ECDSA (recommended SECP521R1) with SHA512 hashing
RS256 = -257
Identifies this key as RS256 aka RSASSA-PKCS1-v1_5 w/ SHA-256
RS384 = -258
Identifies this key as RS384 aka RSASSA-PKCS1-v1_5 w/ SHA-384
RS512 = -259
Identifies this key as RS512 aka RSASSA-PKCS1-v1_5 w/ SHA-512
PS256 = -37
Identifies this key as PS256 aka RSASSA-PSS w/ SHA-256
PS384 = -38
Identifies this key as PS384 aka RSASSA-PSS w/ SHA-384
PS512 = -39
Identifies this key as PS512 aka RSASSA-PSS w/ SHA-512
EDDSA = -8
Identifies this key as EdDSA (likely curve ed25519)
INSECURE_RS1 = -65_535
Identifies this as an INSECURE RS1 aka RSASSA-PKCS1-v1_5 using SHA-1. This is not used by validators, but can exist in some windows hello tpm’s
PinUvProtocol = 4294901762
Identifies this key as the protocol used for PIN/UV Auth Protocol One
This reports as algorithm -25
, but it is a lie. Don’t include this in any algorithm lists.
Implementations§
Source§impl COSEAlgorithm
impl COSEAlgorithm
Sourcepub fn secure_algs() -> Vec<COSEAlgorithm>
pub fn secure_algs() -> Vec<COSEAlgorithm>
Return the set of secure recommended COSEAlgorithm’s
Sourcepub fn all_possible_algs() -> Vec<COSEAlgorithm>
pub fn all_possible_algs() -> Vec<COSEAlgorithm>
Return the set of all possible algorithms that may exist as a COSEAlgorithm
Trait Implementations§
Source§impl Clone for COSEAlgorithm
impl Clone for COSEAlgorithm
Source§fn clone(&self) -> COSEAlgorithm
fn clone(&self) -> COSEAlgorithm
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read more