Zephyr API Documentation  3.5.0
A Scalable Open Source RTOS
3.5.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages

Crypto APIs. More...

Modules

 Cipher
 Crypto Cipher APIs.
 
 Hash
 Crypto Hash APIs.
 
 Random Function APIs
 Random Function APIs.
 

Data Structures

struct  crypto_driver_api
 Crypto driver API definition. More...
 

Macros

#define CAP_OPAQUE_KEY_HNDL   BIT(0)
 
#define CAP_RAW_KEY   BIT(1)
 
#define CAP_KEY_LOADING_API   BIT(2)
 
#define CAP_INPLACE_OPS   BIT(3)
 Whether the output is placed in separate buffer or not.
 
#define CAP_SEPARATE_IO_BUFS   BIT(4)
 
#define CAP_SYNC_OPS   BIT(5)
 These denotes if the output (completion of a cipher_xxx_op) is conveyed by the op function returning, or it is conveyed by an async notification.
 
#define CAP_ASYNC_OPS   BIT(6)
 
#define CAP_AUTONONCE   BIT(7)
 Whether the hardware/driver supports autononce feature.
 
#define CAP_NO_IV_PREFIX   BIT(8)
 Don't prefix IV to cipher blocks.
 

Functions

static int crypto_query_hwcaps (const struct device *dev)
 Query the crypto hardware capabilities.
 

Detailed Description

Crypto APIs.

Macro Definition Documentation

◆ CAP_ASYNC_OPS

#define CAP_ASYNC_OPS   BIT(6)

◆ CAP_AUTONONCE

#define CAP_AUTONONCE   BIT(7)

#include <zephyr/crypto/crypto.h>

Whether the hardware/driver supports autononce feature.

◆ CAP_INPLACE_OPS

#define CAP_INPLACE_OPS   BIT(3)

#include <zephyr/crypto/crypto.h>

Whether the output is placed in separate buffer or not.

◆ CAP_KEY_LOADING_API

#define CAP_KEY_LOADING_API   BIT(2)

◆ CAP_NO_IV_PREFIX

#define CAP_NO_IV_PREFIX   BIT(8)

#include <zephyr/crypto/crypto.h>

Don't prefix IV to cipher blocks.

◆ CAP_OPAQUE_KEY_HNDL

#define CAP_OPAQUE_KEY_HNDL   BIT(0)

◆ CAP_RAW_KEY

#define CAP_RAW_KEY   BIT(1)

◆ CAP_SEPARATE_IO_BUFS

#define CAP_SEPARATE_IO_BUFS   BIT(4)

◆ CAP_SYNC_OPS

#define CAP_SYNC_OPS   BIT(5)

#include <zephyr/crypto/crypto.h>

These denotes if the output (completion of a cipher_xxx_op) is conveyed by the op function returning, or it is conveyed by an async notification.

Function Documentation

◆ crypto_query_hwcaps()

static int crypto_query_hwcaps ( const struct device dev)
inlinestatic

#include <zephyr/crypto/crypto.h>

Query the crypto hardware capabilities.

This API is used by the app to query the capabilities supported by the crypto device. Based on this the app can specify a subset of the supported options to be honored for a session during cipher_begin_session().

Parameters
devPointer to the device structure for the driver instance.
Returns
bitmask of supported options.