PSOC E8XXGP Device Support Library

| PSOC E8XXGP Device Support Library

Enumerations
Common Enumerated Types
PDL API Reference » Crypto (Cryptography)

## General Description

## Enumerations
enum | cy_en_crypto_aes_key_length_t { CY_CRYPTO_KEY_AES_128 = 0x00u , CY_CRYPTO_KEY_AES_192 = 0x01u , CY_CRYPTO_KEY_AES_256 = 0x02u }
| The key length options for the AES method. More...
enum | cy_en_crypto_dir_mode_t { CY_CRYPTO_ENCRYPT = 0x00u , CY_CRYPTO_DECRYPT = 0x01u }
| Defines the direction of the Crypto methods. More...
enum | cy_en_crypto_sha_mode_t { CY_CRYPTO_MODE_SHA1 = 0x00u , CY_CRYPTO_MODE_SHA224 = 0x01u , CY_CRYPTO_MODE_SHA256 = 0x02u , CY_CRYPTO_MODE_SHA384 = 0x03u , CY_CRYPTO_MODE_SHA512 = 0x04u , CY_CRYPTO_MODE_SHA512_256 = 0x05u , CY_CRYPTO_MODE_SHA512_224 = 0x06u , CY_CRYPTO_MODE_SHA_NONE = 0x07u , CY_CRYPTO_MODE_SHA3_224 = 0x07u , CY_CRYPTO_MODE_SHA3_256 = 0x08u , CY_CRYPTO_MODE_SHA3_384 = 0x09u , CY_CRYPTO_MODE_SHA3_512 = 0x0Au }
| Defines modes of SHA method. More...
enum | cy_en_crypto_rsa_ver_result_t { CY_CRYPTO_RSA_VERIFY_SUCCESS = 0x00u , CY_CRYPTO_RSA_VERIFY_FAIL = 0x01u }
| Signature verification status. More...
enum | cy_en_crypto_status_t { CY_CRYPTO_SUCCESS = 0x00u , CY_CRYPTO_HW_ERROR = CY_CRYPTO_ID | CY_PDL_STATUS_ERROR | 0x01u , CY_CRYPTO_SIZE_NOT_X16 = CY_CRYPTO_ID | CY_PDL_STATUS_ERROR | 0x02u , CY_CRYPTO_DES_WEAK_KEY = CY_CRYPTO_ID | CY_PDL_STATUS_WARNING | 0x03u , CY_CRYPTO_COMM_FAIL = CY_CRYPTO_ID | CY_PDL_STATUS_ERROR | 0x04u , CY_CRYPTO_SERVER_NOT_STARTED = CY_CRYPTO_ID | CY_PDL_STATUS_ERROR | 0x06u , CY_CRYPTO_SERVER_BUSY = CY_CRYPTO_ID | CY_PDL_STATUS_INFO | 0x07u , CY_CRYPTO_NOT_INITIALIZED = CY_CRYPTO_ID | CY_PDL_STATUS_ERROR | 0x08u , CY_CRYPTO_HW_NOT_ENABLED = CY_CRYPTO_ID | CY_PDL_STATUS_ERROR | 0x09u , CY_CRYPTO_NOT_SUPPORTED = CY_CRYPTO_ID | CY_PDL_STATUS_ERROR | 0x0Au , CY_CRYPTO_BAD_PARAMS = CY_CRYPTO_ID | CY_PDL_STATUS_ERROR | 0x0Bu , CY_CRYPTO_TRNG_UNHEALTHY = CY_CRYPTO_ID | CY_PDL_STATUS_WARNING | 0x0Cu , CY_CRYPTO_MEMORY_ALLOC_FAIL = CY_CRYPTO_ID | CY_PDL_STATUS_ERROR | 0x0Du }
| Errors of the Crypto block. More...
enum | cy_en_eddsa_sig_type_t { CY_CRYPTO_EDDSA_PURE = 0 , CY_CRYPTO_EDDSA_CTX , CY_CRYPTO_EDDSA_PREHASH , CY_CRYPTO_EDDSA_NONE }
| EDDSA signature operation type. More...
enum | cy_en_crypto_trng_bs_sel_t { CY_CRYPTO_TRMON_BS_DAS = 0 , CY_CRYPTO_TRMON_BS_RED , CY_CRYPTO_TRMON_BS_TR , CY_CRYPTO_TRMON_BS_UNDEF }
| Selection of the bitstream. More...

## Enumeration Type Documentation

## ◆ cy_en_crypto_aes_key_length_t

enum cy_en_crypto_aes_key_length_t

The key length options for the AES method.

Enumerator
CY_CRYPTO_KEY_AES_128 | The AES key size is 128 bits.
CY_CRYPTO_KEY_AES_192 | The AES key size is 192 bits.
CY_CRYPTO_KEY_AES_256 | The AES key size is 256 bits.

## ◆ cy_en_crypto_dir_mode_t

enum cy_en_crypto_dir_mode_t

Defines the direction of the Crypto methods.

Enumerator
CY_CRYPTO_ENCRYPT | The forward mode, plain text will be encrypted into cipher text.
CY_CRYPTO_DECRYPT | The reverse mode, cipher text will be decrypted into plain text.

## ◆ cy_en_crypto_sha_mode_t

enum cy_en_crypto_sha_mode_t

Defines modes of SHA method.

Enumerator
CY_CRYPTO_MODE_SHA1 | Sets the SHA1 mode.
CY_CRYPTO_MODE_SHA224 | Sets the SHA224 mode.
CY_CRYPTO_MODE_SHA256 | Sets the SHA256 mode.
CY_CRYPTO_MODE_SHA384 | Sets the SHA384 mode.
CY_CRYPTO_MODE_SHA512 | Sets the SHA512 mode.
CY_CRYPTO_MODE_SHA512_256 | Sets the SHA512/256 mode.
CY_CRYPTO_MODE_SHA512_224 | Sets the SHA512/224 mode.
CY_CRYPTO_MODE_SHA_NONE | Sets the SHA None mode.
CY_CRYPTO_MODE_SHA3_224 | Sets the SHA3-224 mode.
CY_CRYPTO_MODE_SHA3_256 | Sets the SHA3-256 mode.
CY_CRYPTO_MODE_SHA3_384 | Sets the SHA3-384 mode.
CY_CRYPTO_MODE_SHA3_512 | Sets the SHA3-512 mode.

## ◆ cy_en_crypto_rsa_ver_result_t

enum cy_en_crypto_rsa_ver_result_t

Signature verification status.

Enumerator
CY_CRYPTO_RSA_VERIFY_SUCCESS | PKCS1-v1.5 verify SUCCESS.
CY_CRYPTO_RSA_VERIFY_FAIL | PKCS1-v1.5 verify FAILED.

## ◆ cy_en_crypto_status_t

enum cy_en_crypto_status_t

Errors of the Crypto block.

Enumerator
CY_CRYPTO_SUCCESS | Operation completed successfully.
CY_CRYPTO_HW_ERROR | A hardware error occurred, detailed information is in stc_crypto_hw_error_t.
CY_CRYPTO_SIZE_NOT_X16 | The size of input data is not multiple of 16.
CY_CRYPTO_DES_WEAK_KEY | The key for the DES method is weak.
CY_CRYPTO_COMM_FAIL | Communication between the client and server via IPC is broken.
CY_CRYPTO_SERVER_NOT_STARTED | The Crypto server is not started.
CY_CRYPTO_SERVER_BUSY | The Crypto server in process state.
CY_CRYPTO_NOT_INITIALIZED | The Crypto driver is not initialized.
CY_CRYPTO_HW_NOT_ENABLED | The Crypto hardware is not enabled.
CY_CRYPTO_NOT_SUPPORTED | The Crypto operation is not supported.
CY_CRYPTO_BAD_PARAMS | The Crypto operation parameters are incorrect.
CY_CRYPTO_TRNG_UNHEALTHY | TRNG generated is not a healthy random number.
CY_CRYPTO_MEMORY_ALLOC_FAIL | Memory allocation for Crypto operation failed.

## ◆ cy_en_eddsa_sig_type_t

enum cy_en_eddsa_sig_type_t

EDDSA signature operation type.

It identifies the signature operation type (pure, ctx or prehash).

Enumerator
CY_CRYPTO_EDDSA_PURE | Pure - uses the entire message, without hashing it previously.
CY_CRYPTO_EDDSA_CTX | Deterministic context - uses the entire message, without hashing it previously.
CY_CRYPTO_EDDSA_PREHASH | Pre-hashed message - uses the already hashed message.
CY_CRYPTO_EDDSA_NONE | None - not a valid choice.

## ◆ cy_en_crypto_trng_bs_sel_t

enum cy_en_crypto_trng_bs_sel_t

Selection of the bitstream.

Enumerator
CY_CRYPTO_TRMON_BS_DAS | "0": DAS bitstream.
CY_CRYPTO_TRMON_BS_RED | "1": RED bitstream.
CY_CRYPTO_TRMON_BS_TR | "2": TR bitstream.
CY_CRYPTO_TRMON_BS_UNDEF | "3": Undefined.