Data Encryption Pic18

Páginas: 20 (4751 palabras) Publicado: 9 de mayo de 2012
AN953
Data Encryption Routines for the PIC18
Author: David Flowers Microchip Technology Inc.

ENCRYPTION MODULE OVERVIEW
• Four algorithms to choose from, each with their own benefits • Advanced Encryption Standard (AES) - Modules available in C, Assembly and Assembly written for C - Allows user to decide to include encoder, decoder or both - Allows user to pre-program a decryption key intothe code or use a function to calculate the decryption key • Tiny Encryption Algorithm version 2 (XTEA) - Modules available in C and Assembly - Programmable number of iteration cycles • SKIPJACK - Module available in C • Pseudo-random binary sequence generator XOR encryption - Modules available in C and Assembly - Allows user to change the feedback taps at run-time - KeyJump breaks the regularcycle of the to increase the variability of the sequence • Out-of-the-box support for MPLAB® C 18 • Various compiling options to customize routines for a specific application - Available as a Microchip Application Maestro™ module to simplify customization

INTRODUCTION
This Application Note covers four encryption algorithms: AES, XTEA, SKIPJACK® and a simple encryption algorithm using apseudo-random binary sequence generator. The science of cryptography dates back to ancient Egypt. In today’s era of information technology where data is widely accessible, sensitive material, especially electronic data, needs to be encrypted for the user’s protection. For example, a network-based card entry door system that logs the persons who have entered the building may be susceptible to an attack wherethe user information can be stolen or manipulated by sniffing or spoofing the link between the processor and the memory storage device. If the information is encrypted first, it has a better chance of remaining secure. Many encryption algorithms provide protection against someone reading the hidden data, as well as providing protection against tampering. In most algorithms, the decryption processwill cause the entire block of information to be destroyed if there is a single bit error in the block prior to decryption.

 2005 Microchip Technology Inc.

DS00953A-page 1

AN953
AES
Overview/History/Background
The Advanced Encryption Standard (AES) is a means of encrypting and decrypting data adopted by the National Institute of Standards and Technology (NIST) on October 2, 2000. Inthe late 1990s, NIST held a contest to initiate the development of encryption algorithms that would replace the Data Encryption Standard (DES). The contest tested the algorithms’ security and execution speed to determine which would be named the AES. The algorithm chosen is called the “Rijndael” algorithm after its two designers, Joan Daemen and Vincent Rijmen of Belgium. AES is a symmetric blockcipher that utilizes a secret key to encrypt data. The implementation of AES in this application note is based on a 16-byte block of data and a 16-byte key size.

DS00953A-page 2

 2005 Microchip Technology Inc.

AN953
ENCRYPTION
FIGURE 1: AES ENCRYPT FLOWCHART
ENCRYPTION

Round Counter = 10

Rcon = 1

Key Addition

S-Table Substitution

Encode Row Shift

True Round Counter= 1? False Encode Mix Column

Encode Key Schedule

Key Addition

Round Counter - 1

Round Counter = 0? False True END

 2005 Microchip Technology Inc.

DS00953A-page 3

AN953
There are five basic subdivisions of the encryption flowchart. A detailed explanation of each will follow. The number of rounds needed in the transformation is taken from the following table. 16-Byte Block16-byte key 24-byte key 32-byte key 10* 12 14 24-Byte Block 12 12 14 32-Byte Block 14 14 14

* Used in this implementation. This implementation of AES uses a 16-byte block and a 16-byte key and thus uses 10 rounds of encryption. On the last encryption round, the mix column subdivision is left out. The structures of the key and data blocks are shown below.

TABLE 1:
Key [0] Key [1] Key [2]...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • DES (Data Encryption Standard)
  • Pic18
  • PIC18
  • Pic18
  • Data
  • Datos
  • Datos
  • datos

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS