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

正文內(nèi)容

大隨機(jī)數(shù)生成器算法的研究與實(shí)現(xiàn)—計(jì)算機(jī)畢業(yè)設(shè)計(jì)-資料下載頁

2025-08-06 08:17本頁面
  

【正文】 etKey()。 //產(chǎn)生密鑰并保存在KK1,KK2中 CDES MyDes。 (DTi, KK1, KK2, Result_1)。 //三重DES加密(EDE)}函數(shù)名: Step_2函數(shù)功能: 產(chǎn)生隨機(jī)數(shù)第2步(見圖1)輸入: Result_1,Vi(第一次輸入的隨機(jī)數(shù))輸出: Result_2[64]void CCreRndNum::Step_2(){ int i。//之前已得到V0 for (i = 0。 i 64。 i++) { Result_2[i] = Vi[i] ^ Result_1[i]。 }}函數(shù)名: Step_3函數(shù)功能: 產(chǎn)生隨機(jī)數(shù)第3步(見圖1)輸入: Result_2,K1,K2(密鑰)輸出: Result_3[64]調(diào)用函數(shù): MyDes::EDE()void CCreRndNum::Step_3(){CDES MyDes。(Result_2, KK1, KK2, Result_3)。} 函數(shù)名: Step_4函數(shù)功能: 產(chǎn)生隨機(jī)數(shù)第4步 異或(見圖1)輸入: Result_1,Result_3輸出: Result_4[64]void CCreRndNum::Step_4(){ int i。 for (i = 0。 i 64。 i++) { Result_4[i] = Result_1[i] ^ Result_3[i]。 }}函數(shù)名: Step_5函數(shù)功能: 產(chǎn)生隨機(jī)數(shù)第5步(見圖1)輸入: Result_4,K1,K2(密鑰)輸出: Result_5[64]調(diào)用函數(shù): MyDes::EDEvoid CCreRndNum::Step_5(){CDES MyDes。 (Result_4, KK1, KK2, Result_5)。}函數(shù)名: GetRandNumber函數(shù)功能: 產(chǎn)生隨機(jī)數(shù),保存在dwRndNum[33]中.輸入: 無輸出: dwRndNum[33]備注: 輸出1025位二進(jìn)制,故用33個DWORD型的數(shù)存放隨機(jī)數(shù).BOOL CCreRndNum::GetRandNumber(DWORD dwRndNum[]){ GetVi()。 int i,m。 for (m = 0。 m 17。 m++) //17輪產(chǎn)生1088(取1025)位的Ri { Step_1()。 Step_2()。 Step_3()。 for (i = 0。 i 64。 i++) { Ri[(m 6) + i] = Result_3[i]。 //保存到1024bit的Ri中 } Step_4()。 Step_5()。 for (i = 0。 i 64。 i++) //Vi+1自動賦給Vi { Vi[i] = Result_5[i]。 } } // end for UINT temp。 for ( i = 0。 i 1024。 i++) //取第1~1024位 { temp = (UINT)(i / 32)。 if(i % 32 == 0) dwRndNum[temp] = dwRndNum[temp] | (DWORD)Ri[i]。 else dwRndNum[temp] = dwRndNum[temp] 1 | (DWORD)Ri[i]。 } for(i=0。i32。i++) { while(dwRndNum[i]2147483648) {dwRndNum[i]+=dwRndNum[i]。} } dwRndNum[32] amp。= (DWORD)Ri[1024]。 //取第1025位,其余位為0 return TRUE。 } 6 檢驗(yàn)隨機(jī)數(shù)隨機(jī)數(shù)檢驗(yàn)方法有如下幾種:參數(shù)檢驗(yàn),檢驗(yàn)其分布參數(shù)的觀察值與理論值的差異顯著性。均勻性檢驗(yàn),又稱頻率檢驗(yàn),意在檢驗(yàn)偽隨機(jī)數(shù)的經(jīng)驗(yàn)頻率與理論頻率的差異是否顯著。獨(dú)立性檢驗(yàn),即檢驗(yàn)所產(chǎn)生的偽隨機(jī)數(shù)的獨(dú)立性和統(tǒng)計(jì)相關(guān)是否異常,包括相關(guān)關(guān)系檢驗(yàn)和聯(lián)列表檢驗(yàn)等。組合規(guī)律檢測,按隨機(jī)數(shù)出現(xiàn)的先后次序,根據(jù)一定的規(guī)律組合,檢驗(yàn)其組合的觀察值與理值是不否有顯著差異,包括距離檢驗(yàn)和配套檢驗(yàn)等。游程檢驗(yàn),把隨機(jī)數(shù)序列按一定的規(guī)則進(jìn)行分類,分為正負(fù)游程檢驗(yàn)和升降游程檢驗(yàn)等。本程序采用了均勻性檢測,即頻率檢測。由于隨機(jī)數(shù)是由16次循環(huán)得來。并且存放在32個數(shù)組中,所以取其中高位數(shù)組的值就可以判斷是否滿足均勻性檢測。算法示意圖: 隨機(jī)數(shù)除于當(dāng)前隨機(jī)數(shù)產(chǎn)生的次數(shù)如果第一次產(chǎn)生隨機(jī)數(shù),平均值為隨機(jī)數(shù)本身平均值除于隨機(jī)數(shù)產(chǎn)生次數(shù)與次數(shù)1的積兩者相加得到隨機(jī)數(shù)的平均值得到生成器產(chǎn)生的隨機(jī)數(shù) 圖4 檢驗(yàn)隨機(jī)數(shù)足夠隨機(jī)Int bb=0。bb++。 char s[40]。 for (int i =0。i33。i++) { sprintf(s,(%2d) %10lX\r\n,i,dwn[i])。 (s)。 } cc=cc/bb*(bb1)+dwn[31]/bb。 sprintf(s,第%2d次前位平均值為:\n%10lX\n,bb,cc)。 (s)。7 系統(tǒng)測試 第一次多次運(yùn)行程序,如圖:圖5 第一次測試結(jié)果第二次多次運(yùn)行程序,如圖:圖6 第2次測試結(jié)果第三次多次運(yùn)行程序,如圖:圖7 第3次測試結(jié)果結(jié) 論因?yàn)橹鲗?dǎo)程序?qū)Ρ旧砭褪请S機(jī)的數(shù)經(jīng)過多次的三重DES和異或等運(yùn)算,所以能保證隨機(jī)數(shù)的足夠隨機(jī)性,通過16次的循環(huán)也能得到一個組合的大隨機(jī)數(shù),所以能滿足設(shè)計(jì)的需求界面是用VC++實(shí)現(xiàn)與設(shè)計(jì)的一個隨機(jī)數(shù)發(fā)生器,該隨機(jī)數(shù)發(fā)生器能夠通過點(diǎn)擊產(chǎn)生隨機(jī)數(shù)按鈕而相映產(chǎn)生1024位的隨機(jī)數(shù),并且該產(chǎn)生器還記錄每次產(chǎn)生的隨機(jī)數(shù)而求其平均值,能夠很直觀的讓我們檢測到隨機(jī)數(shù)是否隨機(jī)。隨機(jī)數(shù)產(chǎn)生器界面簡單,隨機(jī)數(shù)足夠隨機(jī)并且保證隨機(jī)數(shù)范圍滿足1024位2進(jìn)制數(shù)。由于時間關(guān)系,程序也有一定瑕疵。對程序改進(jìn)的方法:對檢測的方法增加其他的種類,例如參數(shù)檢驗(yàn),游程檢驗(yàn)等方法,畢竟,通過的檢測越多隨機(jī)數(shù)的可靠性就越高。 參考文獻(xiàn)[1][M].北京:機(jī)械工業(yè)出版社,1998。[2] (美)克魯格林斯基(Kruglinski,.).Visual C++ 技術(shù)內(nèi)幕[M].北京:清華大學(xué)出版社,1999。[3] C 中文版全面剖析[M].北京:中國水利水電出版社,2003。[4] Bruce ,算法與C源程序[M]. 北京:機(jī)械工業(yè)出版社,2000。[5][M].北京:清華大學(xué)出版,2000。 [6](美) Steven John 設(shè)計(jì)模式[M]. 北京:中國電力出版社,2005。[7] 林元烈,[M].北京:清華大學(xué)出版社,2003。[8] . 貝達(dá)特,. [M].北京:北京國防工業(yè)出版社,1976。 致 謝本文是在吳震老師的熱情關(guān)心和指導(dǎo)下完成的,他淵博的知識和嚴(yán)謹(jǐn)?shù)闹螌W(xué)作風(fēng)使我受益匪淺,對順利完成本課題起到了極大的作用。在此向他表示我最衷心的感謝!在論文完成過程中,本人還得到了萬武南老師和劉銘贊同學(xué)的熱心幫助,本人向他們表示深深的謝意!最后向在百忙之中評審本文的各位專家、老師表示衷心的感謝!作者簡介:姓 名:張金 性別:男出生年月: 民族:漢 Email: zzjj5482@ 聲 明本論文的工作是 2007年 2 月至2007年 6 月在成都信息工程學(xué)院網(wǎng)絡(luò)工程系完成的。文中除了特別加以標(biāo)注地方外,不包含他人已經(jīng)發(fā)表或撰寫過的研究成果,也不包含為獲得成都信息工程學(xué)院或其他教學(xué)機(jī)構(gòu)的學(xué)位或證書而使用過的材料。除非另有說明,本文的工作是原始性工作。關(guān)于學(xué)位論文使用權(quán)和研究成果知識產(chǎn)權(quán)的說明:本人完全了解成都信息工程學(xué)院有關(guān)保管使用學(xué)位論文的規(guī)定,其中包括:(1)學(xué)校有權(quán)保管并向有關(guān)部門遞交學(xué)位論文的原件與復(fù)印件。(2)學(xué)??梢圆捎糜坝?、縮印或其他復(fù)制方式保存學(xué)位論文。(3)學(xué)??梢詫W(xué)術(shù)交流為目的復(fù)制、贈送和交換學(xué)位論文。(4)學(xué)??稍试S學(xué)位論文被查閱或借閱。(5)學(xué)??梢怨紝W(xué)位論文的全部或部分內(nèi)容(保密學(xué)位論文在解密后遵守此規(guī)定)。除非另有科研合同和其他法律文書的制約,本論文的科研成果屬于成都信息工程學(xué)院。特此聲明! 39。Go away! You mustn39。t look.39。I hesitated, but childhood is a time thickly beset with inprehensible, though important, conventions, so I withdrew a few yards and turned my back. I heard her breathing hard. Then she was crying again. I turned round.39。I can39。t,39。 she said, looking at me fearfully through her tears, so I knelt down to see what I could do about it.39。You mustn39。t ever tell,39。 she said. 39。Never, never! Promise?39。I promised.She was very brave. Nothing more than the puppy noises.When I did succeed in getting the foot free, it looked queer: I mean, it was all twisted and puffy I didn39。t even notice then that it had more than the usual number of toes. . . .I managed to hammer the shoe out of the cleft, and handed it to her. But she found she could not put it on her swollen foot. Nor could she put the foot to the ground. I thought I might carry her on my back, but she was heavier than I expected, and it was clear that we should not get far like that.39。I39。ll have to go and fetch somebody to help,39。 I told her.39。No. I39。ll crawl,39。 she said.I walked beside her, carrying the shoe, and feeling useless. She kept going gamely for a surprisingly long way, but she had to give it up. Her trousers were worn through at the knees, and the knees themselves were sore and bleeding. I had never known anyone, boy or girl, who would have kept on till that pitch。 it awed me slightly. I helped her to stand up on her sound foot, and steadied her while she pointed out where her home was, and the trickle of smoke that marked it. When I looked back she was on all fours again, disappearing into the bushes.I found the house without much difficulty, and knocked, a little nervously. A tall woman answered. She had a fine, handsome face with large bright eyes. Her dress was russet and a little shorter than those most of the women at home wore, but it carried the conventional cross, from neck to hem and breast to breast, in a green that matched the scarf on her head.39。Are you Sophie39。s mother?39。 I asked.She looked at me sharply and frowned. She said, with anxious abruptness:39。What is it?39。I told her.39。Oh!39。 she exclaimed. 39。Her foot!39。She looked hard at me again for a moment, then she leant the broom she was holding against the wall, and asked briskly:39。Where is she?39。I led her by the way I had e. At the sound of her voice Sophie crawled out of the bushes.Her mother looked at the swol
點(diǎn)擊復(fù)制文檔內(nèi)容
法律信息相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1