版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Classical Cryptography,1. Introduction: Some Simple Cryptosystems,Outline,1 Introduction: Some Simple Cryptosystems The Shift Cipher The Substitution Cipher The Affine Cipher The Vigenre Cipher The Hill Cipher The Permutation Cipher Stream Ciphers 2 Cryptanalysis Cryptanalysis of the Affine Cipher C
2、ryptanalysis of the Substitution Cipher Cryptanalysis of the Vigenre Cipher Cryptanalysis of the Hill Cipher Cryptanalysis of the LFSR Stream Cipher,Introduction: Some Simple Cryptosystems,1 Introduction,Introduction: Some Simple Cryptosystems,Definition 1.1: A cryptosystem is a five-tuple (P,C,K,E,
3、D) satisfies P is a finite set of possible plaintexts C is a finite set of possible ciphertexts K, the keyspace, is a finite set of possible keys For each KK, there is an encryption rule eKE and a corresponding decryption rule dKD dK(eK(x)=x for every plaintext xP,Introduction: Some Simple Cryptosys
4、tems,Definition 1.2: a and b are integers, m is a positive integer congruence: ab (mod m) if m divides b-a Zm: the set 0,1,m-1 with 2 operations + and 10+20=4 in Z26 (10+20 mod 26=4) 1020=18 in Z26 (1020 mod 26=18),Introduction: Some Simple Cryptosystems, Shift Cipher Cryptosystem 1.1: Shift Cipher
5、P = C =K = Z26 K, x, y Z26 eK(x)=(x+K) mod 26 dK(y)=(y-K) mod 26,Introduction: Some Simple Cryptosystems,eg.: Suppose K=11 Plaintext: student Ciphertext: DEFOPZE,Introduction: Some Simple Cryptosystems, Substitution Cipher Cryptosystem 1.2: Substitution Cipher P=C=Z26 K: all possible permutations of
6、 the 26 symbols For each pK ep(x)=p(x) dp(y)=p-1(y) where p-1 is the inverse permutation to p,Introduction: Some Simple Cryptosystems,eg.: Plaintext: student Ciphertext: VMUSHSM,Introduction: Some Simple Cryptosystems, Affine Cipher Theorem 1.1: axb (mod m) has a unique solution xZm for every bZm if
7、f gcd(a,m)=1 Definition 1.3: Suppose a1 and m2 are integers a and m are relatively prime if gcd(a,m)=1 f(m): the number of integers in Zm that are relatively prime to m Theorem 1.2: Suppose,Introduction: Some Simple Cryptosystems,Definition 1.4: Suppose aZm a-1 mod m: the multiplicative inverse of a
8、 modulo m aa-1a-1a1 (mod m) Cryptosystem 1.3: Affine Cipher P = C = Z26 K=(a,b) Z26Z26 : gcd(a,26)=1 For K=(a,b)K ; x, yZ26 eK(x)=(ax+b) mod 26 dK(y)=a-1(y-b) mod 26,Introduction: Some Simple Cryptosystems,e.g.: Suppose K=(7,3) 7-1 mod 26 = 15 Plaintext: student Ciphertext: ZGNYFQG,eK(x)=(7x+3) mod
9、26,dK(y)=15(y-3) mod 26,Introduction: Some Simple Cryptosystems, Vigenre Cipher Cryptosystem 1.4: Vigenre Cipher m: a positive integer P = C = K = (Z26)m For a key K=(k1,k2,km) eK(x1,x2,xm)=(x1+k1,x2+k2,xm+km) dK(y1,y2,ym)=(y1-k1,y2-k2,ym-km),Introduction: Some Simple Cryptosystems,e.g.: Suppose m=4
10、 and K=(2,8,15,7) Plaintext: student Ciphertext: UBJKGVI,Introduction: Some Simple Cryptosystems, Hill Cipher Definition 1.5: Suppose A=(ai,j) is an mm matrix Ai,j: the matrix obtained from A by deleting the ith row and the jth column det A: the determinant of A m=1: det A=a1,1 m1: for any fixed i A
11、*=(a*i,j): the adjoint matrix of A a*i,j=(-1)i+jdet Aj,i,Introduction: Some Simple Cryptosystems,Theorem 1.3: Suppose K=(ki,j) is an mm invertible matrix over Zn K-1=(det K)-1K* e.g.: det K=117-83 mod 26=1 K-1=(det K)-1K*=,Introduction: Some Simple Cryptosystems,Cryptosystem 1.5: Hill Cipher M 2 is
12、an integer P = C = (Z26)m K = mm invertible matrices over Z26 For a key K eK(x)=xK dK(y)=yK-1 where K-1 is the inverse of K,Introduction: Some Simple Cryptosystems,e.g.: Plaintext: GOD (6 14 3) Ciphertext: WTJ (22 19 9),Introduction: Some Simple Cryptosystems, Permutation Cipher Cryptosystem 1.6: Pe
13、rmutation Cipher m is a positive integer P = C = (Z26)m K consist of all permutations of 1,m For a key(a permutation) p ep(x1,xm)=(xp(1),xp(m) where p-1 is the inverse permutation to p,Introduction: Some Simple Cryptosystems,e.g.: Suppose m=6 Plaintext: CYBERFORMULA Ciphertext: BRCFEYMLOAUR,Introduc
14、tion: Some Simple Cryptosystems, Stream Ciphers Block ciphers Plaintext string x =x1x2 (each xi is a plaintext) Ciphertext string y =y1y2 = eK(x1)eK(x2) Stream ciphers Plaintext string x =x1x2 Generate a keystream (by using some K) z =z1z2 Ciphertext string y =y1y2 = ez1(x1)ez2(x2) ,Introduction: So
15、me Simple Cryptosystems,Definition 1.6: A synchronous stream cipher is a tuple (P,C,K,L,E,D) with a function g P : a finite set of possible plaintexts C : a finite set of possible ciphertexts K : a finite set of possible keys L : a finite set called the keystream alphabet g: the keystream generator
16、Input: K g generates an infinite string z1z2,Introduction: Some Simple Cryptosystems,Definition 1.6 (cont.) For each zL, there is an encryption rule ezE and a corresponding decryption rule dZD dz(ez(x)=x for every plaintext xP,Introduction: Some Simple Cryptosystems,Vigenre Cipher can be defined as
17、a synchronous stream cipher K = (Z26)m P = C = L = Z26 ez(x)=(x+z) mod 26 dz(y)=(y-z) mod 26 Keystream z1z2 = k1k2.km k1k2.km k1k2.km ,Introduction: Some Simple Cryptosystems,Keystream can be produced efficiently in hardware using a LFSR (Linear Feedback Shift Register) k1 would be tapped as the nex
18、t keystream bet k2,km would each be shifted 1 stage to the left The new value of km would be this is “linear feedback“ (see Figure 1.2) This system is modulo 2,Introduction: Some Simple Cryptosystems,e.g.: in Figure 1.2,suppose K=(1,0,0,0) c0=1, c1=1, c2=0, c3=0 The keystream is 100010011010111,Figure 1.2,Introduction: Some Simple Cryptosystems,Non-synchronous stream cipher: Each keystream elem
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024年度股权投资合同:某创业公司A轮融资2篇
- 虞美人教学课件
- 《铁路货物运输》课件
- 《肺癌病人的护理》课件
- 2024中国移动政企客户分公司暑期实习生校园招聘易考易错模拟试题(共500题)试卷后附参考答案
- 2024中国石化海洋石油工程公司毕业生招聘15人易考易错模拟试题(共500题)试卷后附参考答案
- 2024中国正大甘肃区校园招聘70人易考易错模拟试题(共500题)试卷后附参考答案
- 2024中国大唐集团资本控股限公司招聘16人易考易错模拟试题(共500题)试卷后附参考答案
- 04版建筑设计合同:某地标性建筑的设计与施工
- 《营销管理与分析》课件
- 2024年国家工作人员学法考法知识考试题库500题(含答案)
- 部编版五年级语文上册《21.古诗词三首》完整
- 基于PLC的茶叶揉捻机自动控制系统的研究
- 化工实训室文化墙
- PHQ-9抑郁症状量表
- 消防设施维保服务投标方案(技术方案)
- 交通信号灯系统设计毕业设计
- 全新光伏工程居间协议2024版
- 产品召回制度
- (高清版)DZT 0130.2-2006 地质矿产实验室测试质量管理规范 第2部分:岩石矿物分析试样制备
- 2024图解数据分类分级规则
评论
0/150
提交评论