Atmel Software Framework

aes.h File Reference

AVR XMEGA Advanced Encryption Standard (AES) driver.

Copyright (c) 2010-2015 Atmel Corporation. All rights reserved.

#include <compiler.h>

Functions

AES Function Define
static void aes_start (void)
 Start a decryption/encryption operation. More...
 
static void aes_software_reset (void)
 Reset all registers in AES module. More...
 
static bool aes_is_busy (void)
 Check if the AES module is busy. More...
 
static bool aes_is_error (void)
 Check if the AES module has encountered an error. More...
 
static void aes_clear_interrupt_flag (void)
 Clear the AES state ready interrupt flag. More...
 
static void aes_clear_error_flag (void)
 Clear the AES error flag. More...
 
void aes_configure (enum aes_dec decrypt, enum aes_auto auto_start, enum aes_xor xor_mode)
 AES control register settings. More...
 
void aes_set_key (t_key k_in)
 Load key memory. More...
 
void aes_get_key (t_key k_out)
 Get key memory. More...
 
void aes_write_inputdata (t_data d_in)
 Load state memory. More...
 
void aes_read_outputdata (t_data d_out)
 Get state memory. More...
 
void aes_isr_configure (enum aes_intlvl intlvl)
 AES interrupt settings. More...
 
void aes_set_callback (aes_callback_t callback)
 Set AES interrupt callback function. More...
 

AES Configuration Define

#define AES_KEY_SIZE   16
 Length of one key block. More...
 
#define AES_DATA_SIZE   16
 Length of one data block. More...
 
enum  aes_dec {
  AES_ENCRYPT,
  AES_DECRYPT = AES_DECRYPT_bm
}
 AES encryption/decryption direction settings. More...
 
enum  aes_auto {
  AES_MANUAL,
  AES_AUTO = AES_AUTO_bm
}
 AES Auto Start Trigger settings. More...
 
enum  aes_xor {
  AES_XOR_OFF,
  AES_XOR_ON = AES_XOR_bm
}
 AES State XOR Load Enable settings. More...
 
enum  aes_intlvl {
  AES_INTLVL_OFF = AES_INTLVL_OFF_gc,
  AES_INTLVL_LO = AES_INTLVL_LO_gc,
  AES_INTLVL_MED = AES_INTLVL_MED_gc,
  AES_INTLVL_HI = AES_INTLVL_HI_gc
}
 AES Interrupt Enable / Level settings. More...
 
typedef uint8_t t_key [AES_KEY_SIZE]
 AES key block type. More...
 
typedef uint8_t t_data [AES_DATA_SIZE]
 AES data block type. More...
 
typedef void(* aes_callback_t )(void)
 AES interrupt callback function pointer. More...