freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

畢業(yè)設(shè)計-des加密算法分析(參考版)

2024-12-04 13:22本頁面
  

【正文】 printf(\n)。 puts(after encrypting:)。 des_setkey(key)。 printf(\n)。 puts(please input your words)。 printf(\n)。},str[8]。,39。,39。,39。,39。,39。,39。 } void main() { char key[8]={39。ibits。 } void bittobyte(char *out,const bool *in,int bits) { memset(out,0,(bits+7)/8)。i++) 29 out[i]=(in[i/8](i%8)) amp。 } void bytetobit(bool *out,const char *in,int bits) { for(int i=0。 memcpy(in,in+loop,lenloop)。 } void rotatel(bool *in,int len,int loop) { static bool tmp[256]。ilen。 memcpy(out,tmp,len)。ilen。 } } void transform(bool *out,bool *in,const char *table,int len) { static bool tmp[256]。 bytetobit(out,amp。i++,in+=6,out+=4) { j=(in[0]1)+in[5]。 } void s_func(bool out[32],const bool in[48]) { for(char i=0,j,k。 s_func(in,mr)。 transform(mr,in,e_table,48)。 transform(subkey[i],k,pc2_table,48)。i++) { rotatel(kl,28,loop_table[i])。 for(int i=0。 bytetobit(k,key,64)。k[0], *kr=amp。 bittobyte(out,m,64)。 memcpy(ri,tmp,32)。 f_func(li,subkey[i])。i=0。 memcpy(li,tmp,32)。 f_func(ri,subkey[i])。i16。 transform(m,m,ip_table,64)。m[32]。//16圈子密鑰 void des_run(char out[8],char in[8], bool type) { static bool m[64],tmp[32],*li=amp。 //S盒 const static char s_box[8][4][16]={ //s1 14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5, 9, 0, 7, 26 0, 15, 7, 4, 14, 2, 13, 1, 10, 6, 12, 11, 9, 5, 3, 8, 4, 1, 14, 8, 13, 6, 2, 11, 15, 12, 9, 7, 3, 10, 5, 0, 15, 12, 8, 2, 4, 9, 1, 7, 5, 11, 3, 14, 10, 0, 6, 13, //s2 15, 1, 8, 14, 6, 11, 3, 4, 9, 7, 2, 13, 12, 0, 5, 10, 3, 13, 4, 7, 15, 2, 8, 14, 12, 0, 1, 10, 6, 9, 11, 5, 0, 14, 7, 11, 10, 4, 13, 1, 5, 8, 12, 6, 9, 3, 2, 15, 13, 8, 10, 1, 3, 15, 4, 2, 11, 6, 7, 12, 0, 5, 14, 9, //s3 10, 0, 9, 14, 6, 3, 15, 5, 1, 13, 12, 7, 11, 4, 2, 8, 13, 7, 0, 9, 3, 4, 6, 10, 2, 8, 5, 14, 12, 11, 15, 1, 13, 6, 4, 9, 8, 15, 3, 0, 11, 1, 2, 12, 5, 10, 14, 7, 1, 10, 13, 0, 6, 9, 8, 7, 4, 15, 14, 3, 11, 5, 2, 12, //s4 7, 13, 14, 3, 0, 6, 9, 10, 1, 2, 8, 5, 11, 12, 4, 15, 13, 8, 11, 5, 6, 15, 0, 3, 4, 7, 2, 12, 1, 10, 14, 9, 10, 6, 9, 0, 12, 11, 7, 13, 15, 1, 3, 14, 5, 2, 8, 4, 3, 15, 0, 6, 10, 1, 13, 8, 9, 4, 5, 11, 12, 7, 2, 14, //s5 2, 12, 4, 1, 7, 10, 11, 6, 8, 5, 3, 15, 13, 0, 14, 9, 14, 11, 2, 12, 4, 7, 13, 1, 5, 0, 15, 10, 3, 9, 8, 6, 4, 2, 1, 11, 10, 13, 7, 8, 15, 9, 12, 5, 6, 3, 0, 14, 11, 8, 12, 7, 1, 14, 2, 13, 6, 15, 0, 9, 10, 4, 5, 3, //s6 12, 1, 10, 15, 9, 2, 6, 8, 0, 13, 3, 4, 14, 7, 5, 11, 10, 15, 4, 2, 7, 12, 9, 5, 6, 1, 13, 14, 0, 11, 3, 8, 9, 14, 15, 5, 2, 8, 12, 3, 7, 0, 4, 10, 1, 13, 11, 6, 4, 3, 2, 12, 9, 5, 15, 10, 11, 14, 1, 7, 6, 0, 8, 13, //s7 4, 11, 2, 14, 15, 0, 8, 13, 3, 12, 9, 7, 5, 10, 6, 1, 13, 0, 11, 7, 4, 9, 1, 10, 14, 3, 5, 12, 2, 15, 8, 6, 1, 4, 11, 13, 12, 3, 7, 14, 10, 15, 6, 8, 0, 5, 9, 2, 6, 11, 13, 8, 1, 4, 10, 7, 9, 5, 0, 15, 14, 2, 3, 12, //s8 13, 2, 8, 4, 6, 15, 11, 1, 10, 9, 3, 14, 5, 0, 12, 7, 1, 15, 13, 8, 10, 3, 7, 4, 12, 5, 6, 11, 0, 14, 9, 2, 7, 11, 4, 1, 9, 12, 14, 2, 0, 6, 10, 13, 15, 3, 5, 8, 2, 1, 14, 7, 4, 10, 8, 13, 15, 12, 9, 0, 3, 5, 6, 11 27 }。 //pc2選位表 const static char pc2_table[48]={ 14,17,11,24,1,5,3,28, 15,6,21,10,23,19,12,4, 26,8,16,7,27,20,13,2, 41,52,31,37,47,55,30,40, 51,45,33,48,44,49,39,56, 34,53,46,42,50,36,29,32 }。 //P換位表 const static char p_table[32]={16,7,20,21,29,12,28,17,1,15,23,26,5,18,31,10,2,8,24,14,32,27,3,9,19,13,30,6,22,11,4,25}。 //逆置換 IP1表 const static char ipr_table[64]={40,8,48,16,56,24,64,32,39,7,47,15,55,23,63,31,38,6,46,14,54,22,62,30,37,5,45,13,53,21,61,29,36,4,44,12,52,20,60,28,35,3,43,11, 51,19,59,27,34,2,42,10,50,18,58,26,33,1,41,9,49,17,57,25}。 //位組轉(zhuǎn)換成字節(jié)組 static void bittobyte(char *out, const bool *in, int bits)。//異或 static void rotatel(bool *in, int len, int loop)。//s盒代替 //變換 static void transform(bool *out, bool *in, const char *table, int len)。 static void f_func(bool in[32],const bool ki[48])。//ENCRYPT:加密, DECRYPT:解密 void des_run(char out[8],char in[8],bool type=encrypt)。 本次設(shè)計是我工作前一次很好的演練和實踐的機(jī)會,是培養(yǎng)獨(dú)立思考問題和自學(xué)能力的鍛煉,使我意識到必須努力的學(xué)習(xí)才能在工作中體現(xiàn)自己的價值,適應(yīng)社會的需要。本來已經(jīng)耳熟能詳?shù)拇a,一到 IDE 中書寫,卻提筆忘字,這充分的反應(yīng)了我平時的基本功不扎實,常用代碼的不熟練。加密作為一種用來保護(hù)用戶內(nèi)部第一道安全屏障,始終受到人們的關(guān)注和重視,并成為網(wǎng)絡(luò)安全產(chǎn)品的首選。 參考文獻(xiàn) [1]Richard Spillman著 ,葉阮健 ,曹英 ,張長富譯 .經(jīng)典密碼學(xué)與現(xiàn)代密碼學(xué) .北京:清華大學(xué)出版社 ,2021,124133. [2]Oded of Cryptography Volume Ⅱ Basic Applications[M],BEIJING:Publishing House of Electronics Industry,2021 年 , 375379. [3]賴溪松,韓亮,張真誠著 .計算機(jī)密碼學(xué)及其應(yīng)用 [M].北京:國防工業(yè)出版社, 2021, 4349. [4], The Data Encryption Standard (DES) and its strength against attacks[J].IBM Journal of Research and Development, 38(3),.243250. [5]孫淑玲編著 ,應(yīng)用密碼學(xué) .北京:清華大學(xué)出版社, 2021年, 1119. [6] and , DES is not a group,Advances in CryptologyCRYPTO ’ 92,Lecture Notes in Computer Science 740,SpringerVerlag,1993, 512520. [7]盧開橙編 著 .計算機(jī)密碼學(xué) — 計算機(jī)網(wǎng)絡(luò)中的數(shù)據(jù)保密與安全 [M].北京:清華大學(xué)出版社, 2021年, .3848. 23 結(jié)束語 經(jīng)過一個多月的學(xué)習(xí), 在老師和同學(xué)的支持與幫助之下 , 我順利地完成了 這次論文設(shè)計。這個密碼分析并未對 DES的安全性產(chǎn)生實際影響,由于這個攻擊需要數(shù)目極大的明 密文對,在現(xiàn)實世界中一個敵手很難積攢下用同一密鑰加密的如此眾多的明 密文對。在 1994年,一個實際的線性密碼分析 由其發(fā)明者 22 Matsui提出。 DES 算法除了差分密碼分析另外兩種
點擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1