Xmega Application Note | |||||
This file contains the function prototypes for the XMEGA DES driver.
The low level implementation of the driver is made in two versions, one optimized for size and one optimized for speed. The driver is intended for rapid prototyping and documentation purposes for getting started with the XMEGA DES crypto instruction.
Copyright (c) 2008, Atmel Corporation All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. The name of ATMEL may not be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file DES_driver.h.
#include "avr_compiler.h"
Go to the source code of this file.
Functions | |
void | DES_3DES_Decrypt (uint8_t *ciphertext, uint8_t *plaintext, uint8_t *keys) |
Function that does a 3DES decryption on one 64-bit data block. | |
void | DES_3DES_Encrypt (uint8_t *plaintext, uint8_t *ciphertext, uint8_t *keys) |
Function that does a 3DES encryption on one 64-bit data block. | |
void | DES_CBC_Decrypt (uint8_t *ciphertext, uint8_t *plaintext, uint8_t *keys, uint8_t *init, bool triple_DES, uint16_t block_length) |
Function that does DES Cipher Block Chaining decryption on a given number of 64-bit data block. | |
void | DES_CBC_Encrypt (uint8_t *plaintext, uint8_t *ciphertext, uint8_t *keys, uint8_t *init, bool triple_DES, uint16_t block_length) |
Function that does DES Cipher Block Chaining encryption on a given number of 64-bit data block. | |
void | DES_Decrypt (uint8_t *ciphertext, uint8_t *plaintext, uint8_t *key) |
Function that does a DES decryption on one 64-bit data block. | |
void | DES_Encrypt (uint8_t *plaintext, uint8_t *ciphertext, uint8_t *key) |
Function that does a DES encryption on one 64-bit data block. |
void DES_3DES_Decrypt | ( | uint8_t * | ciphertext, | |
uint8_t * | plaintext, | |||
uint8_t * | keys | |||
) |
Function that does a 3DES decryption on one 64-bit data block.
ciphertext | Pointer to the ciphertext that shall be decrypted. | |
plaintext | Pointer to where in memory the plaintext (answer) shall be stored. | |
keys | Pointer to the array of the 3 DES keys. |
Referenced by main().
void DES_3DES_Encrypt | ( | uint8_t * | plaintext, | |
uint8_t * | ciphertext, | |||
uint8_t * | keys | |||
) |
Function that does a 3DES encryption on one 64-bit data block.
plaintext | Pointer to the plaintext that shall be encrypted. | |
ciphertext | Pointer to where in memory the ciphertext (answer) shall be stored. | |
keys | Pointer to the array of the 3 DES keys. |
Referenced by main().
void DES_CBC_Decrypt | ( | uint8_t * | ciphertext, | |
uint8_t * | plaintext, | |||
uint8_t * | keys, | |||
uint8_t * | init, | |||
bool | triple_DES, | |||
uint16_t | block_length | |||
) |
Function that does DES Cipher Block Chaining decryption on a given number of 64-bit data block.
ciphertext | Pointer to the ciphertext that shall be decrypted. | |
plaintext | Pointer to where in memory the plaintext (answer) shall be stored. | |
keys | Pointer to the array of the one or three DES keys needed. | |
init | Pointer to initial vector used in in CBC. | |
triple_DES | Bool that indicate if 3DES or DES shall be used. | |
block_length | Value that tells how many blocks to encrypt. |
Referenced by main().
void DES_CBC_Encrypt | ( | uint8_t * | plaintext, | |
uint8_t * | ciphertext, | |||
uint8_t * | keys, | |||
uint8_t * | init, | |||
bool | triple_DES, | |||
uint16_t | block_length | |||
) |
Function that does DES Cipher Block Chaining encryption on a given number of 64-bit data block.
plaintext | Pointer to the plaintext that shall be encrypted. | |
ciphertext | Pointer to where in memory the ciphertext(answer) shall be stored. | |
keys | Pointer to the array of the one or three DES keys needed. | |
init | Pointer to initial vector used in in CBC. | |
triple_DES | Bool that indicate if 3DES or DES shall be used. | |
block_length | Value that tells how many blocks to encrypt. |
Referenced by main().
void DES_Decrypt | ( | uint8_t * | ciphertext, | |
uint8_t * | plaintext, | |||
uint8_t * | key | |||
) |
Function that does a DES decryption on one 64-bit data block.
ciphertext | Pointer to the ciphertext that shall be decrypted. | |
plaintext | Pointer to where in memory the plaintext (answer) shall be stored. | |
key | Pointer to the DES key. |
Referenced by main().
void DES_Encrypt | ( | uint8_t * | plaintext, | |
uint8_t * | ciphertext, | |||
uint8_t * | key | |||
) |
Function that does a DES encryption on one 64-bit data block.
plaintext | Pointer to the plaintext that shall be encrypted. | |
ciphertext | Pointer to where in memory the ciphertext (answer) shall be stored. | |
key | Pointer to the DES key. |
Referenced by main().
Generated on Wed Apr 23 08:31:42 2008 for AVR1317 Using the XMEGA bulit in DES accelerator by ![]() |