SmartSnippets DA1459x SDK
Files | Data Structures | Typedefs | Enumerations | Functions
Crypto Engines adapter

Cryptographic algorithms (AES/HASH) adapter. More...

Files

file  ad_crypto.h
 AES/HASH device access API.
 

Data Structures

union  ad_crypto_engine_config_t
 Crypto configuration union. More...
 
struct  ad_crypto_config_t
 Crypto adapter configuration structure. More...
 

Typedefs

typedef void * ad_crypto_handle_t
 Crypto handle returned by ad_crypto_open()
 

Enumerations

enum  AD_CRYPTO_ALGO
 Supported cryptographic algorithms.
 

Functions

void ad_crypto_configure (ad_crypto_config_t *cfg)
 Configure the crypto engine. More...
 
void ad_crypto_configure_for_next_fragment (ad_crypto_config_t *cfg)
 Configure crypto engine to perform next fragment of operation. More...
 
ad_crypto_handle_t ad_crypto_open (ad_crypto_config_t *cfg, OS_TICK_TIME timeout)
 Open crypto engine. More...
 
void ad_crypto_close (void)
 Close crypto engine. More...
 
OS_BASE_TYPE ad_crypto_perform_operation (OS_TICK_TIME timeout)
 Perform crypto operation. More...
 

Detailed Description

Cryptographic algorithms (AES/HASH) adapter.

Function Documentation

◆ ad_crypto_close()

void ad_crypto_close ( void  )

Close crypto engine.

This function:

  • Clears the pending crypto interrupts.
  • Disables the crypto interrupts.
  • Disables the crypto clock.
  • Releases the resources reserved to perform operation.

◆ ad_crypto_configure()

void ad_crypto_configure ( ad_crypto_config_t cfg)

Configure the crypto engine.

A new crypto operation is configured by ad_crypto_open(). Use this function to re-configure the crypto engine.

Parameters
[in]cfgCrypto engine's configuration structure pointer.
Warning
Never call this function before having first called the ad_crypto_open().
See also
ad_crypto_config_t

◆ ad_crypto_configure_for_next_fragment()

void ad_crypto_configure_for_next_fragment ( ad_crypto_config_t cfg)

Configure crypto engine to perform next fragment of operation.

Configure the next essential parameters of the crypto engine in order to proceed to the next fragment of a crypto operation:

  • Input data mode (AES/HASH).
  • Input data address (AES/HASH).
  • Input data length (AES/HASH).
  • Output data address (AES).
Parameters
[in]cfgCrypto engine's configuration structure pointer.
See also
ad_crypto_config_t

◆ ad_crypto_open()

ad_crypto_handle_t ad_crypto_open ( ad_crypto_config_t cfg,
OS_TICK_TIME  timeout 
)

Open crypto engine.

This function:

  • Acquires the necessary resources to perform a crypto operation.
  • Configures the crypto engine.
Parameters
[in]cfgCrypto engine's configuration structure pointer.
[in]timeoutExpected time in OS ticks to acquire the resources and configure the engine.
Returns
Handle to be used in subsequent API calls. Valid: return > 0, Invalid: return = NULL.
See also
ad_crypto_config_t

◆ ad_crypto_perform_operation()

OS_BASE_TYPE ad_crypto_perform_operation ( OS_TICK_TIME  timeout)

Perform crypto operation.

Parameters
[in]timeoutMaximum expected time in OS ticks to perform operation.
Returns
OS_EVENT_SIGNALED, if the operation completed, other value if not.