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

正文內(nèi)容

信息安全實驗報告des加密算法-wenkub.com

2025-07-31 09:31 本頁面
   

【正文】 (2)通過這次結(jié)合實際解決加解密的過程,認識很深刻,感覺到了DES的重要性。 return 0。 } int main() { DES_Encrypt(,)。 } else{//無填充 fwrite(plainBlock,sizeof(char),8,plain)。 count++){ if(plainBlock[count] != 39。 if(times fileLen){ fwrite(plainBlock,sizeof(char),8,plain)。 //取文件指針當前位置 rewind(cipher)。 //將密鑰轉(zhuǎn)換為二進制流 Char8ToBit64(keyBlock,bKey)。 ElemType subKeys[16][48]。 int count,times = 0。 } fclose(plain)。,7 count)。 while(!feof(plain)){ //每次讀8個字節(jié),并返回成功讀取的字節(jié)數(shù) if((count = fread(plainBlock,sizeof(char),8,plain)) == 8){ DES_EncryptBlock(plainBlock,subKeys,cipherBlock)。 } if((cipher = fopen(cipherFile,wb)) == NULL){ return CIPHER_FILE_OPEN_ERROR。 ElemType plainBlock[8],cipherBlock[8],keyBlock[8]。 Bit64ToChar8(cipherBits,plainBlock)。 //P置換 DES_P_Transform(copyRight)。 t){ memcpy(copyRight,cipherBits+32,32)。 Char8ToBit64(cipherBlock,cipherBits)。 return 0。 //將明文左半部分與右半部分進行異或 DES_XOR(plainBits,copyRight,32)。 //將右半部分進行擴展置換,從32位擴展到48位 DES_E_Transform(copyRight)。 //初始置換(IP置換) DES_IP_Transform(plainBits)。 } //加密單個分組 int DES_EncryptBlock(ElemType plainBlock[8], ElemType subKeys[16][48], ElemType cipherBlock[8]){ ElemType plainBits[64]。 memcpy(temp,left,32)。 data[cur2+3] = outputamp。 data[cur2+1] = (outputamp。 row = (data[cur1+1]3) + (data[cur1+2]2) + (data[cur1+3]1) + data[cur1+4]。 t 8。 } //S盒置換 int DES_SBOX(ElemType data[48]){ int t。 for(t = 0。 t++){ temp[t] = data[P_Table[t]]。 } //P置換 int DES_P_Transform(ElemType data[32]){ int t。 t 48。 return 0。 for(t = 0。 } memcpy(data,temp,64)。 ElemType temp[64]。 t++){//16輪跌代,產(chǎn)生16個子密鑰 DES_ROL(temp,MOVE_TIMES[t])。 int t。 //后28位移動 memcpy(data+28,data+28+time,28time)。 //保存將要循環(huán)移動到右邊的位 memcpy(temp,data,time)。 t 48。 t++){ tempbts[t] = key[PC_1[t]]。 } return 0。 memset(ch,0,8)。 t 8。 t++){ *ch |= *(bit + t)t。 } return 0。 for(t = 0。 //置換選擇1 int PC_1[56] = {56,48,40,32,24,16,8, 0,57,49,41,33,25,17, 9,1,58,50,42,34,26, 18,10,2,59,51,43,35, 62,54,46,38,30,22,14, 6,61,53,45,37,29,21, 13,5,60,52,44,36,28, 20,12,4,27,19,11,3}。 //逆初始置換表IP^1 int IP_1_Table[64] = {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
點擊復(fù)制文檔內(nèi)容
語文相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1