?? aes.h
字號:
/* aes.h */
/*
* Copyright (C) 2005
* Akira Iwata & Masayuki Sato
* Akira Iwata Laboratory,
* Nagoya Institute of Technology in Japan.
*
* All rights reserved.
*
* This software is written by Masayuki Sato.
* And if you want to contact us, send an email to Kimitake Wakayama
* (wakayama@elcom.nitech.ac.jp)
*
* 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. All advertising materials mentioning features or use of this software must
* display the following acknowledgment:
* "This product includes software developed by Akira Iwata Laboratory,
* Nagoya Institute of Technology in Japan (http://mars.elcom.nitech.ac.jp/)."
*
* 4. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by Akira Iwata Laboratory,
* Nagoya Institute of Technology in Japan (http://mars.elcom.nitech.ac.jp/)."
*
* THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
* AKIRA IWATA LABORATORY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
* SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
* IN NO EVENT SHALL AKIRA IWATA LABORATORY BE LIABLE FOR ANY SPECIAL,
* INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
/* ************* data type define ************************* */
int type,keytype;
int key[32];
int word[4][120];
int statemt[32];
int nb,nk,round;
/* key generate */
int MakeKey(void);
int Key_out(int *,int);
int KeySchedule(int ,int *);
int SubByte(int);
/* encrypto decrypto */
int TestData(int *,int);
void ByteSub_ShiftRow(int *,int);
void InversShiftRow_ByteSub(int *,int);
int MixColumn_AddRoundKey(int *,int ,int);
int AddRoundKey_InversMixColumn(int *,int,int);
int AddRoundKey(int *,int,int);
int encrypt(int *,int *,int);
int decrypt(int *,int *,int);
/* no screen out */
int encrypto(int *,int *,int);
int decrypto(int *,int *,int);
/* for ecb or cbc */
void ecb_encrypto(int *,int);
void ecb_decrypto(int);
void cbc_encrypto(int *,int,int *);
void cbc_decrypto(int);
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -