aes.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715
  1. /**
  2. *
  3. * \file
  4. *
  5. * \brief SAM Advanced Encryption Standard driver.
  6. *
  7. * Copyright (c) 2014-2015 Atmel Corporation. All rights reserved.
  8. *
  9. * \asf_license_start
  10. *
  11. * \page License
  12. *
  13. * Redistribution and use in source and binary forms, with or without
  14. * modification, are permitted provided that the following conditions are met:
  15. *
  16. * 1. Redistributions of source code must retain the above copyright notice,
  17. * this list of conditions and the following disclaimer.
  18. *
  19. * 2. Redistributions in binary form must reproduce the above copyright notice,
  20. * this list of conditions and the following disclaimer in the documentation
  21. * and/or other materials provided with the distribution.
  22. *
  23. * 3. The name of Atmel may not be used to endorse or promote products derived
  24. * from this software without specific prior written permission.
  25. *
  26. * 4. This software may only be redistributed and used in connection with an
  27. * Atmel microcontroller product.
  28. *
  29. * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
  30. * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  31. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
  32. * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
  33. * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  34. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  35. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  36. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  37. * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
  38. * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  39. * POSSIBILITY OF SUCH DAMAGE.
  40. *
  41. * \asf_license_stop
  42. *
  43. */
  44. /*
  45. * Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
  46. */
  47. #ifndef AES_H_INCLUDED
  48. #define AES_H_INCLUDED
  49. #ifdef __cplusplus
  50. extern "C" {
  51. #endif
  52. /**
  53. * \defgroup asfdoc_sam0_drivers_aes_group SAM Advanced Encryption Standard (AES) Driver
  54. *
  55. * This driver for Atmel&reg; | SMART ARM&reg;-based microcontrollers provides an interface for the configuration
  56. * and management of the device's Advanced Encryption Standard functionality. The following
  57. * driver API modes are covered by this manual:
  58. *
  59. * - Polled APIs
  60. * - Callback APIs
  61. *
  62. * The Advanced Encryption Standard module supports all five confidentiality
  63. * modes of operation for symmetrical key block cipher algorithms (as specified
  64. * in the NIST Special Publication 800-38A Recommendation):
  65. * - Electronic Code Book (ECB)
  66. * - Cipher Block Chaining (CBC)
  67. * - Output Feedback (OFB)
  68. * - Cipher Feedback (CFB)
  69. * - Counter (CTR)
  70. *
  71. * The following peripheral is used by this module:
  72. * - AES (Advanced Encryption Standard)
  73. *
  74. * The following devices can use this module:
  75. * - Atmel | SMART SAM L21
  76. * - Atmel | SMART SAM L22
  77. *
  78. * The outline of this documentation is as follows:
  79. * - \ref asfdoc_sam0_drivers_aes_prerequisites
  80. * - \ref asfdoc_sam0_drivers_aes_module_overview
  81. * - \ref asfdoc_sam0_drivers_aes_special_considerations
  82. * - \ref asfdoc_sam0_drivers_aes_extra_info
  83. * - \ref asfdoc_sam0_drivers_aes_examples
  84. * - \ref asfdoc_sam0_drivers_aes_api_overview
  85. *
  86. *
  87. * \section asfdoc_sam0_drivers_aes_prerequisites Prerequisites
  88. *
  89. * There are no prerequisites for this module.
  90. *
  91. *
  92. * \section asfdoc_sam0_drivers_aes_module_overview Module Overview
  93. *
  94. * The Advanced Encryption Standard (AES) is a specification for the encryption of
  95. * electronic data established by the U.S. National Institute of Standards and
  96. * Technology (NIST) in 2001. It is compliant with the American FIPS
  97. * (Federal Information Processing Standard) Publication 197 specification.
  98. *
  99. * The AES supports all five confidentiality modes of operation for symmetrical
  100. * key block cipher algorithms (as specified in the NIST Special Publication
  101. * 800-38A Recommendation):
  102. * - Electronic Code Book (ECB)
  103. * - Cipher Block Chaining (CBC)
  104. * - Output Feedback (OFB)
  105. * - Cipher Feedback (CFB)
  106. * - Counter (CTR)
  107. *
  108. * Data transfers both to and from the AES module can occur using the peripheral
  109. * DMA controller channels, thus minimizing processor intervention for
  110. * large data buffer transfers.
  111. *
  112. * As soon as the initialization vector, the input data and the key are
  113. * configured, the encryption/decryption process may be started. Once the
  114. * process has completed the encrypted/decrypted data can be read out via
  115. * registers or through DMA channels.
  116. *
  117. * \subsection asfdoc_sam0_drivers_aes_module_overview_en_de Encryption and Decryption
  118. * The AES is capable of using cryptographic keys of 128/192/256 bits to
  119. * encrypt and decrypt data in blocks of 128 bits. In Cipher Feedback Mode (CFB),
  120. * five data sizes are possible (8, 16, 32, 64, or 128 bits).
  121. *
  122. * The input to the encryption processes of the CBC, CFB, and OFB modes includes,
  123. * in addition to the plaintext, a 128-bit data block called the Initialization
  124. * Vector (IV). The Initialization Vector is used in the initial step in the
  125. * encryption of a message and in the corresponding decryption of the message.
  126. *
  127. * There are three encryption/decryption start modes:
  128. * - Manual Mode: Start encryption/decryption manually
  129. * - Auto Start Mode: Once the correct number of input data registers is written,
  130. * processing is automatically started, DMA operation uses this mode
  131. * - Last Output Data Mode (LOD): This mode is used to generate message
  132. * authentication code (MAC) on data in CCM mode of operation
  133. *
  134. * \subsection asfdoc_sam0_drivers_aes_module_overview_hardware_countermeasures Hardware Countermeasures
  135. * The AES module features four types of hardware countermeasures that are
  136. * useful for protecting data against differential power analysis attacks:
  137. * - Type 1: Randomly add one cycle to data processing
  138. * - Type 2: Randomly add one cycle to data processing (other version)
  139. * - Type 3: Add a random number of clock cycles to data processing, subject to
  140. * a maximum of 11/13/15 clock cycles for key sizes of 128/192/256 bits
  141. * - Type 4: Add random spurious power consumption during data processing
  142. *
  143. * \subsection asfdoc_sam0_drivers_aes_module_overview_gcm Galois Counter Mode (GCM)
  144. * GCM is comprised of the AES engine in CTR mode along with a universal hash
  145. * function (GHASH engine) that is defined over a binary Galois field to produce
  146. * a message authentication tag. The GHASH engine processes data packets after the
  147. * AES operation. GCM provides assurance of the confidentiality of data through the
  148. * AES Counter mode of operation for DRAFT 920 encryption. Authenticity of the
  149. * confidential data is assured through the GHASH engine. Refer to the NIST Special
  150. * Publication 800-38D Recommendation for more complete information.
  151. *
  152. * \section asfdoc_sam0_drivers_aes_special_considerations Special Considerations
  153. *
  154. * There are no special considerations for this module.
  155. *
  156. * \section asfdoc_sam0_drivers_aes_extra_info Extra Information
  157. *
  158. * For extra information, see \ref asfdoc_sam0_drivers_aes_extra. This includes:
  159. * - \ref asfdoc_sam0_drivers_aes_extra_acronyms
  160. * - \ref asfdoc_sam0_drivers_aes_extra_dependencies
  161. * - \ref asfdoc_sam0_drivers_aes_extra_errata
  162. * - \ref asfdoc_sam0_drivers_aes_extra_history
  163. *
  164. * \section asfdoc_sam0_drivers_aes_examples Examples
  165. *
  166. * For a list of examples related to this driver, see
  167. * \ref asfdoc_sam0_drivers_aes_exqsg.
  168. *
  169. *
  170. * \section asfdoc_sam0_drivers_aes_api_overview API Overview
  171. * @{
  172. */
  173. #include <compiler.h>
  174. #include <system.h>
  175. #ifdef __cplusplus
  176. extern "C" {
  177. #endif
  178. /** AES processing mode. */
  179. enum aes_encrypt_mode {
  180. AES_DECRYPTION = 0, /**< Decryption of data will be performed */
  181. AES_ENCRYPTION, /**< Encryption of data will be performed */
  182. };
  183. /** AES cryptographic key size. */
  184. enum aes_key_size {
  185. AES_KEY_SIZE_128 = 0, /**< AES key size is 128-bit */
  186. AES_KEY_SIZE_192, /**< AES key size is 192-bit */
  187. AES_KEY_SIZE_256, /**< AES key size is 256-bit */
  188. };
  189. /** AES start mode. */
  190. enum aes_start_mode {
  191. AES_MANUAL_START = 0, /**< Manual start mode */
  192. AES_AUTO_START, /**< Auto start mode */
  193. };
  194. /** AES operation mode. */
  195. enum aes_operation_mode {
  196. AES_ECB_MODE = 0, /**< Electronic Codebook (ECB) */
  197. AES_CBC_MODE, /**< Cipher Block Chaining (CBC) */
  198. AES_OFB_MODE, /**< Output Feedback (OFB) */
  199. AES_CFB_MODE, /**< Cipher Feedback (CFB) */
  200. AES_CTR_MODE, /**< Counter (CTR) */
  201. AES_CCM_MODE, /**< Counter (CCM) */
  202. AES_GCM_MODE, /**< Galois Counter Mode (GCM) */
  203. };
  204. /** AES Cipher FeedBack (CFB) size. */
  205. enum aes_cfb_size {
  206. AES_CFB_SIZE_128 = 0, /**< Cipher feedback data size is 128-bit */
  207. AES_CFB_SIZE_64, /**< Cipher feedback data size is 64-bit */
  208. AES_CFB_SIZE_32, /**< Cipher feedback data size is 32-bit */
  209. AES_CFB_SIZE_16, /**< Cipher feedback data size is 16-bit */
  210. AES_CFB_SIZE_8, /**< Cipher feedback data size is 8-bit */
  211. };
  212. /** AES countermeasure type */
  213. enum aes_countermeature_type {
  214. AES_COUNTERMEASURE_TYPE_disabled = 0x0, /**< Countermeasure type all disabled */
  215. AES_COUNTERMEASURE_TYPE_1 = 0x01, /**< Countermeasure1 enabled */
  216. AES_COUNTERMEASURE_TYPE_2 = 0x02, /**< Countermeasure2 enabled */
  217. AES_COUNTERMEASURE_TYPE_3 = 0x04, /**< Countermeasure3 enabled */
  218. AES_COUNTERMEASURE_TYPE_4 = 0x08, /**< Countermeasure4 enabled */
  219. AES_COUNTERMEASURE_TYPE_ALL = 0x0F, /**< Countermeasure type all enabled */
  220. };
  221. /**
  222. * \name Module Status Flags
  223. *
  224. * AES status flags, returned by \ref aes_get_status() and cleared by
  225. * \ref aes_clear_status().
  226. *
  227. * @{
  228. */
  229. /** AES encryption complete.
  230. */
  231. #define AES_ENCRYPTION_COMPLETE (1UL << 0)
  232. /** AES GF multiplication complete.
  233. */
  234. #define AES_GF_MULTI_COMPLETE (1UL << 1)
  235. /** @} */
  236. /** AES Configuration structure. */
  237. struct aes_config {
  238. /** AES data mode (decryption or encryption) */
  239. enum aes_encrypt_mode encrypt_mode;
  240. /** AES key size */
  241. enum aes_key_size key_size;
  242. /** Start mode */
  243. enum aes_start_mode start_mode;
  244. /** AES cipher operation mode*/
  245. enum aes_operation_mode opmode;
  246. /** Cipher feedback data size */
  247. enum aes_cfb_size cfb_size;
  248. /** Countermeasure type */
  249. enum aes_countermeature_type ctype;
  250. /** Enable XOR key */
  251. bool enable_xor_key;
  252. /** Enable key generation */
  253. bool enable_key_gen;
  254. /** Last output data mode enable/disable */
  255. bool lod;
  256. };
  257. #if !defined(__DOXYGEN__)
  258. /**
  259. * \brief Device structure.
  260. */
  261. struct aes_module {
  262. /** AES hardware module. */
  263. Aes *hw;
  264. /** AES cipher operation mode.*/
  265. enum aes_operation_mode opmode;
  266. /** AES key size. */
  267. enum aes_key_size key_size;
  268. /** Cipher feedback data size. */
  269. enum aes_cfb_size cfb_size;
  270. };
  271. #endif
  272. /**
  273. * \name Configuration and Initialization
  274. * @{
  275. */
  276. void aes_get_config_defaults(struct aes_config *const config);
  277. void aes_set_config(struct aes_module *const module,
  278. Aes *const hw,
  279. struct aes_config *const config);
  280. void aes_init(struct aes_module *const module,
  281. Aes *const hw,
  282. struct aes_config *const config);
  283. /** @} */
  284. /**
  285. * \name Start, Enable, and Write
  286. * @{
  287. */
  288. /**
  289. * \brief Start a manual encryption/decryption process.
  290. *
  291. * \param[in] module Pointer to the AES software instance struct
  292. */
  293. static inline void aes_start(struct aes_module *const module)
  294. {
  295. Assert(module);
  296. Assert(module->hw);
  297. module->hw->CTRLB.reg |= AES_CTRLB_START;
  298. }
  299. /**
  300. * \brief Notifies the module that the next input data block
  301. * is the beginning of a new message.
  302. *
  303. * \param[in] module Pointer to the AES software instance struct
  304. *
  305. */
  306. static inline void aes_set_new_message(struct aes_module *const module)
  307. {
  308. Assert(module);
  309. Assert(module->hw);
  310. module->hw->CTRLB.reg |= AES_CTRLB_NEWMSG;
  311. }
  312. /**
  313. * \brief Clear the indication of the beginning for a new message
  314. *
  315. * \param[in] module Pointer to the AES software instance struct
  316. *
  317. */
  318. static inline void aes_clear_new_message(struct aes_module *const module)
  319. {
  320. Assert(module);
  321. Assert(module->hw);
  322. module->hw->CTRLB.reg &= ~AES_CTRLB_NEWMSG;
  323. }
  324. void aes_enable(struct aes_module *const module);
  325. void aes_disable(struct aes_module *const module);
  326. void aes_write_key(struct aes_module *const module, const uint32_t *key);
  327. void aes_write_init_vector(struct aes_module *const module, const uint32_t *vector);
  328. void aes_write_input_data(struct aes_module *const module,
  329. const uint32_t *p_input_data_buffer);
  330. void aes_read_output_data(struct aes_module *const module,
  331. uint32_t *p_output_data_buffer);
  332. /**
  333. * \brief Write AES random seed.
  334. *
  335. * \param[in] module Pointer to the AES software instance struct
  336. * \param[in] seed Seed for the random number generator
  337. */
  338. static inline void aes_write_random_seed(struct aes_module *const module,
  339. uint32_t seed)
  340. {
  341. Assert(module);
  342. Assert(module->hw);
  343. module->hw->RANDSEED.reg = seed;
  344. }
  345. /** @} */
  346. /**
  347. * \name Status Management
  348. * @{
  349. */
  350. /**
  351. * \brief Retrieves the current module status.
  352. *
  353. * Retrieves the status of the module, giving overall state information.
  354. *
  355. * \param[in] module Pointer to the AES software instance struct
  356. *
  357. * \retval AES_ENCRYPTION_COMPLETE AES encryption complete
  358. * \retval AES_GF_MULTI_COMPLETE AES GF multiplication complete
  359. */
  360. static inline uint32_t aes_get_status(struct aes_module *const module)
  361. {
  362. /* Sanity check arguments */
  363. Assert(module);
  364. Assert(module->hw);
  365. uint32_t int_flags = module->hw->INTFLAG.reg;
  366. uint32_t status_flags = 0;
  367. if (int_flags & AES_INTFLAG_ENCCMP) {
  368. status_flags |= AES_ENCRYPTION_COMPLETE;
  369. }
  370. if (int_flags & AES_INTFLAG_GFMCMP) {
  371. status_flags |= AES_GF_MULTI_COMPLETE;
  372. }
  373. return status_flags;
  374. }
  375. /**
  376. * \brief Clears a module status flag.
  377. *
  378. * Clears the given status flag of the module.
  379. *
  380. * \param[in] module Pointer to the AES software instance struct
  381. * \param[in] status_flags Bitmask flags to clear
  382. */
  383. static inline void aes_clear_status(
  384. struct aes_module *const module,
  385. const uint32_t status_flags)
  386. {
  387. /* Sanity check arguments */
  388. Assert(module);
  389. Assert(module->hw);
  390. uint32_t int_flags = 0;
  391. if (status_flags & AES_ENCRYPTION_COMPLETE) {
  392. int_flags |= AES_INTENCLR_ENCCMP;
  393. }
  394. if (status_flags & AES_GF_MULTI_COMPLETE) {
  395. int_flags |= AES_INTENCLR_GFMCMP;
  396. }
  397. /* Clear interrupt flag */
  398. module->hw->INTFLAG.reg = int_flags;
  399. }
  400. /** @} */
  401. /**
  402. * \name Galois Counter Mode
  403. * @{
  404. */
  405. /**
  406. * \brief Get the AES GCM Hash Value.
  407. *
  408. * \param[in] module Pointer to the AES software instance struct
  409. * \param[in] id Index into the GHASH array (range 0 to 3)
  410. *
  411. * \return The content of the GHASHRx[x = 0...3] value.
  412. */
  413. static inline uint32_t aes_gcm_read_ghash(struct aes_module *const module, uint32_t id)
  414. {
  415. Assert(module);
  416. Assert(module->hw);
  417. return module->hw->GHASH[id].reg;
  418. }
  419. /**
  420. * \brief Set the AES GCM Hash Value.
  421. *
  422. * \param[in] module Pointer to the AES software instance struct
  423. * \param[in] id Index into the GHASHx array (range 0 to 3)
  424. * \param[in] ghash GCM hash value
  425. */
  426. static inline void aes_gcm_write_ghash(struct aes_module *const module,
  427. uint32_t id,uint32_t ghash)
  428. {
  429. Assert(module);
  430. Assert(module->hw);
  431. module->hw->GHASH[id].reg = ghash;
  432. }
  433. /**
  434. * \brief Get AES GCM Hash key.
  435. *
  436. * \param[in] module Pointer to the AES software instance struct
  437. * \param[in] id Index into the Hash key array (range 0 to 3)
  438. *
  439. * \return The contents of the HASHKEYx[x = 0...3] specified.
  440. */
  441. static inline uint32_t aes_gcm_read_hash_key(struct aes_module *const module,
  442. uint32_t id)
  443. {
  444. Assert(module);
  445. Assert(module->hw);
  446. return module->hw->HASHKEY[id].reg;
  447. }
  448. /**
  449. * \brief Set the AES GCM Hash key.
  450. *
  451. * \param[in] module Pointer to the AES software instance struct
  452. * \param[in] id Index into the Hash key array (range 0 to 3)
  453. * \param[in] key GCM Hash key
  454. */
  455. static inline void aes_gcm_write_hash_key(struct aes_module *const module,
  456. uint32_t id, uint32_t key)
  457. {
  458. Assert(module);
  459. Assert(module->hw);
  460. module->hw->HASHKEY[id].reg = key;
  461. }
  462. /**
  463. * \brief Get the AES GCM cipher length.
  464. *
  465. * \param[in] module Pointer to the AES software instance struct
  466. *
  467. * \return The contents of the HASHKEYx[x = 0...3] specified.
  468. */
  469. static inline uint32_t aes_gcm_read_cipher_len(struct aes_module *const module)
  470. {
  471. Assert(module);
  472. Assert(module->hw);
  473. return (module->hw->CIPLEN.reg);
  474. }
  475. /**
  476. * \brief Set the AES GCM cipher length.
  477. *
  478. * \param[in] module Pointer to the AES software instance struct
  479. * \param[in] len Cipher length
  480. */
  481. static inline void aes_gcm_write_cipher_len(struct aes_module *const module,
  482. uint32_t len)
  483. {
  484. Assert(module);
  485. Assert(module->hw);
  486. module->hw->CIPLEN.reg = len;
  487. }
  488. /**
  489. * \brief Set GCM end of input message status.
  490. *
  491. * \param[in] module Pointer to the AES software instance struct
  492. */
  493. static inline void aes_gcm_set_end_message_status(struct aes_module *const module)
  494. {
  495. Assert(module);
  496. Assert(module->hw);
  497. module->hw->CTRLB.reg |= AES_CTRLB_EOM;
  498. }
  499. /**
  500. * \brief Clear GCM end of input message status.
  501. *
  502. * \param[in] module Pointer to the AES software instance struct
  503. */
  504. static inline void aes_gcm_clear_end_message_status(struct aes_module *const module)
  505. {
  506. Assert(module);
  507. Assert(module->hw);
  508. module->hw->CTRLB.reg &= ~AES_CTRLB_EOM;
  509. }
  510. /**
  511. * \brief Set GF multiplication of GCM mode.
  512. *
  513. * \param[in] module Pointer to the AES software instance struct
  514. */
  515. static inline void aes_gcm_set_gf_multiplication(struct aes_module *const module)
  516. {
  517. Assert(module);
  518. Assert(module->hw);
  519. module->hw->CTRLB.reg |= AES_CTRLB_GFMUL;
  520. }
  521. /** @} */
  522. #ifdef __cplusplus
  523. }
  524. #endif
  525. /** @} */
  526. /**
  527. * \page asfdoc_sam0_drivers_aes_extra Extra Information for Advanced Encryption Standard
  528. *
  529. * \section asfdoc_sam0_drivers_aes_extra_acronyms Acronyms
  530. * Below is a table listing the acronyms used in this module, along with their
  531. * intended meanings.
  532. *
  533. * <table>
  534. * <tr>
  535. * <th>Acronym</th>
  536. * <th>Definition</th>
  537. * </tr>
  538. * <tr>
  539. * <td>AAD</td>
  540. * <td>Additional Authenticated Data</td>
  541. * </tr>
  542. * <tr>
  543. * <td>CBC</td>
  544. * <td>Cipher Block Chaining</td>
  545. * </tr>
  546. * <tr>
  547. * <td>CFB</td>
  548. * <td>Cipher Feedback</td>
  549. * </tr>
  550. * <tr>
  551. * <td>CTR</td>
  552. * <td> Counter</td>
  553. * </tr>
  554. * <tr>
  555. * <td>DMA</td>
  556. * <td>Direct Memory Access</td>
  557. * </tr>
  558. * <tr>
  559. * <td>DMAC</td>
  560. * <td>DMA Controller</td>
  561. * </tr>
  562. * <tr>
  563. * <td>ECB</td>
  564. * <td>Electronic Codebook</td>
  565. * </tr>
  566. * <tr>
  567. * <td>GCM</td>
  568. * <td>Galois Counter Mode</td>
  569. * </tr>
  570. * <tr>
  571. * <td>OFB</td>
  572. * <td>Output Feedback</td>
  573. * </tr>
  574. * <tr>
  575. * <td>QSG</td>
  576. * <td>Quick Start Guide</td>
  577. * </tr>
  578. * </table>
  579. *
  580. *
  581. * \section asfdoc_sam0_drivers_aes_extra_dependencies Dependencies
  582. * This driver has the following dependencies:
  583. *
  584. * - None
  585. *
  586. *
  587. * \section asfdoc_sam0_drivers_aes_extra_errata Errata
  588. * There are no errata related to this driver.
  589. *
  590. *
  591. * \section asfdoc_sam0_drivers_aes_extra_history Module History
  592. * An overview of the module history is presented in the table below, with
  593. * details on the enhancements and fixes made to the module since its first
  594. * release. The current version of this corresponds to the newest version in
  595. * the table.
  596. *
  597. * <table>
  598. * <tr>
  599. * <th>Changelog</th>
  600. * </tr>
  601. * <tr>
  602. * <td>Initial release</td>
  603. * </tr>
  604. * </table>
  605. */
  606. /**
  607. * \page asfdoc_sam0_drivers_aes_exqsg Examples for Advanced Encryption Standard
  608. *
  609. * This is a list of the available Quick Start Guides (QSGs) and example
  610. * applications for \ref asfdoc_sam0_drivers_aes_group. QSGs are simple examples with
  611. * step-by-step instructions to configure and use this driver in a selection of
  612. * use cases. Note that a QSG can be compiled as a standalone application or be
  613. * added to the user application.
  614. *
  615. * - \subpage asfdoc_sam0_aes_basic_use_case
  616. * - \subpage asfdoc_sam0_aes_callback_use_case
  617. * - \subpage asfdoc_sam0_aes_dma_use_case
  618. *
  619. * \page asfdoc_sam0_drivers_aes_document_revision_history Document Revision History
  620. *
  621. * <table>
  622. * <tr>
  623. * <th>Doc. Rev.</td>
  624. * <th>Date</td>
  625. * <th>Comments</td>
  626. * </tr>
  627. * <tr>
  628. * <td>42445B</td>
  629. * <td>12/2015</td>
  630. * <td>Added support for SAM L22</td>
  631. * </tr>
  632. * <tr>
  633. * <td>42445A</td>
  634. * <td>06/2015</td>
  635. * <td>Initial release</td>
  636. * </tr>
  637. * </table>
  638. *
  639. */
  640. #ifdef __cplusplus
  641. }
  642. #endif
  643. #endif /* AES_H_INCLUDED */