版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、section 4.1: primes, factorization, and the euclidean algorithmpractice hw (not to hand in)from barr textp. 160 # 6, 7, 8, 11, 12, 13 the purpose of the next two sections that we cover is to provide the mathematics background needed to understand the rsa cryptosystem, which is a modern cryptosystem
2、in wide use today. we start out by reviewing and expanding our study of prime numbers.prime numbers recall that a prime number p is a number whose only divisors are 1 and itself (1 and p). a number that is not prime is said to be composite. the following set represents the set of primes that are les
3、s than 100:2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97a larger list of primes can be found in the barr text on pp. 370-372.facts about primes1. there are an infinite number of primes.2. every natural number can be factored into a product of primes (
4、fundamental theorem of arithmetic).determining the primality of larger positive integers because of its use in cryptology and other applications, mathematical techniques for determining whether large numbers are prime have been targets of intense research. we study some elementary factors for determ
5、ining the primality of numbers.fact 2 is the only even prime. any even number larger than 2 is not prime since 2 is a divisor. example 1: is 10000024 prime?solution:how do we determine if large positive integers are prime? the next example illustrates an elementary method for doing this?how do we de
6、termine if large positive integers are prime? the next example illustrates an elementary method for doing this?example 2: is 127 prime?solution:example 2 provides the justification for the following primality test for prime numbers.square root test for determining prime numberslet n 1 be a natural n
7、umber. if no prime number 2, 3, 5, 7, 11, 13, less than is a divisor of n, than n is prime.nexample 3: determine if 839 is prime.solution: example 4: determine if 1073 is prime.solution: example 5: determine if 1709 is prime.solution: as the numbers tested get larger, the square root test for primal
8、ity does have limitations. the next example illustrates this fact.example 6: determine if 958090550047 is prime.solution: being able to determine whether large numbers are prime will be important later on when we study the rsa cryptosystem. to deal with larger numbers, much more sophisticated tests
9、for primality testing have been developed and are an on going topic of research. the largest prime number discovered up to december 2005 was the number which is a 9152052 digit prime number.1230402457factorization of composite numbers recall that a number that is not prime, it is composite. if a num
10、ber is composite, it can be factored into prime factors other than 1 and itself. we review some basic techniques of factoring in the following examples.example 7: factor 3267 into a product of prime factors.solution:example 8: factor 429229 into a product of prime factors.solution:example 9: factor
11、1511 into a product of prime factors.solution:the greatest common divisor of two numbers recall that the greatest common divisor of two numbers, denoted as gcd(a,b), is the largest number that divides a and b evenly with no remainder. for example, gcd(10, 20). = 10 and gcd(72, 108)=36. previously, w
12、e saw a method to find the gcd that involved multiplying the prime factors that both numbers had in common. this method is inefficient for find the greatest common divisor of larger numbers since it is harder factor numbers with larger prime factors. however, there is a well known method known as th
13、e euclidean algorithm that will allows us to find the greatest common divisor of larger numbers which we state next.the euclidean algorithmthe euclidean algorithm makes repeated use of the division algorithm to find the greatest common divisor of two numbers. if we are given two numbers a and b wher
14、e a b, we compute ),gcd(ba0111212134342323121211nnnnnnnnnnnrqrrrqrrrqrrrqrrrqrrrqbrbqanrthe last nonzero remainder, , is the greatest common divisor.nrba),gcd(of a and b, that is, .example 10: find the greatest common divisor of a = 2299 and b = 627.solution: (will be displayed in class)example 11:
15、find the greatest common divisor of a = 54321 and b = 9875.solution: (will be displayed in class)theorem for any two positive integers a and b, there are integers s and t whereas + bt = gcd(a, b)note to find s and t, we solve for the remainders starting with the first step in the euclidean algorithm
16、, substituting each remainder we obtain into the remainders we obtain in successive steps until the greatest common divisor of a and b is reached. example 12: find s and t where as + bt = gcd(a, b), where a = 2299 and b = 627.solution: (will be displayed in class)example 13: find s and t where as +
17、bt = gcd(a, b), where a = 54321 and b = 9875.solution: (will be displayed in class) using the previous results, we want to consider the problem of solving the modular equation for t. here, t represents the multiplicative inverse of b mod a, that is, the number you must multiply b by to get 1 in mod
18、a arithmetic. in mathematical notation, we say that . the next example illustrates how example 13 a special case illustrating how this problem is solved.abt mod 1abt mod 1example 14: consider a = 54321 and b = 9875 and consider the problem of solving or in example 13, we solved as + bt = gcd(a, b),a
19、nd obtained t = -3196. since we are working inmod 54321 arithmetic, we can convert t to its equivalent positive representation by computing t = -3196 mod 54321 = 51125. abt mod 154321 mod 19875 twe claim that t = 51125 is the multiplicative inverse of b mod a = 9875 mod 54321, that is . we can verify this by computingbt mod a = (9875)(51125) mod 54321 = 504859375 mod 54321 = 1. we g
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年企业成本分析方法应用与管控重点识别指南
- 2026年异业合作资源置换与客户群体互补方案
- 护理团队文化建设经验
- 述职报告课件
- 儿童发展心理学:3-6岁儿童心理发展年龄特征
- 脊柱骨折的手术治疗与护理配合
- 护理实践中的医疗效果评估
- 护理教学中的科研方法
- 春季肌肤保养攻略
- 铁路机务乘务职业生涯规划书
- 电影监制的合同范本
- 2025年中职历史(中国古代史基础)试题及答案
- 显示屏搬迁合同范本
- 公安院校招警考试行政职业能力测试(判断推理)模拟试卷1(共270题)
- 2025下半年黑龙江大庆肇州县人才引进54人备考题库附答案解析
- 洗衣店劳动合同范本
- 2025年结构化面试题目及答案
- 2026年中国美发行业发展展望及投资策略报告
- 铁路工务安全管理存在的问题及对策
- 护士的职业安全防护课件
- 技术支持团队服务标准及考核指标
评论
0/150
提交评论