pub struct Provider { /* private fields */ }
Expand description

Provider for Public Key Cryptography Standard #11

Operations for this provider are serviced through a PKCS11 interface, allowing any libraries exposing said interface to be loaded and used at runtime.

Implementations§

source§

impl Provider

source

pub const DEFAULT_PROVIDER_NAME: &'static str = "pkcs11-provider"

The default provider name for pkcs11 provider

source

pub const PROVIDER_UUID: &'static str = "30e39502-eba6-4d60-a4af-c518b7f5e38f"

The UUID for this provider

Trait Implementations§

source§

impl CanDoCrypto for Provider

source§

fn can_do_crypto_internal( &self, _application_identity: &ApplicationIdentity, op: Operation ) -> Result<Result>

Provider specific heck if the crypto operation is supported by provider. This method should be re-implemented by providers.
source§

fn use_check_internal(&self, attributes: Attributes) -> Result<Result>

Provider specific Use check. This method should be re-implemented by providers.
source§

fn generate_check_internal(&self, attributes: Attributes) -> Result<Result>

Provider specific Generate check. This method should be re-implemented by providers.
source§

fn import_check_internal(&self, attributes: Attributes) -> Result<Result>

Provider specific Import check. This method should be re-implemented by providers.
source§

fn can_do_crypto_main( &self, application_identity: &ApplicationIdentity, op: Operation ) -> Result<Result>

Check if the crypto operation is supported by provider. This method is called by Provide trait and doesn’t need to be changed.
source§

fn use_check(&self, attributes: Attributes) -> Result<Result>

Common checks if an existing key of the key type that defined in the attributes and the same length can be used to perform the algorithm in policy.key_algorithm
source§

fn generate_check(&self, attributes: Attributes) -> Result<Result>

Common checks if a key with the attributes can be generated
source§

fn import_check(&self, attributes: Attributes) -> Result<Result>

Common checks if a key with the attributes can be imported.
source§

fn derive_check(&self, _attributes: Attributes) -> Result<Result>

Checks if a key with the attributes can be derived.
source§

impl Debug for Provider

source§

fn fmt(&self, __f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Provide for Provider

source§

fn can_do_crypto( &self, application_identity: &ApplicationIdentity, op: Operation ) -> Result<Result>

Check if the crypto operation is supported by PKCS11 provider by using CanDoCrypto trait.

source§

fn describe(&self) -> Result<(ProviderInfo, HashSet<Opcode>)>

Return a description of the current provider. Read more
source§

fn list_keys( &self, application_identity: &ApplicationIdentity, _op: Operation ) -> Result<Result>

Lists all keys belonging to the application.
source§

fn list_clients(&self, _op: Operation) -> Result<Result>

Lists all clients currently having data in the service.
source§

fn psa_generate_random(&self, op: Operation) -> Result<Result>

Execute a GenerateRandom operation.
source§

fn psa_generate_key( &self, application_identity: &ApplicationIdentity, op: Operation ) -> Result<Result>

Execute a GenerateKey operation. Read more
source§

fn psa_import_key( &self, application_identity: &ApplicationIdentity, op: Operation ) -> Result<Result>

Execute an ImportKey operation. Read more
source§

fn psa_export_public_key( &self, application_identity: &ApplicationIdentity, op: Operation ) -> Result<Result>

Execute an ExportPublicKey operation.
source§

fn psa_destroy_key( &self, application_identity: &ApplicationIdentity, op: Operation ) -> Result<Result>

Execute a DestroyKey operation. Read more
source§

fn psa_sign_hash( &self, application_identity: &ApplicationIdentity, op: Operation ) -> Result<Result>

Execute a SignHash operation. This operation only signs the short digest given but does not hash it.
source§

fn psa_verify_hash( &self, application_identity: &ApplicationIdentity, op: Operation ) -> Result<Result>

Execute a VerifyHash operation.
source§

fn psa_asymmetric_encrypt( &self, application_identity: &ApplicationIdentity, op: Operation ) -> Result<Result>

Execute an AsymmetricEncrypt operation.
source§

fn psa_asymmetric_decrypt( &self, application_identity: &ApplicationIdentity, op: Operation ) -> Result<Result>

Execute an AsymmetricDecrypt operation.
source§

fn list_providers(&self, _op: Operation) -> Result<Result>

List the providers running in the service.
source§

fn list_opcodes(&self, _op: Operation) -> Result<Result>

List the opcodes supported by the given provider.
source§

fn list_authenticators(&self, _op: Operation) -> Result<Result>

List the authenticators supported by the given provider.
source§

fn delete_client( &self, _application_identity: &ApplicationIdentity, _op: Operation ) -> Result<Result>

Delete all data a client has in the service..
source§

fn ping(&self, _op: Operation) -> Result<Result>

Execute a Ping operation to get the wire protocol version major and minor information. Read more
source§

fn psa_export_key( &self, _application_identity: &ApplicationIdentity, _op: Operation ) -> Result<Result>

Execute an ExportKey operation.
source§

fn psa_aead_encrypt( &self, _application_identity: &ApplicationIdentity, _op: Operation ) -> Result<Result>

Execute an AeadEncrypt operation.
source§

fn psa_aead_decrypt( &self, _application_identity: &ApplicationIdentity, _op: Operation ) -> Result<Result>

Execute an AeadDecrypt operation.
source§

fn psa_hash_compute(&self, _op: Operation) -> Result<Result>

Execute a HashCompute operation.
source§

fn psa_hash_compare(&self, _op: Operation) -> Result<Result>

Execute a HashCompare operation.
source§

fn psa_raw_key_agreement( &self, _application_identity: &ApplicationIdentity, _op: Operation ) -> Result<Result>

Execute a RawKeyAgreement operation.
source§

fn psa_cipher_encrypt( &self, _application_identity: &ApplicationIdentity, _op: Operation ) -> Result<Result>

Encrypt a short message with a symmetric cipher.
source§

fn psa_cipher_decrypt( &self, _application_identity: &ApplicationIdentity, _op: Operation ) -> Result<Result>

Decrypt a short message with a symmetric cipher.
source§

fn psa_sign_message( &self, _application_identity: &ApplicationIdentity, _op: Operation ) -> Result<Result>

Sign a message with a private key.
source§

fn psa_verify_message( &self, _application_identity: &ApplicationIdentity, _op: Operation ) -> Result<Result>

Verify the signature of a message using a public key.
source§

fn prepare_key_attestation( &self, _application_identity: &ApplicationIdentity, _op: Operation ) -> Result<Result>

Prepare a key attestation operation.
source§

fn attest_key( &self, _application_identity: &ApplicationIdentity, _op: Operation ) -> Result<Result>

Attest a key.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> Free for T

source§

default unsafe fn free(ptr_ref: NonNull<T>)

Drops the content pointed by this pointer and frees it. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V