Skip to main content

Provider

Struct Provider 

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

CryptoAuthLib provider structure

Implementations§

Source§

impl Provider

Source

pub fn set_access_keys( &self, access_keys_file_name: Option<String>, ) -> Option<AtcaStatus>

Read access keys from a configuration file and setup the CALib to use them.

Source§

impl Provider

Source

pub fn generate_iv(&self) -> Result<Vec<u8>>

Generate random non-zero initialization vector

Source§

impl Provider

Source

pub fn sha256(&self, msg: &[u8]) -> Result<Result>

Calculate SHA2-256 digest for a given message using CALib. Ensure proper return value type.

Source§

impl Provider

Source

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

The default provider name for cryptoauthlib provider

Source

pub const PROVIDER_UUID: &'static str = "b8ba81e2-e9f7-4bdd-b096-a29d0019960c"

The UUID for this provider

Trait Implementations§

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 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_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_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_destroy_key( &self, application_identity: &ApplicationIdentity, op: Operation, ) -> Result<Result>

Execute a DestroyKey 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_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_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 psa_export_public_key( &self, application_identity: &ApplicationIdentity, op: Operation, ) -> Result<Result>

Execute an ExportPublicKey operation.
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_raw_key_agreement( &self, application_identity: &ApplicationIdentity, op: Operation, ) -> Result<Result>

Execute a RawKeyAgreement 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_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 can_do_crypto( &self, _application_identity: &ApplicationIdentity, _op: Operation, ) -> Result<Result>

Check if the crypto operation is supported by provider.
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§

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>,

Source§

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>,

Source§

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