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

正文內(nèi)容

應(yīng)用密碼學(xué)課程設(shè)計(jì)-rsa加密解密的設(shè)計(jì)與實(shí)現(xiàn)(文件)

 

【正文】 flag) { for(unsigned long j=2。 } } } if(flag) { return 1。q) { label: while(1) { p=foo()。amp。 } } while(1) { q=foo()。amp。 } } if(p!=q) { coutp=pendl。 } int gcd(int x,int y) { int t。 } return x。//求解 n, phi = (p 1) * ( q 1 )。 if(gcd(e,phi)==1amp。e=300amp。e!=p) break。 。 cout endl。 cout endl。 i MAXLENGTH。 jMAXLENGTH。 while(count 0) {//對(duì)明文進(jìn)行加密 Ciphertext =( clear) ^ e mod n Ciphertext[j] = (Ciphertext[j] * clear[j]) % n。//實(shí)際密文長(zhǎng)度 for(int k=0。 } ////////////////////////////////////////////////////////////// //以下為解密算法 void Decryption() {//解密算法 int pp,kk。 int count。 u++) { cin Ciphertext1[u]。 for(int j = 0。 count 。 k ++) cout DecryptionText[k] 。 while(sign==1) { cout——————————————————endl。 cout endl。 int choice。 case 2: Decryption()。 default: cout輸出錯(cuò)誤重新輸入 endl。 case 0: sign=0。 switch(chioce) { case 1: Encryption()。 cout——————————————————endl。 cout 由 李正熹 李鑫 共同完成 endl。 } void main() { int sign=1。 for( int k = 0。 j++) { count = pp。 } cout輸入密鑰解密 (d,n)endl。 for(int u = 0。 i MAXLENGTH。 k ++) cout Ciphertext[k] 。 } } cout 密文為: 。 if( clear[j] == 1 ) break。 int count。 cout 加密前的明文為: 。 cout 公開(kāi)密鑰 Pk = {e,n} = { e , n } endl。 if( d0 (int)d0 == 0 ) break。 float d0。e!=qamp。e=100amp。 cout 請(qǐng)從 [0, phi 1 ]中選擇一個(gè)與 phi 隨機(jī)生成互素的數(shù) e: 。 tiqu(p,q)。 x=y。 } else goto label。\t39。amp。\t39。amp。 } unsigned long tiqu(unsigned long amp。j++) { if(b%j==0) { flag=0。 return random。//分別用于存放加 //密前的明 //文和加密后的密文 long DecryptionText[MAXLENGTH]。 //兩個(gè)大素?cái)?shù) int n, phi。這次課程設(shè)計(jì)的不足是還沒(méi)有完全完成課程設(shè)計(jì)所需要的任務(wù)要求 ,寫(xiě)的程序還是略微有點(diǎn)簡(jiǎn)單化了 ,可能自己能力還是有限,在靜候的時(shí)間里還需要更加的磨練才行。 而在大素?cái)?shù)生成時(shí),可以生成非常大的素?cái)?shù),但是在加密時(shí),因
點(diǎn)擊復(fù)制文檔內(nèi)容
畢業(yè)設(shè)計(jì)相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1