CryptographyandNetworkSecurity(CS435).ppt

  1. 1、本文档共36页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
CryptographyandNetworkSecurity(CS435).ppt

Cryptography and Network Security (CS435) Part Five (Math Backgrounds) Modular Arithmetic define modulo operator “a mod n” to be remainder when a is divided by n use the term congruence for: a = b mod n when divided by n, a b have same remainder eg. 100 = 34 mod 11 b is called a residue of a mod n since with integers can always write: a = qn + b usually chose smallest positive remainder as residue ie. 0 = b = n-1 process is known as modulo reduction eg. -12 mod 7 = -5 mod 7 = 2 mod 7 = 9 mod 7 Divisors say a non-zero number b divides a if for some m have a=mb (a,b,m all integers) that is b divides into a with no remainder denote this b|a and say that b is a divisor of a eg. all of 1,2,3,4,6,8,12,24 divide 24 Modular Arithmetic Operations is clock arithmetic uses a finite number of values, and loops back from either end modular arithmetic is when do addition multiplication and modulo reduce answer can do reduction at any point, ie a+b mod n = [a mod n + b mod n] mod n Modular Arithmetic can do modular arithmetic with any group of integers: Zn = {0, 1, … , n-1} form a commutative ring for addition with a multiplicative identity note some peculiarities if (a+b)=(a+c) mod n then b=c mod n but if (a.b)=(a.c) mod n then b=c mod n only if a is relatively prime to n Modulo 8 Addition Example Greatest Common Divisor (GCD) a common problem in number theory GCD (a,b) of a and b is the largest number that divides evenly into both a and b eg GCD(60,24) = 12 often want no common factors (except 1) and hence numbers are relatively prime eg GCD(8,15) = 1 hence 8 15 are relatively prime Euclidean Algorithm an efficient way to find the GCD(a,b) uses theorem that: GCD(a,b) = GCD(b, a mod b) Euclidean Algorithm to compute GCD(a,b) is: EUCLID(a,b) 1. A = a; B = b 2. if B = 0 return A = gcd(a, b) 3. R = A mod B 4. A = B 5. B = R 6. goto 2 Example GCD(1970,1066) 1970 = 1 x 1066 + 904 gcd(1066, 904) 1066 = 1 x 904 + 162 gcd(904, 162) 904 = 5 x 162 + 94

文档评论(0)

tangtianxu1 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档