【正文】
.... 2 1. 密碼技術(shù)的發(fā)展 ........................................................................... 2 2. 密碼學的主要任務 ....................................................................... 4 3. 密碼系統(tǒng)的安全性 ....................................................................... 5 4. 對稱與非對稱密碼的區(qū)別 ........................................................... 5 5. 公鑰: RSA 密碼體制 .................................................................. 6 二、實驗部分 ........................................ 8 (一)實驗目的 ....................................................................... 8 (二)實驗環(huán)境 ....................................................................... 8 (三)實驗步驟 ....................................................................... 8 1. 大整數(shù)類 ...................................................................................... 8 2. 快速模冪運算 .............................................................................. 9 3. 快速產(chǎn)生隨機素數(shù) ....................................................................... 9 4. 擴展的歐幾里德算法 ................................................................. 10 IV (四)代碼設計 ..................................................................... 11 1. 大整數(shù)類 .................................................................................... 11 2. Rsa 類 ......................................................................................... 14 3. 關鍵代碼 .................................................................................... 16 三、結(jié)果與討論 ..................................... 17 (一)程序展示 ..................................................................... 17 1. 程序主界面 ................................................................................ 17 2. RSA 密鑰產(chǎn)生 ............................................................................ 18 3. 加密解密展示 ............................................................................ 20 (二) RSA 分析 .................................................................... 21 1. RSA 的安全性 ............................................................................ 21 2. RSA 效率 .................................................................................... 22 (三)小結(jié) ............................................................................ 24 注釋 .............................................. 25 參考文獻 ........................................... 26 致謝 .............................................. 27 中山大學本科生畢業(yè)論文 1 一.前言 (一)引論 從公元前 5 世紀,古希臘斯巴達人用木棍和帶子進行換位密碼,到現(xiàn)在的網(wǎng)上 購 物、網(wǎng)上銀行 ,密碼學在我們生活中占著越來越重要的地位。s keygeneration needs a random large prime number, which is also a problem to be solved. 【 Keywords】 RSA。s security is built on the difficulties of big integer factorization, whose basic principle is the Euler39。此外, RSA密鑰的生成需要產(chǎn)生隨機的大素數(shù),這也是本文需要解決的問題。 RSA的安全性建立在大整數(shù)的分解困難上,其基本原理是初等數(shù)論中的歐拉定理。 I RSA 公鑰加密算法的設計與實現(xiàn) II RSA 公鑰加密算法的設計與實現(xiàn) 【論文摘要】 RSA公鑰加密算法是目前最有影響力的非對稱加密算法,為 ISO的推薦的加密標準。而非對稱加密因其安全性、開放性以及在數(shù)字簽名技術(shù)中的重要性,在我們的生活中被使用得越加頻繁。在工業(yè)實現(xiàn)上,為了保證加密的安全性,通常要求密鑰對大于 1Kbits,然而計算機的整型變量為 32bits,這構(gòu)成一個矛盾。 【 關 鍵 詞】 RSA; 非對稱加密 ; 素數(shù) The design and implementation of RSA public key encryption algorithm 【 ABSTRACT】 RSA public key encryption algorithms are the most influential dissymmetrical encryption algorithms, the remended encryption standard to ISO. And dissymmetrical encryption is used more and more frequently in our lives because of its security, openness and the importance in digital signature technology. RSA39。s theorem in elementary number theory. In order to ensure the security of encryption, when it es to industry, we often require the key pair is greater than 1Kbits. However, the integer class of puters occupies 32bits, which constitutes a contradiction. In addition, RSA39。 dissymmetrical encryption。如同我們寄信會把信紙放入信封并在封口簽名,以免他人獲知信件內(nèi)容以及在投遞過程中被更改丟失原意,使用密碼是為了保證信息的秘密性、不可更改性等。 1977 年, DES( the Data Encryption Standard,數(shù)據(jù)加密標準)被美國政府正式采納 (1)。 (2) 2020 年電子簽名法的施行 (3),是中國信息化進程發(fā)展的必然需求和有力保障,說明了密碼學被公眾相信、使用,并被立法支持。 RSA 算法的數(shù)學基礎是初等數(shù)論中的歐拉定理,其安全性建立在大整數(shù)因子分解的困難性上。 2. 模冪運算 modman的快速計算: RSA 的加密解密算法都需要大量的模 n指數(shù)運算,而模 n 和指數(shù) m 都很大,所以模冪運算的快速算法十分重要。通常的做法是隨機選取一個需要數(shù)量級的奇數(shù)并驗證是否素數(shù),如此重復。 接下來,我會參考各個相關文獻,找出辦法解決問題,并實現(xiàn) RSA 算法。 但長久以來, 軍事、政治、外交等要害部門 ,為求保密,并不外傳密碼技術(shù),而是一直把持著密碼知識 。 在如