第二章传统加密技术习题:补充题:解密“GCUA VG DTGCM”:破译Caesor密码“GCUA VQ DTGCM”C=(P+K) mod 26 K=1…25P=(C-K) mod 26用穷举攻击来破译K=2时明密文替换表明文:a b c d e f g h i j k l m n o p q r s t u v w x y z密文:c d e f g h i j k l m n o p q r s t u v w x y z a b 解密如下:密文:gcua vq dtgcm明文:easy to :带提示词的凯撒密码,其实质是单表代换明:The snow lay thick on the steps and the 密:abc de fg hij klm n o明:snowflakes driven by the wind looked black in 密:p q r s 明:the headlights of the :t密:a b c d e f g h i j k l m n o p q r s t u v w x y z明:t h e s n o w l a y i c k p d f r v b g j m q u x z解密:密:sidkhkdm af hcrkiabie shimc kd lfeaila明:basilisk to leviathan blake is :单表代换密码较容易被攻破,因为它带有原始字母使用频率的一些统计学特征,并且代换后明文的语法模式以及结构仍然保存在密文中。可通过统计密文单,双频,字母组合规律,语法模式来分析,测试来破译。!:密钥为0—26的随机数。C=(P+K) mod 27 (1)P=(C-K) mod 27 (2),用(1)式明:S E N D M O R E M O N E Y 18 4 13 3 12 14 17 4 12 14 13 4 24钥:9 0 1 7 23 15 21 14 11 11 2 8 9---------------------------------------------------------------密:0 4 14 10 8 2 11 18 23 25 15 12 6 A E O K I C L S X Z P M ,用(2)式同理得密钥为:25 4 23 3 22 15 19 5 19 21 12 8 3 第三章分组密码与数据加密标准习题:书P74 :写出4 个弱密钥,=DESk(X)证明Y`=DESk` (X`)?首先证明对任意两个具有相同长度的串A,B有(A ⊕B)`=A` ⊕B我们只需证明一轮的情况。),(111iiiiiiKRfLRRL??????)))(((),(11iiiiKRESPKRf????I n p u tIPL0 R0fffIP-1K1K16K2L1 R1L2 R2L15 R15R16 L16算法流程图A=R(32 bits)J=K(48 bits)EE(A)为48 bits+B1 B2 B3 B4 B5 B6 B7 B8S1S2S3S4S5S6S7S