Common Data Structures

group group_crypto_data_structures

Enums

enum cy_en_crypto_ecc_key_type_t

cy_en_crypto_ecc_key_type_t: An ECC key type.

Values:

enumerator PK_PUBLIC
enumerator PK_PRIVATE
struct cy_stc_crypto_rsa_pub_key_t
#include <cy_crypto_common.h>

All fields for the context structure are internal.

Firmware never reads or writes these values. Firmware allocates the structure and provides the address of the structure to the driver in the function calls. Firmware must ensure that the defined instance of this structure remains in scope while the drive is in use.

The driver uses this structure to store and manipulate the RSA public key and additional coefficients to accelerate RSA calculation.

RSA key contained from two fields:

  • n - modulus part of the key

  • e - exponent part of the key.

Other fields are accelerating coefficients and can be calculated by Cy_Crypto_Rsa_CalcCoefs.

note

The modulus and exponent values in the cy_stc_crypto_rsa_pub_key_t must also be in little-endian order.
Use Cy_Crypto_InvertEndianness function to convert to or from little-endian order.

struct cy_stc_crypto_aes_buffers_t
#include <cy_crypto_common.h>

The structure for storing the AES state.

All fields for this structure are internal. Firmware never reads or writes these values. Firmware allocates the structure and provides the address of the structure to the driver in the function calls. Firmware must ensure that the defined instance of this structure remains in scope while the drive is in use.

struct cy_stc_crypto_aes_state_t
struct cy_stc_crypto_sha_state_t
#include <cy_crypto_common.h>

The structure for storing the SHA state.

All fields for the context structure are internal. Firmware never reads or writes these values. Firmware allocates the structure and provides the address of the structure to the driver in the function calls. Firmware must ensure that the defined instance of this structure remains in scope while the drive is in use.

struct cy_stc_crypto_ecc_point
#include <cy_crypto_common.h>

A point on a ECC curve.

Public Members

void *x

The x co-ordinate.

void *y

The y co-ordinate.

struct cy_stc_crypto_ecc_key
#include <cy_crypto_common.h>

An ECC key.

Public Members

cy_en_crypto_ecc_key_type_t type

Type of key, PK_PRIVATE or PK_PUBLIC.

cy_en_crypto_ecc_curve_id_t curveID

See cy_en_crypto_ecc_curve_id_t.

cy_stc_crypto_ecc_point pubkey

The public key.

void *k

The private key.