ox_aes.h | Developers

ox_aes.h

Back to the files list

Advanced Encryption Standard syscalls. More...

Data Structures

struct  cx_aes_key_s
 AES key container. More...

Macros

#define CX_AES_BLOCK_SIZE   16
 Block size of the AES in bytes. More...

Typedefs

typedef struct cx_aes_key_s cx_aes_key_t
 Convenience type. More...

Functions

SYSCALL cx_err_t cx_aes_set_key_hw (const cx_aes_key_t *key, uint32_t mode)
 Sets an AES key in hardware. More...
SYSCALL void cx_aes_reset_hw (void)
 Resets the AES context. More...
SYSCALL cx_err_t cx_aes_block_hw (const unsigned char *inblock, unsigned char *outblock)
 Encrypts or decrypts a block with AES. More...

Detailed Description

Advanced Encryption Standard syscalls.

This file contains AES definitions and functions:

  • Set the AES key in memory
  • Encrypt a 128-bit block
  • Reset the AES context

Macro Definition Documentation

CX_AES_BLOCK_SIZE

#define CX_AES_BLOCK_SIZE   16

Block size of the AES in bytes.

Typedef Documentation

cx_aes_key_t

typedef struct cx_aes_key_s cx_aes_key_t

Convenience type.

See cx_aes_key_s.

Function Documentation

cx_aes_block_hw()

SYSCALL cx_err_t cx_aes_block_hw ( const unsigned char *  inblock,
unsigned char *  outblock 
)

Encrypts or decrypts a block with AES.

Parameters
[in]inblockPointer to the block.
[out]outblockBuffer for the output.
Returns
Error code:
  • CX_OK on success
  • INVALID_PARAMETER

cx_aes_reset_hw()

SYSCALL void cx_aes_reset_hw ( void  )

Resets the AES context.

cx_aes_set_key_hw()

SYSCALL cx_err_t cx_aes_set_key_hw ( const cx_aes_key_t key,
uint32_t  mode 
)

Sets an AES key in hardware.

Parameters
[in]keyAES key.
[in]modeOperation for which the key will be used.
Returns
Error code:
  • CX_OK on success
  • CX_INVALID_PARAMETER

Back to the files list


Did you find this page helpful?


How would you improve this page for developers?



Getting Started
Theme Features
Customization

Nano Apps