section21shiftciphersandmodulararithmetic21节移位密码和模块化的算术
12页1、Section 2.1: Shift Ciphers and Modular Arithmetic,The purpose of this section is to learn about modular arithmetic, which is one of the fundamental mathematical concepts we will need to implement the cryptographical techniques that we will study this semester. Afterwards, we will introduce basic concepts in cryptography and illustrate a basic cryptographic involving shift ciphers,Section 2.1: Shift Ciphers and Modular Arithmetic,Modular Arithmetic In grade school, we first learned how to divide
2、numbers. (Let div stand for division) Example1: Consider 40 div 3. Determine the quotient and remainder and write the result as an equation. Answer: 40 div 3 = 13 * 3 R 1 where R stands for remainder or 13 * 3 + 1 Basic Arithmetic Properties In the previous example we used what is called the division algorithm to obtain the answer. The integers are the numbers -4, -3, -2, -1, 0, 1, 2, 3, 4, A number of primary interest in this class will be the remainder r that we obtain when we divide two numbe
3、rs. Definition: We say that r is equal to b MOD m, written r = b MOD m, if r is the integer remainder of b divided by m. We define the variable m as the modulus. Example 2: Determine 25 MOD 7, 31 MOD 5, 26 MOD 2, and 5 MOD 7 Answers: 4, 1, 0, 5,Section 2.1: Shift Ciphers and Modular Arithmetic,Note: In the division algorithm, the remainder r is non-negative, that is r 0. This fact means that when doing modular arithmetic we will never obtain a negative remainder. To compute b MOD m when b 0 corr
4、ectly, we must always look for the largest number that m evenly divides that is less than b. The next example illustrates this fact. Example 3: Compare computing 23 MOD 9 and -23 MOD 9. Answers: 5, 4,Section 2.1: Shift Ciphers and Modular Arithmetic,Doing Modular Arithmetic For Larger Numbers With A Calculator: For b MOD m calculate (int)(b div m), call this q. On the TI-83 the int function is under MATH-NUM-5: compute b qm. This gives r. Or in one step: r = b int(b / m) * m Examples 4-6: Comput
《section21shiftciphersandmodulararithmetic21节移位密码和模块化的算术》由会员tian****1990分享,可在线阅读,更多相关《section21shiftciphersandmodulararithmetic21节移位密码和模块化的算术》请在金锄头文库上搜索。
2018-2019学年八年级历史上册 第3单元 新民主主义革命的兴起 第12课 国民革命导学案北师大版
2018-2019学年八年级历史上册 第六单元 中华民族的抗日战争 第21课 敌后战场的抗战导学案(新人教版
2018-2019学年八年级历史上册 第1单元 民族危机与晚晴时期的救亡运动 第1课 鸦片战争导学案2北师大版
2018-2019学年八年级历史上册 第2单元 辛亥革命与中华民国的建立 第8课 辛亥革命导学案北师大版
2018-2019学年八年级历史上册 第六单元 中华民族的抗日战争 第20课 正面战场的抗战导学案(新人教版
2018-2019学年八年级历史上册 第2单元 辛亥革命与民族觉醒 第10课 新文化运动导学案华东师大版
2018-2019学年八年级历史上册 第2单元 辛亥革命与民族觉醒 第8课 袁世凯称帝与军阀混战导学案2华东师大版
2018-2019学年八年级历史上册 第4单元 中华民族的抗日战争 第14课 民族危机的空前严重导学案华东师大版
2018-2019学年八年级历史上册 第五单元 从国共合作到国共对峙 第17课 中国工农红军长征导学案(新人教版
2018-2019学年八年级历史上册 第1单元 民族危机与晚晴时期的救亡运动 第5课 中日甲午战争导学案1北师大版
2018-2019学年八年级历史上册 第2单元 辛亥革命与民族觉醒 第8课 袁世凯称帝与军阀混战导学案1华东师大版
2018-2019学年八年级历史上册 第1单元 民族危机与晚晴时期的救亡运动 第5课 中日甲午战争导学案2北师大版
2018-2019学年八年级历史上册 第1单元 民族危机与晚晴时期的救亡运动 第1课 鸦片战争导学案1北师大版
2018-2019学年八年级历史上册 第2单元 辛亥革命与中华民国的建立 第10课 新文化运动导学案北师大版
2018-2019学年八年级历史上册 第1单元 民族危机与晚晴时期的救亡运动导学案北师大版
2018-2019学年八年级物理上册 第二章 第1节 声音的产生与传播导学案 (新版)新人教版
2018-2019学年八年级地理上册 第四章 第三节 工业的分布与发展(第1课时)学案(新版)新人教版
2018-2019学年八年级物理上册 第二章 第2节 声音的特性导学案 (新版)新人教版
2018-2019学年八年级地理上册 3.3 中国的水资源教学案(新版)湘教版
2018-2019学年八年级物理上册 第三章 第3节 汽化和液化(第1课时 汽化)导学案 (新版)新人教版
2024-04-11 25页
2024-04-11 37页
2024-04-11 28页
2024-04-11 31页
2024-04-11 36页
2024-04-11 29页
2024-04-11 22页
2024-04-11 27页
2024-04-11 34页
2024-04-11 32页