【正文】
d do it, said Mrs. March, smiling as if satisfied. You shall all go and help me, and when we e back we will have bread and milk for breakfast, and make it up at dinnertime. They were soon ready, and the procession set out. Fortunately it was early, and they went through back streets, so few people saw them, and no one laughed at the queer party. A poor, bare, miserable room it was, with broken windows, no fire, ragged bedclothes, a sick mother, wailing baby, and a group of pale, hungry children cuddled under one old quilt, trying to keep warm. How the big eyes stared and the blue lips smiled as the girls went in. Ach, mein Gott! It is good angels e to us! said the poor woman, crying for joy. Funny angels in hoods and mittens, said Jo, and set them to laughing. In a few minutes it really did seem as if kind spirits had been at wor k there. Hannah, who had carried wood, made a fire, and stopped up the broken panes with old hats and her own cloa k. Mrs. March gave the mother tea and gruel, and forted her with promises of help, while she dressed the little baby as tenderly as if it had been her own. T he girls meantime spread the table, set the children round the fire, and fed them like so many hungry birds, laughing, talking, and trying to understand the funny broken English. Das ist gut! Die Engel kinder! cried the poor things as they ate and warmed their purple hands at the fortable blaze. T he girls had never been called angel children before, and thought it very agreeable, especially Jo, who had been considered a `Sancho39。s Mother. Hide the basket, quick! cried Jo, as a door slammed and steps sounded in the hall. Amy came in hastily, and looked rather abashed when she saw her sisters all waiting for her. Where have you been, and what are you hiding behind you? asked Meg, surprised to see, by her hood and cloak, that lazy Amy had been out so early. Don39。s gone and put `Mother39。 關(guān)于學(xué)位論文使用權(quán)和研究成果知識(shí)產(chǎn)權(quán)的說(shuō)明: 本人完全了解成都信息工程學(xué)院有關(guān)保管使用學(xué)位論文的規(guī)定,其中包括: ( 1)學(xué)校有權(quán)保管并向有關(guān)部門(mén)遞交學(xué)位論文的原件與復(fù)印件。但 由于時(shí)間比較緊張,加上自己本身在語(yǔ)言編程方面的能力比 較有限,該軟件還存在著一定的問(wèn)題。 5未選取待加密文件路徑文件名 encode_address = “” 。數(shù)據(jù)加密完成該軟件也有相應(yīng)的提示入圖所示。 圖 4 加密文件界面 按照上述要求,我們對(duì)一個(gè)位與該系統(tǒng)的 F: \修改要求的 .txt 的純文本文件進(jìn)行加密操作。 } catch (Exception error) { (操作有誤: + , 警告 , , )。//從輸入文件中讀取流,然后解密到輸出文件中 while (plete totlen) { len = (bin, 0, 100)。 FileStream fout = new FileStream(outName , , )。//獲得要解密的文件名 string outName = 。 //從輸入文件中讀取流 , 然后加密到輸入文件中 while (plete totlen) { len = (bin, 0, 100)。 FileStream fout = new FileStream(outName , , )。 //獲得保存文件名 string outName = 。 3 軟件設(shè)計(jì)與實(shí)現(xiàn) 本軟件設(shè)計(jì)和實(shí)現(xiàn)的功能主要有兩個(gè)方面,一是對(duì)文件的加密,二是對(duì)加密的文件的解密工作。而 56 位長(zhǎng)的密鑰的窮舉空間為 256,這意味著如果一臺(tái)計(jì)算機(jī)的速度 是每秒檢測(cè)一百萬(wàn)個(gè)密鑰,則他搜索完全部密鑰就需要將近 2 285 年的時(shí)間,可見(jiàn)這是難以實(shí)現(xiàn)的。 (8字節(jié)的倍數(shù) ) 功能 : 生成解密密鑰 , 把待解密文分割成 64 位的塊 , 把第 i1 層解密后的 明文 作為第 i 層解密 密文輸入 , 根據(jù)用戶指定的解密層數(shù)進(jìn)行 n 層解密 , 最終生成的明文存放在 data 所指向 內(nèi)存中 。 DES 算法的解密過(guò)程是一樣的,區(qū)別僅在于第一次迭代 時(shí)用子密鑰 K15,第二次是 K14, ? ,最后一次用 K0,算法本 身并沒(méi)有任何變化。 現(xiàn)設(shè)輸入為: D=D1D2D3D4D5D6 令:列 =D2D3D4D5,行 =D1D6 然后在 S1 表中查得對(duì)應(yīng)的數(shù),以 4位二進(jìn)制表示,此即為選擇函數(shù) S1 的輸出 。 逆置換正好是初始置換的逆運(yùn)算。 DES算法詳述 DES 算法把 64 位的明文輸入塊變?yōu)?64 位的密文輸出塊,他所使用的密鑰也是 64 位, DES 對(duì) 64 位的明文分組進(jìn)行操作 。 DES 算法的入口參數(shù)有 3個(gè): Key, Data, Mode。一個(gè)好的分組密碼應(yīng)該是既難破譯又容易實(shí)現(xiàn),即加密函數(shù) E ( 通過(guò)C開(kāi)發(fā)的軟件是個(gè)偽可執(zhí)行程序,只要該用戶安裝有開(kāi)發(fā)相同的環(huán)境,就可以直接運(yùn)行。普通數(shù)字簽名算法有 RSA 數(shù)字簽名算法、 ElGamal 數(shù)字簽名算法、 FiatShamir 數(shù)字簽名算法、 GuillouQuisquarter 數(shù) 字 簽 名 算 法 、 Schnorr 數(shù) 字 簽 名 算 法 、OngSchnorrShamir 數(shù)字簽名算法、美 國(guó)的數(shù)字簽名標(biāo)準(zhǔn) /算法( DSS/DSA),橢圓曲線數(shù)字簽名算法和有限自動(dòng)機(jī)數(shù)字簽名算法等。其主要研究目標(biāo)有兩個(gè),一個(gè)是推導(dǎo)欺騙者欺騙成功的概率的下界;另一個(gè)是構(gòu)造欺騙者欺騙成功的概率盡可能小的認(rèn)證碼。 在序列密碼的分析方法方面,提出了分別征服攻擊 方法、線性攻擊方法、線性伴隨式攻擊方法、線性一致性攻擊方法、快速相關(guān)攻擊方法、線性時(shí)序邏輯逼近方法、熵漏分析方法等多種有效的分析方法。歐洲(稱之為 Nessie 計(jì)劃)和日本也不甘落后啟動(dòng)了相關(guān)標(biāo)準(zhǔn)的征集和制定,這些計(jì)劃看起來(lái)比美國(guó)的計(jì)劃更宏偉。 1999 年 8 月, NIST 從中篩選出 5 個(gè)候選者。目前 768bit 模長(zhǎng)的RSA 體制已不安全。用抽象的觀點(diǎn)來(lái)看,公鑰密碼體制就是一種陷門(mén)單向函數(shù)。 ( C)。正是這種對(duì)信息的機(jī)密性與真實(shí)性的需求,很有必要設(shè)計(jì)一個(gè)加密軟件對(duì)其敏感信息加密。 關(guān)鍵詞 : DES 加密器; (C);文件加密;文件解密 The Implementation of a Document Encrypter Based on C Abstract With the rapid development of the puter and munication technologies, large mount of sensitive information are exchanged on the public munications facilities or puter works. Especially under the situation of the widespread of the Inter applications, such as Emerce and Egovernment, more and more information, such as bank account numbers, personal privacy, need to be encrypted. Such requirement for the secrecy and authenticity makes it necessary to develop an encrypter to encrypt the sensitive information. This system, developed with (C ), primarily includes such functions as setting the password of the document to be encrypted, encrypting the document, verifying the decryption password and decrypting the document. What needs to expand include encrypting and decrypting the work data or data on hosts。這兩個(gè)分支既相互對(duì)立又相互依存,正是由于這種對(duì)立統(tǒng)一關(guān)系,才推動(dòng)了密碼學(xué)自身的發(fā)展。 目前比較流行的公鑰密碼體制主要有兩類:一類是基于大整數(shù)因子分解問(wèn)題的,其中最典型的代表是 RSA 體制。 目前,公鑰密碼的重點(diǎn)研究方向?yàn)椋? 1)用于設(shè)計(jì)公鑰密碼的新的數(shù)學(xué)模型和陷門(mén)單向函數(shù)的研究; 2)針對(duì)實(shí)際應(yīng)用環(huán)境的公鑰密碼的設(shè)計(jì); 3)公鑰密碼的快速實(shí)現(xiàn)研究,包括算法 優(yōu)化和程序優(yōu)化、軟件實(shí)現(xiàn)和硬件實(shí)現(xiàn); 4)公鑰密碼的安全性評(píng)估問(wèn)題,特別是橢圓曲線公鑰密碼的安全性評(píng)估問(wèn)題 .2 分組密碼 美國(guó)國(guó)家標(biāo)準(zhǔn)技術(shù)研究所( NIST)在 1997 年 1 月 2 日正式宣布了 NIST 計(jì)劃,該計(jì)劃公開(kāi)征集和評(píng)估新的候選標(biāo)準(zhǔn),新的標(biāo)準(zhǔn)稱之為 AES。預(yù)期過(guò)不了多久,只要有人有密碼系統(tǒng),就肯定有 AES。從 20 世紀(jì) 80 年代中期到 90 年代初,序列密碼的研究非常熱,特別是在序列密碼的設(shè)計(jì)方法、序列密碼的安全性度量指標(biāo)、序列密碼的分析方法、用于設(shè)計(jì)序列密碼的各種組件(如密碼布爾函數(shù)的構(gòu)作與分析、非線性資源的生成和分析)等方面取得了一大批有理論和應(yīng)用價(jià)值的成果。另外,雖然沒(méi)有制定序列密碼標(biāo)準(zhǔn),但在一些系統(tǒng)中廣泛使用了序列密碼比如 RC4,用于存儲(chǔ)加密?;诠€密碼體制和私鑰密碼體制都可以獲得數(shù)字簽名,特別是公鑰密碼體制的誕生為數(shù)字簽名的研究和應(yīng)用開(kāi)辟了一條廣闊的道路。歷史上,交戰(zhàn)雙方在通信安全、保密和密碼破譯 方面的優(yōu)勢(shì)均被認(rèn)為是取得戰(zhàn)爭(zhēng)勝利的關(guān)鍵因素之一。 用抽象的觀點(diǎn)來(lái)看,分組密碼就是一種滿足下列條件的映射 E: mKm F S F 2 2 . ′ :對(duì)每個(gè) , E ( DES 是一個(gè)對(duì)稱算法:加密和解密用的是同一個(gè)算法(除 密鑰編排不同以外)。通過(guò)定期在通信網(wǎng)絡(luò)的源 端和目的端同時(shí)改用新的Key,便能更進(jìn)一步提高數(shù)據(jù)的保密性,這正是現(xiàn)在金融界交易網(wǎng) 絡(luò)的流行作法。 表 1初始置換 58, 50, 42, 34, 26, 18, 1