![]() |
MAX32665 SDK Documentation
0.2
Software Development Kit Overview and API Documentation
|
Macros | |
| #define | DES_DATA_LEN 8 |
| #define | AES_DATA_LEN 16 |
| #define | MAX_KEY_SIZE 32 |
| #define | MXC_AES_DATA_LEN (128 / 8) |
| Number of bytes in an AES plaintext or ciphertext block, which are always 128-bits long. More... | |
| #define | MXC_AES_KEY_128_LEN (128 / 8) |
| Number of bytes in a AES-128 key. More... | |
| #define | MXC_AES_KEY_192_LEN (192 / 8) |
| Number of bytes in a AES-192 key. More... | |
| #define | MXC_AES_KEY_256_LEN (256 / 8) |
| Number of bytes in a AES-256 key. More... | |
Enumerations | |
| enum | tpu_ciphersel_t { TPU_CIPHER_DIS = MXC_V_TPU_CIPHER_CTRL_CIPHER_DIS, TPU_CIPHER_AES128 = MXC_V_TPU_CIPHER_CTRL_CIPHER_AES128, TPU_CIPHER_AES192 = MXC_V_TPU_CIPHER_CTRL_CIPHER_AES192, TPU_CIPHER_AES256 = MXC_V_TPU_CIPHER_CTRL_CIPHER_AES256, TPU_CIPHER_DES = MXC_V_TPU_CIPHER_CTRL_CIPHER_DES, TPU_CIPHER_TDES = MXC_V_TPU_CIPHER_CTRL_CIPHER_TDES } |
| Enumeration type for the Crypto Cipher Operation(128/192/256-bit key) | |
| enum | tpu_modesel_t { TPU_MODE_ECB = MXC_V_TPU_CIPHER_CTRL_MODE_ECB, TPU_MODE_CBC = MXC_V_TPU_CIPHER_CTRL_MODE_CBC, TPU_MODE_CFB = MXC_V_TPU_CIPHER_CTRL_MODE_CFB, TPU_MODE_CTR = MXC_V_TPU_CIPHER_CTRL_MODE_CTR } |
| Enumeration type for the Crypto Mode Select. | |
Functions | |
| void | TPU_Cipher_Reset (void) |
| Reset the crypto accelerator. | |
| void | TPU_Shutdown (void) |
| Shutdown crypto controller. | |
| int | TPU_Cipher_Config (tpu_modesel_t mode, tpu_ciphersel_t cipher) |
| Configure crypto cipher operation for different modes. More... | |
| int | TPU_DES_Encrypt (const char *plaintext, const char *iv, const char *key, tpu_modesel_t mode, unsigned int data_size, char *outptr) |
| The DES encryption process. More... | |
| int | TPU_DES_Decrypt (const char *ciphertext, const char *iv, const char *key, tpu_modesel_t mode, unsigned int data_size, char *outptr) |
| The DES decryption process. More... | |
| int | TPU_TDES_Encrypt (const char *plaintext, const char *iv, const char *key, tpu_modesel_t mode, unsigned int data_size, char *outptr) |
| The TDES encryption process. More... | |
| int | TPU_TDES_Decrypt (const char *ciphertext, const char *iv, const char *key, tpu_modesel_t mode, unsigned int data_size, char *outptr) |
| The TDES decryption process. More... | |
| int | TPU_AES_Encrypt (const char *plaintext, const char *iv, const char *key, tpu_ciphersel_t cipher, tpu_modesel_t mode, unsigned int data_size, char *outptr) |
| The AES encryption process. More... | |
| int | TPU_AES_Decrypt (const char *ciphertext, const char *iv, const char *key, tpu_ciphersel_t cipher, tpu_modesel_t mode, unsigned int data_size, char *outptr) |
| The AES decryption process. More... | |
| #define MXC_AES_DATA_LEN (128 / 8) |
| #define MXC_AES_KEY_128_LEN (128 / 8) |
| #define MXC_AES_KEY_192_LEN (192 / 8) |
| #define MXC_AES_KEY_256_LEN (256 / 8) |
| int TPU_Cipher_Config | ( | tpu_modesel_t | mode, |
| tpu_ciphersel_t | cipher | ||
| ) |
| mode | Selects the Crypto operation mode |
| cipher | Selects the Cipher Operation mode |
| int TPU_DES_Encrypt | ( | const char * | plaintext, |
| const char * | iv, | ||
| const char * | key, | ||
| tpu_modesel_t | mode, | ||
| unsigned int | data_size, | ||
| char * | outptr | ||
| ) |
| plaintext | Pointer to the plaintext data |
| iv | Pointer to the initial vector data |
| key | Pointer to the crypto key |
| mode | Selects the Crypto operation mode |
| data_size | Specifies length of data in bytes |
| outptr | Output buffer |
plaintext; iv; key points to null | int TPU_DES_Decrypt | ( | const char * | ciphertext, |
| const char * | iv, | ||
| const char * | key, | ||
| tpu_modesel_t | mode, | ||
| unsigned int | data_size, | ||
| char * | outptr | ||
| ) |
| ciphertext | Pointer to the ciphertext data |
| iv | Pointer to the initial vector data |
| key | Pointer to the crypto key |
| mode | Selects the Crypto operation mode |
| data_size | Specifies length of data in bytes |
| outptr | Output buffer |
plaintext; iv; key points to null | int TPU_TDES_Encrypt | ( | const char * | plaintext, |
| const char * | iv, | ||
| const char * | key, | ||
| tpu_modesel_t | mode, | ||
| unsigned int | data_size, | ||
| char * | outptr | ||
| ) |
| plaintext | Pointer to the plaintext data |
| iv | Pointer to the initial vector data |
| key | Pointer to the crypto key |
| mode | Selects the Crypto operation mode |
| data_size | Specifies length of data in bytes |
| outptr | Output buffer |
plaintext; iv; key points to null | int TPU_TDES_Decrypt | ( | const char * | ciphertext, |
| const char * | iv, | ||
| const char * | key, | ||
| tpu_modesel_t | mode, | ||
| unsigned int | data_size, | ||
| char * | outptr | ||
| ) |
| ciphertext | Pointer to the ciphertext data |
| iv | Pointer to the initial vector data |
| key | Pointer to the crypto key |
| mode | Selects the Crypto operation mode |
| data_size | Specifies length of data in bytes |
| outptr | Output buffer |
plaintext; iv; key points to null | int TPU_AES_Encrypt | ( | const char * | plaintext, |
| const char * | iv, | ||
| const char * | key, | ||
| tpu_ciphersel_t | cipher, | ||
| tpu_modesel_t | mode, | ||
| unsigned int | data_size, | ||
| char * | outptr | ||
| ) |
| plaintext | Pointer to the plaintext data |
| iv | Pointer to the initial vector data |
| key | Pointer to the crypto key |
| cipher | Selects the Cipher Operation mode |
| mode | Selects the Crypto operation mode |
| data_size | Specifies length of data in bytes |
| outptr | Output buffer |
plaintext; iv; key points to null cipher is invalid, see tpu_ciphersel_t | int TPU_AES_Decrypt | ( | const char * | ciphertext, |
| const char * | iv, | ||
| const char * | key, | ||
| tpu_ciphersel_t | cipher, | ||
| tpu_modesel_t | mode, | ||
| unsigned int | data_size, | ||
| char * | outptr | ||
| ) |
| ciphertext | Pointer to the ciphertext data |
| iv | Pointer to the initial vector data |
| key | Pointer to the crypto key |
| cipher | Selects the Cipher Operation mode |
| mode | Selects the Crypto operation mode |
| data_size | Specifies length of data in bytes |
| outptr | Output buffer |
plaintext; iv; key points to null cipher is invalid, see tpu_ciphersel_t