版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
1、PART II Public-Key Encryption & Hash FunctionCHAPTER 8 Introduction to Number Theory 8.1 Prime Numbers 8.2 Fermats and Eulers Theorems 8.3 Testing for Primality 8.4 The Chinese Remainder Theorem 8.5 Discrete Logarithms 2048.1 Prime NumbersPrime numbers only have divisors of 1 and self they cannot be
2、 written as a product of other numbers eg. 2,3,5,7 are prime, 4,6,8,9,10 are notPrime numbers are central to number theoryPrime factorisation : Any integer a 1 can be factored in a unique way as: hard problem where p1 p2 pk are primes Another expression : P = set of all primes 11011 = 7 112 13 a7 =
3、1, a11 = 2, a13 = 12058.1 Prime NumbersMultiplication : k = a b Example : a = 12 = 22 3, b = 90 = 2 32 5 k = a b = 1080 = 23 33 5 k2(3) = a2(2)+b2(1); k3(3)= a3(1)+b3(2); k5(1) = a5(0)+b5(1)Given a and b, If a | b, then ap bp for all p Example : a = 12 = 22 3, b = 180 = 22 32 5 a2 = 2 = 2 =b2, a3 =
4、1 2 = b3, a5 = 0 0, q odd. Let a be any integer in the range 1 a 0, q odd, so that (n 1)=2kq(2) Select a random integer a, 1 a (n 1)(3) if aq mod n = 1 then return (“maybe prime);(4) for j = 0 to k 1 do if (a2jq mod n = n 1) then return( maybe prime )(5) return (composite)2158.3 Testing for Primalit
5、yRepeated Use of the Miller-Robin AlgorithmIf Miller-Rabin algorithm returns “composite” the number is definitely not prime, otherwise is a prime or a pseudo-primeProbability it detects a pseudo-prime is 1/4Hence, if repeat test with different random a, then chance n is prime after t tests is:Pr( n
6、is a prime after t tests ) = 1 4 teg. for t =10,2168.3 Testing for PrimalityA Deterministic Primality AlgorithmAKS (Agrawal, Kayal, Saxena, 2002) algorithm : relatively simple deterministic algorithm that efficiently determines whether a given large number is a prime.The AKS algorithm does not appea
7、r to be as efficient as the Miller-Rabin algorithm 2178.3 Testing for PrimalityDistribution of PrimesThe prime number theorem states that primes near n are spaced on the average one every (ln n) integers, i.e. the density of prime numbers among the integers in the neighborhood of n is around 1 in ln
8、 nLet (n) denote the number of primes p n. (n) n/(ln n 1 ), On average, one would have to test on the order of ln n integers before a prime is found. Because all even can be rejected, so in practice need only *ln(n) numbers of size n to locate a prime2188.4 Chinese Remainder TheoremUsed to speed up
9、modulo computations: A (mod M)Let M = m1 m2 mk where gcd(mi, mj) = 1Chinese Remainder theorem lets us work in each moduli mi separately: ai = A mod mi 1 i k where A ZM, ai ZmiSince computational cost is proportional to size, this is faster than working in the full modulus MTo compute A (mod M)first
10、compute all ai = A mod mi separatelydetermine constants ci below, where Mi = M/mi2198.5 Discrete LogarithmsThe Powers of an Integer, Modulo nFrom Eulers theorem, for gcd(a, n) = 1, a(n) mod n = 1 where (n) Eulers totient function: # of positive integers less than n and relatively prime to n.Consider
11、 am =1 (mod n), gcd(a, n) = 1must exist for m = (n), least m = order of aonce powers reach m, cycle will repeatIf smallest is m = (n), then a is called a primitive root of nIf p is prime, then successive powers of a generate the group mod p: Zp = a, a2, , ap1 For the prime p = 19, primitive roots =
12、2, 3,10, 13, 14, 152208.5 Discrete LogarithmsLogarithms for Modular ArithmeticThe discrete logarithm of a modulo p is to find an integer x such that y = gx (mod p); written as x = loggy (mod p)If g is a primitive root, then it always exists, otherwise it may not. x = log34 mod 13 has no answer; 3x =
13、 4 (mod 13) x = log23 mod 13 = 4 by trying successive powers The properties of logarithms : log x(1) = 0, log x(x) = 1 log x(yz) = log x(y) + log x(z) log x(y r) = r log x(y) 2218.5 Discrete LogarithmsCalculation of Discrete LogarithmConsider the equation y = gx mod p Given g, x, and p, it is a straightforward matter to calculate y; just exponentiation However, given g, y, and p, it is very difficult to calculate x. Hard problemThe fastest known algorithm for taking DL modu
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2026屆高三物理二輪復(fù)習(xí)課件:專題四 計算題培優(yōu)練7 電磁感應(yīng)中的綜合問題
- 快看宣傳活動策劃方案(3篇)
- 電梯改造項目現(xiàn)場管理制度(3篇)
- 礦井機(jī)電修理管理制度范文(3篇)
- 補胎店員工管理制度表(3篇)
- 郵政行業(yè)統(tǒng)計報表管理制度(3篇)
- 銀行的管理制度怎么查看(3篇)
- 高處吊籃維護(hù)保養(yǎng)管理制度(3篇)
- 《GAT 1393-2017信息安全技術(shù) 主機(jī)安全加固系統(tǒng)安全技術(shù)要求》專題研究報告
- 兼職培訓(xùn)師的課件
- DG-TJ08-2021-2025 干混砌筑砂漿抗壓強(qiáng)度現(xiàn)場檢測技術(shù)標(biāo)準(zhǔn)
- 鼻竇炎的護(hù)理講課課件
- 腸系膜脂膜炎CT診斷
- 體外膜肺氧合技術(shù)ECMO培訓(xùn)課件
- 老年醫(yī)院重點??平ㄔO(shè)方案
- 銀行解封協(xié)議書模板
- 超星爾雅學(xué)習(xí)通《學(xué)術(shù)規(guī)范與學(xué)術(shù)倫理(華東師范大學(xué))》2025章節(jié)測試附答案
- GB 17440-2025糧食加工、儲運系統(tǒng)粉塵防爆安全規(guī)范
- 《綠色農(nóng)產(chǎn)品認(rèn)證》課件
- 衛(wèi)生院、社區(qū)衛(wèi)生服務(wù)中心《死亡醫(yī)學(xué)證明書》領(lǐng)用、發(fā)放、管理制度
- 《金融科技概論》完整全套課件
評論
0/150
提交評論