Struct cryptoki::mechanism::MechanismType
source · pub struct MechanismType { /* private fields */ }
Expand description
Type of a mechanism
Implementations§
source§impl MechanismType
impl MechanismType
sourcepub const AES_KEY_GEN: MechanismType = _
pub const AES_KEY_GEN: MechanismType = _
AES key generation mechanism
sourcepub const AES_CBC: MechanismType = _
pub const AES_CBC: MechanismType = _
AES-CBC mechanism
For encryption, the message length must be a multiple of the block size. For wrapping, the mechanism encrypts the value of the key, padded on the trailing end with up to block size minus one null bytes. For unwrapping, the result is truncated according to the key type and the length provided by the template.
sourcepub const AES_CBC_PAD: MechanismType = _
pub const AES_CBC_PAD: MechanismType = _
AES-CBC with PKCS#7 padding mechanism
The plaintext may be any size. The PKCS#7 padding allows the length of the plaintext to be recovered from the ciphertext. Therefore no length should be provided when unwrapping keys with this mechanism.
sourcepub const AES_ECB: MechanismType = _
pub const AES_ECB: MechanismType = _
AES-ECB mechanism
sourcepub const AES_KEY_WRAP: MechanismType = _
pub const AES_KEY_WRAP: MechanismType = _
AES key wrap mechanism. This mechanism can only wrap a key or encrypt a block of data whose length is a multiple of the AES Key Wrap algorithm block size.
sourcepub const AES_KEY_WRAP_PAD: MechanismType = _
pub const AES_KEY_WRAP_PAD: MechanismType = _
AES key wrap mechanism. This mechanism can wrap a key or encrypt a block of data of any length. It does the padding detailed in PKCS#7 of inputs.
sourcepub const AES_GCM: MechanismType = _
pub const AES_GCM: MechanismType = _
AES-GCM mechanism
sourcepub const RSA_PKCS_KEY_PAIR_GEN: MechanismType = _
pub const RSA_PKCS_KEY_PAIR_GEN: MechanismType = _
PKCS #1 RSA key pair generation mechanism
sourcepub const RSA_PKCS: MechanismType = _
pub const RSA_PKCS: MechanismType = _
Multi-purpose mechanism based on the RSA public-key cryptosystem and the block formats initially defined in PKCS #1 v1.5
sourcepub const RSA_PKCS_PSS: MechanismType = _
pub const RSA_PKCS_PSS: MechanismType = _
Mechanism based on the RSA public-key cryptosystem and the PSS block format defined in PKCS #1
sourcepub const RSA_PKCS_OAEP: MechanismType = _
pub const RSA_PKCS_OAEP: MechanismType = _
Multi-purpose mechanism based on the RSA public-key cryptosystem and the OAEP block format defined in PKCS #1
sourcepub const RSA_X_509: MechanismType = _
pub const RSA_X_509: MechanismType = _
Multi-purpose mechanism based on the RSA public-key cryptosystem. This is so-called “raw” RSA, as assumed in X.509.
sourcepub const DES_KEY_GEN: MechanismType = _
pub const DES_KEY_GEN: MechanismType = _
DES Note that DES is deprecated. See https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-131Ar2.pdf section 2, p. 6.
sourcepub const DES2_KEY_GEN: MechanismType = _
pub const DES2_KEY_GEN: MechanismType = _
DES2 Note that DES2 is deprecated. See https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-131Ar2.pdf section 2, p. 6.
sourcepub const DES3_KEY_GEN: MechanismType = _
pub const DES3_KEY_GEN: MechanismType = _
DES3 Note that DES3 is deprecated. See https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-131Ar2.pdf section 2, p. 6.
sourcepub const DES_CBC: MechanismType = _
pub const DES_CBC: MechanismType = _
DES-CBC mechanism.
For encryption, the message length must be a multiple of the block size. For wrapping, the mechanism encrypts the value of the key, padded on the trailing end with up to block size minus one null bytes. For unwrapping, the result is truncated according to the key type and the length provided by the template.
sourcepub const DES3_CBC: MechanismType = _
pub const DES3_CBC: MechanismType = _
DES3-CBC mechanism.
For encryption, the message length must be a multiple of the block size. For wrapping, the mechanism encrypts the value of the key, padded on the trailing end with up to block size minus one null bytes. For unwrapping, the result is truncated according to the key type and the length provided by the template.
sourcepub const DES_CBC_PAD: MechanismType = _
pub const DES_CBC_PAD: MechanismType = _
DES-CBC with PKCS#7 padding mechanism
The plaintext may be any size. The PKCS#7 padding allows the length of the plaintext to be recovered from the ciphertext. Therefore no length should be provided when unwrapping keys with this mechanism.
sourcepub const DES3_CBC_PAD: MechanismType = _
pub const DES3_CBC_PAD: MechanismType = _
DES3-CBC with PKCS#7 padding mechanism
The plaintext may be any size. The PKCS#7 padding allows the length of the plaintext to be recovered from the ciphertext. Therefore no length should be provided when unwrapping keys with this mechanism.
sourcepub const DES_ECB: MechanismType = _
pub const DES_ECB: MechanismType = _
DES ECB Note that DES is deprecated. See https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-131Ar2.pdf section 2, p. 6.
sourcepub const DES3_ECB: MechanismType = _
pub const DES3_ECB: MechanismType = _
DES3 ECB Note that DES3 is deprecated. See https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-131Ar2.pdf section 2, p. 6.
sourcepub const ECC_KEY_PAIR_GEN: MechanismType = _
pub const ECC_KEY_PAIR_GEN: MechanismType = _
EC key pair generation mechanism
sourcepub const ECC_EDWARDS_KEY_PAIR_GEN: MechanismType = _
pub const ECC_EDWARDS_KEY_PAIR_GEN: MechanismType = _
EC edwards key pair generation mechanism
sourcepub const ECC_MONTGOMERY_KEY_PAIR_GEN: MechanismType = _
pub const ECC_MONTGOMERY_KEY_PAIR_GEN: MechanismType = _
EC montgomery key pair generation mechanism
sourcepub const EDDSA: MechanismType = _
pub const EDDSA: MechanismType = _
EDDSA mechanism
Note: EdDSA is not part of the PKCS#11 v2.40 standard and as such may not be understood by the backend. It is included here because some vendor implementations support it through the v2.40 interface.
sourcepub const ECDH1_DERIVE: MechanismType = _
pub const ECDH1_DERIVE: MechanismType = _
ECDH key derivation mechanism
sourcepub const ECDSA: MechanismType = _
pub const ECDSA: MechanismType = _
ECDSA mechanism
sourcepub const ECDSA_SHA1: MechanismType = _
pub const ECDSA_SHA1: MechanismType = _
ECDSA with SHA-1 mechanism
sourcepub const ECDSA_SHA224: MechanismType = _
pub const ECDSA_SHA224: MechanismType = _
ECDSA with SHA-224 mechanism
sourcepub const ECDSA_SHA256: MechanismType = _
pub const ECDSA_SHA256: MechanismType = _
ECDSA with SHA-256 mechanism
sourcepub const ECDSA_SHA384: MechanismType = _
pub const ECDSA_SHA384: MechanismType = _
ECDSA with SHA-384 mechanism
sourcepub const ECDSA_SHA512: MechanismType = _
pub const ECDSA_SHA512: MechanismType = _
ECDSA with SHA-512 mechanism
sourcepub const SHA1: MechanismType = _
pub const SHA1: MechanismType = _
SHA-1 mechanism
sourcepub const SHA224: MechanismType = _
pub const SHA224: MechanismType = _
SHA-224 mechanism
sourcepub const SHA256: MechanismType = _
pub const SHA256: MechanismType = _
SHA-256 mechanism
sourcepub const SHA384: MechanismType = _
pub const SHA384: MechanismType = _
SHA-384 mechanism
sourcepub const SHA512: MechanismType = _
pub const SHA512: MechanismType = _
SHA-512 mechanism
sourcepub const SHA1_RSA_PKCS: MechanismType = _
pub const SHA1_RSA_PKCS: MechanismType = _
SHA1-RSA-PKCS mechanism
sourcepub const SHA224_RSA_PKCS: MechanismType = _
pub const SHA224_RSA_PKCS: MechanismType = _
SHA224-RSA-PKCS mechanism
sourcepub const SHA256_RSA_PKCS: MechanismType = _
pub const SHA256_RSA_PKCS: MechanismType = _
SHA256-RSA-PKCS mechanism
sourcepub const SHA384_RSA_PKCS: MechanismType = _
pub const SHA384_RSA_PKCS: MechanismType = _
SHA384-RSA-PKCS mechanism
sourcepub const SHA512_RSA_PKCS: MechanismType = _
pub const SHA512_RSA_PKCS: MechanismType = _
SHA512-RSA-PKCS mechanism
sourcepub const SHA1_RSA_PKCS_PSS: MechanismType = _
pub const SHA1_RSA_PKCS_PSS: MechanismType = _
SHA1-RSA-PKCS-PSS mechanism
sourcepub const SHA256_RSA_PKCS_PSS: MechanismType = _
pub const SHA256_RSA_PKCS_PSS: MechanismType = _
SHA256-RSA-PKCS-PSS mechanism
sourcepub const SHA384_RSA_PKCS_PSS: MechanismType = _
pub const SHA384_RSA_PKCS_PSS: MechanismType = _
SHA384-RSA-PKCS-PSS mechanism
sourcepub const SHA512_RSA_PKCS_PSS: MechanismType = _
pub const SHA512_RSA_PKCS_PSS: MechanismType = _
SHA512-RSA-PKCS-PSS mechanism
Trait Implementations§
source§impl Clone for MechanismType
impl Clone for MechanismType
source§fn clone(&self) -> MechanismType
fn clone(&self) -> MechanismType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for MechanismType
impl Debug for MechanismType
source§impl Deref for MechanismType
impl Deref for MechanismType
source§impl Display for MechanismType
impl Display for MechanismType
source§impl From<MechanismType> for CK_MECHANISM_TYPE
impl From<MechanismType> for CK_MECHANISM_TYPE
source§fn from(mechanism_type: MechanismType) -> Self
fn from(mechanism_type: MechanismType) -> Self
source§impl PartialEq for MechanismType
impl PartialEq for MechanismType
source§fn eq(&self, other: &MechanismType) -> bool
fn eq(&self, other: &MechanismType) -> bool
self
and other
values to be equal, and is used
by ==
.