aes256.h
Go to the documentation of this file.
00001 #ifndef __MSP430WARE_AES256_H__
00002 #define __MSP430WARE_AES256_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_AES256__
00011 
00012 //*****************************************************************************
00013 //
00014 //The following value can be passed to AES256_clearInterruptFlag(),
00015 //AES256_enableInterrupt(), AES256_disableInterrupt()
00016 //
00017 //*****************************************************************************
00018 #define AES256_READY_INTERRUPT AESRDYIE
00019 
00020 //*****************************************************************************
00021 //
00022 //The following value can be returned by AES256_getErrorFlagStatus
00023 //
00024 //*****************************************************************************
00025 #define AES256_ERROR_OCCURRED   AESERRFG
00026 #define AES256_NO_ERROR                 0x00
00027 
00028 //*****************************************************************************
00029 //
00030 //The following value can be passed to AES256_enableInterrupt()
00031 //
00032 //*****************************************************************************
00033 #define         AES_getEncryptedData    AES_getDataOut
00034 #define         AES_getDecryptedData    AES_getDataOut
00035 
00036 //*****************************************************************************
00037 //
00038 //The following value is returned by the AES256_isBusy() API
00039 //
00040 //*****************************************************************************
00041 #define AES256_BUSY             AESBUSY
00042 #define AES256_NOT_BUSY 0x00
00043 
00044 //*****************************************************************************
00045 //
00046 //The following value can be passed to AES256 functions as KeyLength
00047 //
00048 //*****************************************************************************
00049 #define Key_128BIT      128
00050 #define Key_192BIT      192
00051 #define Key_256BIT      256
00052 
00053 //*****************************************************************************
00054 //
00055 //The following value can be passed to AES_enableInterrupt()
00056 //
00057 //*****************************************************************************
00058 #define AES_INTERRUPT_ENABLE AESRDYI
00059 
00060 //*****************************************************************************
00061 //
00062 //Prototypes for the APIs.
00063 //
00064 //*****************************************************************************
00065 unsigned char AES256_setCipherKey (unsigned int baseAddress,
00066         const unsigned char * CipherKey, 
00067  unsigned int KeyLength);
00068 unsigned char AES256_encryptData (unsigned int baseAddress,
00069         const unsigned char * Data, 
00070         unsigned char * encryptedData);
00071 unsigned char AES256_decryptDataUsingEncryptionKey (unsigned int baseAddress,
00072         const unsigned char * Data, 
00073         unsigned char * decryptedData);
00074 unsigned char AES256_decryptData (unsigned int baseAddress,
00075         const unsigned char * Data, 
00076         unsigned char * decryptedData);
00077 unsigned char AES256_generateFirstRoundKey (unsigned int baseAddress,
00078         const unsigned char * CipherKey);
00079 void AES256_clearInterruptFlag (unsigned int baseAddress );
00080 unsigned long AES256_getInterruptFlagStatus (unsigned int baseAddress);
00081 void AES256_enableInterrupt (unsigned int baseAddress);
00082 void AES256_disableInterrupt (unsigned int baseAddress);
00083 void AES256_reset (unsigned int baseAddress);
00084 unsigned char AES256_startEncryptData (unsigned int baseAddress,
00085         const unsigned char * Data, 
00086         unsigned char * encryptedData);
00087 unsigned char AES256_startDecryptDataUsingEncryptionKey (
00088         unsigned int baseAddress, 
00089         const unsigned char * Data);
00090 unsigned char AES256_startDecryptData (unsigned int baseAddress,
00091         const unsigned char * Data);
00092 unsigned char AES256_startGenerateFirstRoundKey (unsigned int baseAddress,
00093         const unsigned char * CipherKey);
00094 unsigned char  AES256_getDataOut(unsigned int baseAddress,
00095                                                         unsigned char *OutputData
00096                                                         );
00097 unsigned char AES256_isBusy (unsigned int baseAddress);
00098 void AES256_clearErrorFlag (unsigned int baseAddress );
00099 unsigned long AES256_getErrorFlagStatus (unsigned int baseAddress);
00100 #endif
00101 

Copyright 2012, Texas Instruments Incorporated