資源簡介
AES128 C語言實現源碼及應用例程,可用于通信等場合數據加密

代碼片段和文件信息
/*?--COPYRIGHT--BSD
?*?Copyright?(c)?2011?Texas?Instruments?Incorporated
?*?All?rights?reserved.
?*
?*?Redistribution?and?use?in?source?and?binary?forms?with?or?without
?*?modification?are?permitted?provided?that?the?following?conditions
?*?are?met:
?*
?*?*??Redistributions?of?source?code?must?retain?the?above?copyright
?*????notice?this?list?of?conditions?and?the?following?disclaimer.
?*
?*?*??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.
?*
?*?*??Neither?the?name?of?Texas?Instruments?Incorporated?nor?the?names?of
?*????its?contributors?may?be?used?to?endorse?or?promote?products?derived
?*????from?this?software?without?specific?prior?written?permission.
?*
?*?THIS?SOFTWARE?IS?PROVIDED?BY?THE?COPYRIGHT?HOLDERS?AND?CONTRIBUTORS?“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?DISCLAIMED.?IN?NO?EVENT?SHALL?THE?COPYRIGHT?OWNER?OR
?*?CONTRIBUTORS?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.
?*?--/COPYRIGHT--*/
#include?
#include?“TI_aes_128.h“
int?main(?void?)
{
??WDTCTL?=?WDTPW?+?WDTHOLD;?????????????//?Stop?watchdog?timer
??
??unsigned?char?state[]?=?{0x00?0x11?0x22?0x33?0x44?0x55?0x66?0x77?
???????????????????????????????0x88?0x99?0xaa?0xbb?0xcc?0xdd?0xee?0xff};
??//unsigned?char?ciphertext[]?=?{0x69?0xc4?0xe0?0xd8?0x6a?0x7b?0x04?0x30
??//??????????????????????????????0xd8?0xcd?0xb7?0x80?0x70?0xb4?0xc5?0x5a};
??unsigned?char?key1[]???=?{0x00?0x01?0x02?0x03?0x04?0x05?0x06?0x07
???????????????????????????0x08?0x09?0x0a?0x0b?0x0c?0x0d?0x0e?0x0f};
??unsigned?char?key2[]???=?{0x00?0x01?0x02?0x03?0x04?0x05?0x06?0x07
???????????????????????????0x08?0x09?0x0a?0x0b?0x0c?0x0d?0x0e?0x0f};
??
??aes_enc_dec(statekey10);
??aes_enc_dec(statekey21);
??return?0;
}
?
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????20832??2011-12-01?10:01??AES_128\AES_128_Manifest.html
?????文件????????2485??2011-12-01?09:58??AES_128\main_aes_128.c
?????文件????????2445??2011-12-01?09:58??AES_128\main_aes_128_encr_only.c
?????文件?????????404??2011-11-23?11:35??AES_128\README.txt
?????文件????????9505??2011-12-01?09:58??AES_128\TI_aes_128.c
?????文件????????1884??2011-12-01?09:58??AES_128\TI_aes_128.h
?????文件????????5645??2011-12-01?09:58??AES_128\TI_aes_128_encr_only.c
?????文件????????1875??2011-12-01?09:58??AES_128\TI_aes_128_encr_only.h
?????目錄???????????0??2011-12-01?09:59??AES_128\
評論
共有 條評論