aes.h
Go to the documentation of this file.
00001 #ifndef __MSP430WARE_AES_H__
00002 #define __MSP430WARE_AES_H__
00003 
00004 //*****************************************************************************
00005 //
00006 //The following are the defines to include the required modules for this
00007 //peripheral in msp430xgeneric.h file
00008 //
00009 //*****************************************************************************
00010 #define __MSP430_HAS_AES__
00011 
00012 //*****************************************************************************
00013 //
00014 //The following value can be passed to AES_clearInterruptFlag(), AES_enableInterrupt(),
00015 // AES_disableInterrupt()
00016 //
00017 //*****************************************************************************
00018 #define AES_READY_INTERRUPT AESRDYIE
00019 
00020 //*****************************************************************************
00021 //
00022 //The following value can be returned by AES_getErrorFlagStatus
00023 //
00024 //*****************************************************************************
00025 #define AES_ERROR_OCCURRED      AESERRFG
00026 #define AES_NO_ERROR            0x00
00027 
00028 //*****************************************************************************
00029 //
00030 //The following value can be passed to AES_enableInterrupt()
00031 //
00032 //*****************************************************************************
00033 #define         AES_getEncryptedData    AES_getDataOut
00034 #define         AES_getDecryptedData    AES_getDataOut
00035 
00036 
00037 //*****************************************************************************
00038 //
00039 //The following value is returned by the AES_isBusy() API
00040 //
00041 //*****************************************************************************
00042 #define AES_BUSY                AESBUSY
00043 #define AES_NOT_BUSY    0x00
00044 
00045 //*****************************************************************************
00046 //
00047 //The following value can be passed to AES_enableInterrupt()
00048 //
00049 //*****************************************************************************
00050 #define AES_INTERRUPT_ENABLE AESRDYI
00051 
00052 //*****************************************************************************
00053 //
00054 //Prototypes for the APIs.
00055 //
00056 //*****************************************************************************
00057 unsigned char AES_setCipherKey (unsigned int baseAddress,
00058          const unsigned char * CipherKey
00059          );
00060 unsigned char AES_encryptData (unsigned int baseAddress,
00061         const unsigned char * Data, 
00062         unsigned char * encryptedData);
00063 unsigned char AES_decryptDataUsingEncryptionKey (unsigned int baseAddress,
00064         const unsigned char * Data, 
00065         unsigned char * decryptedData);
00066 unsigned char AES_decryptData (unsigned int baseAddress,
00067         const unsigned char * Data, 
00068         unsigned char * decryptedData);
00069 unsigned char AES_generateFirstRoundKey (unsigned int baseAddress,
00070         const unsigned char * CipherKey);
00071 void AES_clearInterruptFlag (unsigned int baseAddress );
00072 unsigned long AES_getInterruptFlagStatus (unsigned int baseAddress);
00073 void AES_enableInterrupt (unsigned int baseAddress);
00074 void AES_disableInterrupt (unsigned int baseAddress);
00075 void AES_reset (unsigned int baseAddress);
00076 unsigned char AES_startEncryptData (unsigned int baseAddress,
00077         const unsigned char * Data, 
00078         unsigned char * encryptedData);
00079 unsigned char AES_startDecryptDataUsingEncryptionKey (
00080         unsigned int baseAddress, 
00081         const unsigned char * Data);
00082 unsigned char AES_startDecryptData (unsigned int baseAddress,
00083         const unsigned char * Data);
00084 unsigned char AES_startGenerateFirstRoundKey (unsigned int baseAddress,
00085         const unsigned char * CipherKey);
00086 unsigned char  AES_getDataOut(unsigned int baseAddress,
00087                                                         unsigned char *OutputData
00088                                                         );
00089 unsigned char AES_isBusy (unsigned int baseAddress);
00090 void AES_clearErrorFlag (unsigned int baseAddress );
00091 unsigned long AES_getErrorFlagStatus (unsigned int baseAddress);
00092 #endif
00093 

Copyright 2012, Texas Instruments Incorporated