AVR XMEGA Data Encryption Standard (DES) driver.
Copyright (c) 2010-2018 Microchip Technology Inc. and its subsidiaries.
#include <asf.h>
Macros | |
#define | DES_BLOCK_COUNT 3 |
AES data block count. More... | |
#define | DES_BLOCK_LENGTH 8 |
AES data, key block length. More... | |
Functions | |
int | main (void) |
Main example doing DES encryption/decryption. More... | |
Variables | |
uint8_t | block_ans [DES_BLOCK_LENGTH *DES_BLOCK_COUNT] |
Variable used to store decrypted plaintext from DES Cipher Block Chaining. More... | |
uint8_t | cipher_block_ans [DES_BLOCK_LENGTH *DES_BLOCK_COUNT] |
Variable used to store ciphertext from DES Cipher Block Chaining. More... | |
uint8_t | data [DES_BLOCK_LENGTH] |
Plaintext block used by DES and 3DES. More... | |
uint8_t | data_block [DES_BLOCK_LENGTH *DES_BLOCK_COUNT] |
Plain text used during DES Cipher Block Chaining. More... | |
uint8_t | init [DES_BLOCK_LENGTH] |
Initial vector used during DES Cipher Block Chaining. More... | |
uint8_t | keys [DES_BLOCK_LENGTH *DES_BLOCK_COUNT] |
Keys used by all DES operations. More... | |
uint8_t | single_ans [DES_BLOCK_LENGTH] |
Variable used to store DES and tripleDES results. More... | |
#define DES_BLOCK_COUNT 3 |
AES data block count.
Referenced by main().
#define DES_BLOCK_LENGTH 8 |
AES data, key block length.
Referenced by main().
int main | ( | void | ) |
Main example doing DES encryption/decryption.
References block_ans, board_init(), cipher_block_ans, data, data_block, des_3des_decrypt(), des_3des_encrypt(), DES_BLOCK_COUNT, DES_BLOCK_LENGTH, des_cbc_decrypt(), des_cbc_encrypt(), des_decrypt(), des_encrypt(), init, ioport_set_pin_low(), keys, LED0_GPIO, LED1_GPIO, single_ans, sleepmgr_enter_sleep(), and sleepmgr_init().
uint8_t block_ans[DES_BLOCK_LENGTH *DES_BLOCK_COUNT] |
Variable used to store decrypted plaintext from DES Cipher Block Chaining.
Referenced by main().
uint8_t cipher_block_ans[DES_BLOCK_LENGTH *DES_BLOCK_COUNT] |
Variable used to store ciphertext from DES Cipher Block Chaining.
Referenced by main().
uint8_t data[DES_BLOCK_LENGTH] |
Plaintext block used by DES and 3DES.
Referenced by main().
uint8_t data_block[DES_BLOCK_LENGTH *DES_BLOCK_COUNT] |
Plain text used during DES Cipher Block Chaining.
Referenced by main().
uint8_t init[DES_BLOCK_LENGTH] |
Initial vector used during DES Cipher Block Chaining.
Referenced by main().
uint8_t keys[DES_BLOCK_LENGTH *DES_BLOCK_COUNT] |
Keys used by all DES operations.
(single DES only uses the first 64-bit key).
Referenced by main().
uint8_t single_ans[DES_BLOCK_LENGTH] |
Variable used to store DES and tripleDES results.
Referenced by main().