Microchip® Advanced Software Framework

aes.c File Reference

SAM Advanced Encryption Standard driver.

This file defines a useful set of functions for the AES on SAM devices.

Copyright (c) 2013-2018 Microchip Technology Inc. and its subsidiaries.

#include <aes.h>
#include <sysclk.h>
#include <sleepmgr.h>

Functions

void aes_disable (void)
 Disable the AES module. More...
 
void aes_enable (void)
 Enable the AES module. More...
 
void aes_get_config_defaults (struct aes_config *const p_cfg)
 Initializes an AES configuration structure to defaults. More...
 
Pdc * aes_get_pdc_base (Aes *p_aes)
 Get AES PDC base address. More...
 
void AES_Handler (void)
 
void aes_init (Aes *const p_aes, struct aes_config *const p_cfg)
 Initialize the AES module. More...
 
void aes_read_output_data (Aes *const p_aes, uint32_t *p_output_data_buffer)
 Read the output data. More...
 
void aes_set_callback (Aes *const p_aes, aes_interrupt_source_t source, aes_callback_t callback, uint8_t irq_level)
 Set the AES interrupt callback. More...
 
void aes_set_config (Aes *const p_aes, struct aes_config *const p_cfg)
 Configure the AES module. More...
 
void aes_write_initvector (Aes *const p_aes, const uint32_t *p_vector)
 Write the initialization vector (for the CBC, CFB, OFB, CTR & GCM cipher modes). More...
 
void aes_write_input_data (Aes *const p_aes, const uint32_t *p_input_data_buffer)
 Write the input data (four consecutive 32-bit words). More...
 
void aes_write_key (Aes *const p_aes, const uint32_t *p_key)
 Write the 128/192/256-bit cryptographic key. More...
 

Variables

aes_callback_t aes_callback_pointer [AES_INTERRUPT_SOURCE_NUM]
 AES callback function pointer. More...
 

void AES_Handler ( void  )

aes_callback_t aes_callback_pointer[AES_INTERRUPT_SOURCE_NUM]

AES callback function pointer.

Referenced by AES_Handler(), and aes_set_callback().