多表代换Virginia加密算法及秘钥破解算法的实现

Slides:



Advertisements
Similar presentations
663 Chapter 14 Integral Transform Method Integral transform 可以表示成如下的積分式的 transform  kernel Laplace transform is one of the integral transform 本章討論的 integral.
Advertisements

東元綜合醫院 主講人:醫事課 課長 張桂瑛 醫管處醫事課 新人教育訓練課程 -批價作業.
护理学基础 第七章 医院与住院环境.
新北市102學年度國民小學暨幼兒園教師 聯合甄選試務工作講習
公文寫作 演講人 高 文 民.
藥物濫用 華德學校上午校 黃秀雯.
第九章 会计设置及机构.
2015年6月论文头脑风暴 大连理工大学 郭君
日月光·伯爵居项目介绍.
香港故事之 三年零八個月的艱苦歲月 組員: 梁珮瑩 吳遠莉 李琪 李青儀 方松皓.
2011计算机类教研活动 陈国久.
舞动青春 落叶归根 大学生职业生涯规划书 BUSINESS ENGLISH 韩慧敏.
我的故事 ————往事回首.
女生成功靠什么? 09英本四班 傅柏双.
国际投资环境罗氏评级法 美国.
社会保障学 第5章 失业保险.
主 题 班 会 团 结   协 作    力 量.
理想.
固定与搬运技术 义乌市中心医院 陈红卫.
南投縣永昌國小 自衛消防編組訓練.
報告即將開始.
中鸣虚拟搜救比赛项目 (一人) 现场主题创作(40%)(一人) 3D虚拟搜救(60%)(一人).
Campus commodities 校園商品 陳郁文.
案例分析 胎记美容记 第6小组
辦理建教合作注意事項 國立台灣師範大學 鄭慶民
一、原函数与不定积分 二、不定积分的几何意义 三、基本积分公式及积分法则 四、牛顿—莱布尼兹公式 五、小结
人生五色臉 年輕十歲必學的小動作,九個保持身體健康的的小訣竅 人們常在不經意間做些小動作,並認為這是身體的本能反應,
C++中的声音处理 在传统Turbo C环境中,如果想用C语言控制电脑发声,可以用Sound函数。在VC6.6环境中如果想控制电脑发声则采用Beep函数。原型为: Beep(频率,持续时间) , 单位毫秒 暂停程序执行使用Sleep函数 Sleep(持续时间), 单位毫秒 引用这两个函数时,必须包含头文件
大学生职业规划 学校:广东技术师范学院 学院:外国语学院 班级:11级英语商务班 姓名:刘付敏.
学籍异动学生选课辅导 学年第1学期.
Leftmost Longest Regular Expression Matching in Reconfigurable Logic
3-3 Modeling with Systems of DEs
Introduction To Mean Shift
方贤进 利用重合指数法破解Virginia加密 方贤进
模式识别 Pattern Recognition
單元一: 變數定義、資料輸入、資料存檔與表格建立
网络与系统安全实验 一 传统加密技术 古典密码技术.
計算方法設計與分析 Design and Analysis of Algorithms 唐傳義
On Some Fuzzy Optimization Problems
复杂体系中分子相互作用的NMR研究—挑战与应对
機率與統計 Introduction   講師:黃弘州.
Knowledge Engineering & Artificial Intelligence Lab (知識工程與人工智慧)
Journal Citation Reports® 期刊引文分析報告的使用和檢索
第 17 章 數位革命與 全球電子市場 © 2005 Prentice Hall.
Course 9 NP Theory序論 An Introduction to the Theory of NP
Network Planning Algorithms in CATV Networks
Data Pre-Processing … What about your data?.
Interval Estimation區間估計
SOA – Experiment 2: Query Classification Web Service
第一章 函数与极限.
高性能计算与天文技术联合实验室 智能与计算学部 天津大学
Chapter 8 Model Inference and Averaging
学习目标 1、什么是字符集 2、字符集四个级别 3、如何选择字符集.
前向人工神经网络敏感性研究 曾晓勤 河海大学计算机及信息工程学院 2003年10月.
水源保育與回饋制度論壇 水源保育與回饋制度現況與癥結 報告人:陳起鳳 助理教授 主辦單位:臺北科技大學水環境研究中心
公钥密码学与RSA.
计算机问题求解 – 论题 算法方法 2016年11月28日.
第4章 Excel电子表格制作软件 4.4 函数(一).
Outline Overview of this paper Motivation and Initialization
Statistics Chapter 1 Introduction Instructor: Yanzhi Wang.
Efficient Query Relaxation for Complex Relationship Search on Graph Data 李舒馨
最短通路问题.
多层循环 Private Sub Command1_Click() Dim i As Integer, j As Integer
 隐式欧拉法 /* implicit Euler method */
基础信贷法律知识 讲解人:岳杨.
活動主題:能「合」才能「作」 指導教授:張景媛教授 設 計 者:協和國小團隊 李張鑫 × 陳志豪.
The role of Algorithms in Computing
Class imbalance in Classification
第二次课后作业答案 函数式编程和逻辑式编程
Gaussian Process Ruohua Shi Meeting
Presentation transcript:

多表代换Virginia加密算法及秘钥破解算法的实现 方贤进 http://star.aust.edu.cn/~xjfang Email: xjfang@aliyun.com

编程任务要求 编程语言为C语言或其它语言,要求提交加密、解密、破解源代码文件。 实现对任意有意义的英文文本文件(*.txt)的Virginia加密、解密算法,其中秘钥是任意输入的一个字符串。要求提供明文文本文件、密文文本文件。 在不知道秘钥的情况下,对一个用Virginia加密算法生成的密文文本文件进行破解,包括破解秘钥、生成对应的明文。要求提供程序测试说明文档。

Virginia加密算法、解密算法

Virginia加密算法 假设语言的字符集为 Charset[26]={‘a’, ’b’, …, ’z’} 字符集大小=26 对应的字符编码为 Coding[26]={0, 1, …, 25}

Virginia加密算法 Virginia加密算法是对明文进行加密的过程中依照密钥的指示轮流使用多个单表代替密码。 设明文串为: M=m1m2…mn,mi∈charset, n是明文长度 秘钥为: K=k1k2…kd,ki∈charset, d是秘钥长度 密文为: C=c1c2…cn,ci∈charset, n是密文长度

Virginia加密算法 cj+td=(mj+td+kj ) mod 26 mj+td=(cj+td -kj ) mod 26 加密算法: j=1…d, t=0…ceiling(n/d)-1 其中ceiling(x)函数表示不小于x最小整数 解密算法: mj+td=(cj+td -kj ) mod 26 j=1…d, t=0…ceiling(n/d)-1 其中ceiling(x)函数表示不小于x最小整数

Virginia加密算法举例 明文长度n=11,秘钥长度d=3, t=ceiling(11/3)-1=3 m1 m2 m3 m4 m5 m6 (编码) n (13) o (14) t (19) h (7) i (8) g (6) s (18) 秘钥K j (9) y (24) 密文C w (22) c (2) r (17) q (16) l (11) p (15) j=1 t=0 j=2 j=3 t=1 t=2 t=3 明文长度n=11,秘钥长度d=3, t=ceiling(11/3)-1=3

一个原始的明文文本 Differential Privacy is the state-of-the-art goal for the problem of privacy-preserving data release and privacy-preserving data mining. Existing techniques using differential privacy, however, cannot effectively handle the publication of high-dimensional data. In particular, when the input dataset contains a large number of attributes, existing methods incur higher computing complexity and lower information to noise ratio, which renders the published data next to useless. This proposal aims to reduce computing complexity and signal to noise ratio. The starting point is to approximate the full distribution of high-dimensional dataset with a set of low-dimensional marginal distributions via optimizing score function and reducing sensitivity, in which generation of noisy conditional distributions with differential privacy is computed in a set of low-dimensional subspaces, and then, the sample tuples from the noisy approximation distribution are used to generate and release the synthetic dataset. Some crucial science problems would be investigated below: (i) constructing a low k-degree Bayesian network over the high-dimensional dataset via exponential mechanism in differential privacy, where the score function is optimized to reduce the sensitivity using mutual information, equivalence classes in maximum joint distribution and dynamic programming; (ii)studying the algorithm to compute a set of noisy conditional distributions from joint distributions in the subspace of Bayesian network, via the Laplace mechanism of differential privacy. (iii)exploring how to generate synthetic data from the differentially private Bayesian network and conditional distributions, without explicitly materializing the noisy global distribution. The proposed solution may have theoretical and technical significance for synthetic data generation with differential privacy on business prospects.

经过预处理之后的明文文本 (只保留字符集中的字符) differentialprivacyisthestateoftheartgoalfortheproblemofprivacypreservingdatareleaseandprivacypreservingdataminingexistingtechniquesusingdifferentialprivacyhowevercannoteffectivelyhandlethepublicationofhighdimensionaldatainparticularwhentheinputdatasetcontainsalargenumberofattributesexistingmethodsincurhighercomputingcomplexityandlowerinformationtonoiseratiowhichrendersthepublisheddatanexttouselessthisproposalaimstoreducecomputingcomplexityandsignaltonoiseratiothestartingpointistoapproximatethefulldistributionofhighdimensionaldatasetwithasetoflowdimensionalmarginaldistributionsviaoptimizingscorefunctionandreducingsensitivityinwhichgenerationofnoisyconditionaldistributionswithdifferentialprivacyiscomputedinasetoflowdimensionalsubspacesandthenthesampletuplesfromthenoisyapproximationdistributionareusedtogenerateandreleasethesyntheticdatasetsomecrucialscienceproblemswouldbeinvestigatedbelowiconstructingalowkdegreebayesiannetworkoverthehighdimensionaldatasetviaexponentialmechanismindifferentialprivacywherethescorefunctionisoptimizedtoreducethesensitivityusingmutualinformationequivalenceclassesinmaximumjointdistributionanddynamicprogrammingiistudyingthealgorithmtocomputeasetofnoisyconditionaldistributionsfromjointdistributionsinthesubspaceofbayesiannetworkviathelaplacemechanismofdifferentialprivacyiiiexploringhowtogeneratesyntheticdatafromthedifferentiallyprivatebayesiannetworkandconditionaldistributionswithoutexplicitlymaterializingthenoisyglobaldistributiontheproposedsolutionmayhavetheoreticalandtechnicalsignificanceforsyntheticdatagenerationwithdifferentialprivacyonbusinessprospects

经过virginia加密后的密文 加密秘钥key=infosec lvktwvgvgnodttqifqqmubujglevmbkhziczglcsphweyvwttwoqseshxenjsgaxejgwvxqalrsxczrqsswgiaidjmxipddjiumeawfkfigfaarkvtjlawvqalhwgjvvviwwwavsuvmhnrwsfxkiyufazcklmcoixmehofrqbrktwgvqijzqlcvqqsllgxhgzagcbvtbgjjqtmraqgvfncfenlnyoarrieywuyniebvwrvprnbhyvlnyokivkbshsmpanqojkgvhrpwvqnnyhjmdcgjgwbkagnbyqgbutrkmpkhwvakjmehcetwbvsuusoxyjlaxaiaizgagzvstgvoigncfxqvbngwvcbvtkzmepejbvitagmshydtvxvwhfigfbwbvbbzgwpgafyvawrzbuckenivrglstmqzqwgquczharikbrddizqgdofhuqtsodxqvbngwvcbvthziubnwharixbnblmubbfdhvqfvrolivprkidpfqfyfafwbvtbgjjqtmraqgvfncfenlnyokivevyvswgbbkzgafqzjbkmqvnqasviqafzvmubenpmxkwaxjaeqxgnaadkvtxqgvgnhsqlmqvnsrjifcpnbywgvfnhazkblnbolkkulsfitigncfshvbngqgqvqnhaspiyiwkxtqozhaspajnhzhknsjfwrvqnqdjmxipdwkgquczhwhkvnxslshtbbraqgvfncfenahggheemffbvxjmayvwwcucqslyrtrxtjsobujbgmugnudjszqzfhasplvxhjmdcgncfetmhxsvxqorssjevmnsrjinmnxsllgalshzivqpioleumgxceiezhhwspukvjbuirzbgzwquebzzvfgqaaskxkonysvfgtbbwuspagwiuxkvtfzgamlrlfwidiljgaepvrykgvmwijfllgpvlvvmomaxwgrctqfhswgbinowbrwajblmctzjqzepqfrwfhknsjfwrvqnqdjmxipdkzitmgmskgqzrkifgvqbswksrbvrwrifbbwsvyemgmskipavywnmvghxwfkocgzodmpnbwasxkwajemmxiyjbuietnxgwwkvzflaqwuwtwfxfqfyfafwbvtbsrfllsoemexetujeouvsuamubhimaribujodkqzvyvexqkbrdmxgifjhgjpwvxmusplvywgrctqnglvkjhywgrunetabskvgiwkxtqozhaspavshziucoxdsggwsgoqiuqnsbwxywepjaevprqohpckrrsulcvvxagjfqsksjipbvfzhvkdnhmamkmkuzgvkvtmcoxqorssjevmfdbllgbvhrsxcnetallglvktwvgvgnodpaxenjsxgjndskmcvajhostsnsrusplvywgrctqnglvkjhywgruevyvgyvmkuzagkbydasxgzvfzadkvtyvwrqqfdudsdiyiwkxtqozhaspbujdjsrwfjrksncgncfqcgufjwxjmbwslmeiyfbvxgkuswuenavlbajkknsqwjqzfdbllgbvhrsxcorssjevqbskaxjlvktwvgvgnodttqifqqspjhxwfiuacwcktgkgxvzlj

Virginia加密秘钥的破解 ——唯密文攻击

概念:重合指数及其无偏估计值 重合指数:设某种语言由n个字母组成,每个字母i发生的概率为pi(1≤i≤n),则重合指数就是指两个随机字母相同的概率,记为IC 一般用IC的无偏估计值IC’来近似计算IC. 其中的xi表示字母i出现的频次,L表示文本长度,n表示某种语言中包含的字母数。

IC’值的三大特点 这是3个非常重要的结论! 可通过下面的实验加以验证。 随机英文文本的IC’总是大约为0.038.

Example 1: 一个随机英文文本明文及其IC’

对以上的随机英文文本明文采用移位加密(key=17)后的密文及其IC’

Example 2: 一个有意义的英文text Differential Privacy is the state-of-the-art goal for the problem of privacy-preserving data release and privacy-preserving data mining. Existing techniques using differential privacy, however, cannot effectively handle the publication of high-dimensional data. In particular, when the input dataset contains a large number of attributes, existing methods incur higher computing complexity and lower information to noise ratio, which renders the published data next to useless. This proposal aims to reduce computing complexity and signal to noise ratio. The starting point is to approximate the full distribution of high-dimensional dataset with a set of low-dimensional marginal distributions via optimizing score function and reducing sensitivity, in which generation of noisy conditional distributions with differential privacy is computed in a set of low-dimensional subspaces, and then, the sample tuples from the noisy approximation distribution are used to generate and release the synthetic dataset. Some crucial science problems would be investigated below: (i) constructing a low k-degree Bayesian network over the high-dimensional dataset via exponential mechanism in differential privacy, where the score function is optimized to reduce the sensitivity using mutual information, equivalence classes in maximum joint distribution and dynamic programming; (ii)studying the algorithm to compute a set of noisy conditional distributions from joint distributions in the subspace of Bayesian network, via the Laplace mechanism of differential privacy. (iii)exploring how to generate synthetic data from the differentially private Bayesian network and conditional distributions, without explicitly materializing the noisy global distribution. The proposed solution may have theoretical and technical significance for synthetic data generation with differential privacy on business prospects. 其重合指数的无偏估计值IC’为:0.0659

假设Virginia加密是针对有意义的英文文本加密,那么如何对用Virginia多表代换加密之后的密文进行破解呢? (唯密文攻击) step1:估算Virginia多表代换加密的秘钥长度 step2:再计算秘钥中的每个字符

经过预处理之后的明文文本 (只保留字符集中的字符) differentialprivacyisthestateoftheartgoalfortheproblemofprivacypreservingdatareleaseandprivacypreservingdataminingexistingtechniquesusingdifferentialprivacyhowevercannoteffectivelyhandlethepublicationofhighdimensionaldatainparticularwhentheinputdatasetcontainsalargenumberofattributesexistingmethodsincurhighercomputingcomplexityandlowerinformationtonoiseratiowhichrendersthepublisheddatanexttouselessthisproposalaimstoreducecomputingcomplexityandsignaltonoiseratiothestartingpointistoapproximatethefulldistributionofhighdimensionaldatasetwithasetoflowdimensionalmarginaldistributionsviaoptimizingscorefunctionandreducingsensitivityinwhichgenerationofnoisyconditionaldistributionswithdifferentialprivacyiscomputedinasetoflowdimensionalsubspacesandthenthesampletuplesfromthenoisyapproximationdistributionareusedtogenerateandreleasethesyntheticdatasetsomecrucialscienceproblemswouldbeinvestigatedbelowiconstructingalowkdegreebayesiannetworkoverthehighdimensionaldatasetviaexponentialmechanismindifferentialprivacywherethescorefunctionisoptimizedtoreducethesensitivityusingmutualinformationequivalenceclassesinmaximumjointdistributionanddynamicprogrammingiistudyingthealgorithmtocomputeasetofnoisyconditionaldistributionsfromjointdistributionsinthesubspaceofbayesiannetworkviathelaplacemechanismofdifferentialprivacyiiiexploringhowtogeneratesyntheticdatafromthedifferentiallyprivatebayesiannetworkandconditionaldistributionswithoutexplicitlymaterializingthenoisyglobaldistributiontheproposedsolutionmayhavetheoreticalandtechnicalsignificanceforsyntheticdatagenerationwithdifferentialprivacyonbusinessprospects

经过virginia加密后的密文 加密秘钥key=infosec lvktwvgvgnodttqifqqmubujglevmbkhziczglcsphweyvwttwoqseshxenjsgaxejgwvxqalrsxczrqsswgiaidjmxipddjiumeawfkfigfaarkvtjlawvqalhwgjvvviwwwavsuvmhnrwsfxkiyufazcklmcoixmehofrqbrktwgvqijzqlcvqqsllgxhgzagcbvtbgjjqtmraqgvfncfenlnyoarrieywuyniebvwrvprnbhyvlnyokivkbshsmpanqojkgvhrpwvqnnyhjmdcgjgwbkagnbyqgbutrkmpkhwvakjmehcetwbvsuusoxyjlaxaiaizgagzvstgvoigncfxqvbngwvcbvtkzmepejbvitagmshydtvxvwhfigfbwbvbbzgwpgafyvawrzbuckenivrglstmqzqwgquczharikbrddizqgdofhuqtsodxqvbngwvcbvthziubnwharixbnblmubbfdhvqfvrolivprkidpfqfyfafwbvtbgjjqtmraqgvfncfenlnyokivevyvswgbbkzgafqzjbkmqvnqasviqafzvmubenpmxkwaxjaeqxgnaadkvtxqgvgnhsqlmqvnsrjifcpnbywgvfnhazkblnbolkkulsfitigncfshvbngqgqvqnhaspiyiwkxtqozhaspajnhzhknsjfwrvqnqdjmxipdwkgquczhwhkvnxslshtbbraqgvfncfenahggheemffbvxjmayvwwcucqslyrtrxtjsobujbgmugnudjszqzfhasplvxhjmdcgncfetmhxsvxqorssjevmnsrjinmnxsllgalshzivqpioleumgxceiezhhwspukvjbuirzbgzwquebzzvfgqaaskxkonysvfgtbbwuspagwiuxkvtfzgamlrlfwidiljgaepvrykgvmwijfllgpvlvvmomaxwgrctqfhswgbinowbrwajblmctzjqzepqfrwfhknsjfwrvqnqdjmxipdkzitmgmskgqzrkifgvqbswksrbvrwrifbbwsvyemgmskipavywnmvghxwfkocgzodmpnbwasxkwajemmxiyjbuietnxgwwkvzflaqwuwtwfxfqfyfafwbvtbsrfllsoemexetujeouvsuamubhimaribujodkqzvyvexqkbrdmxgifjhgjpwvxmusplvywgrctqnglvkjhywgrunetabskvgiwkxtqozhaspavshziucoxdsggwsgoqiuqnsbwxywepjaevprqohpckrrsulcvvxagjfqsksjipbvfzhvkdnhmamkmkuzgvkvtmcoxqorssjevmfdbllgbvhrsxcnetallglvktwvgvgnodpaxenjsxgjndskmcvajhostsnsrusplvywgrctqnglvkjhywgruevyvgyvmkuzagkbydasxgzvfzadkvtyvwrqqfdudsdiyiwkxtqozhaspbujdjsrwfjrksncgncfqcgufjwxjmbwslmeiyfbvxgkuswuenavlbajkknsqwjqzfdbllgbvhrsxcorssjevqbskaxjlvktwvgvgnodttqifqqspjhxwfiuacwcktgkgxvzlj

step1:估算秘钥长度 (1)测试将密文分成2个子串,然后计算其IC’的平均值; (2)测试将密文分成3个子串,然后计算其IC’的平均值; …… (3)测试将密文分成n个子串,然后计算其IC’的平均值; 如果在将密文分成d个子串时, 计算其IC’的平均值近似为0.065,则Virginia加密的秘钥长度为d。

Example: 将ciphertext分成2个子串 计算2个子串的重合指数无偏估计值的平均值为IC=0.0419

Example: 将ciphertext分成3个子串 计算3个子串的重合指数无偏估计值的平均值为IC=0.0419

Example: 依此类推,将ciphertext分成7个子串 子串1:lvqbmzwwxxqziimivqvanikmbqvxbqvliiplkavncabkmbxizivbpatibazimukqqvbbxbfpqbqvlebqvqbwxvnvcvbkivviqanqiuvtvammutbgqlcmommaqmzkzeqotavlivwpmtbwtqnqimzqbbmagcnwitvuqblxubbzkiwltjnvqacwqwpkvqbdmvombnlvxjvsltjembzvqiqbwcgmikakzboqlvqjak 子串2:vgiubgeoeearapegtavvryleriqhvtfneernbnhngguhevyavgbvegvgbfbvqcbgtbvnbbvrfvtfnvbznaeagthnpflugbqyojsnpcnbfhfacrunzvghrnnlpghvbbanbgtrlrivaqiazfsnpgrbvbgvhgbaynzwfvlevhuvbfvvqhegovosnerrvsvnktrfvevgenanvqhvkyvtfyoufgubyuvnfvrbvgihcg 子串3:knfjklyqnjlqidafjlvswumhkjqgtmnyybnysqryjntwhsjisnntjmxfzyurzzrdsntwnfrkytmnyykjqfnxnxssnnnlnnniznjqdzxbngfyqxjufxnxssxsixhjgzaybwfljyjlxfnjjrjqdmksrwmyxzwjjxftytstsijyrjxynytizsxgspqrxkfhumsdhtknndjsynyyudfydizjjnfwfslsdhssknfxwx …… 子串7:gtuvchthaxcgxufkvjwhkcxqvcgcjgnrnvvvpgqdkgpjwoagoqcetdfvgrntqizuqcuiuqvfwjgnvgfqiukqkgqfgkkthqptpkvxqkhgnejcrouzpdtqvngvueurugkgpkmdpmgocgrcpkvxtqvrfepvopkxekwfwfeouiqqgppckuktpuguyvccfpkkkqvgcggagctpckuvkgkqdtprncjegnkqgcvjgtpug 计算7个子串的重合指数无偏估计值的平均值为IC=0.0657

将密文串划分成多个子串,分别求IC无偏估计值平均值 数 子串1 子串2 子串3 子串4 子串5 子串6 子串7 平 均 IC 长 1 1609 0.0419 2 805 0.0427 804 0.0411 3 537 0.0417 536 0.0424 4 403 0.0425 402 0.0.98 5 322 0.0414 0.0418 0.0413 321 0.0415 6 269 0.0402 268 0.0397 0.0441 0.0432 0.0416 7 230 0.0674 0.0677 0.0621 0.0584 0.0744 0.0666 229 0.0634 0.0657 8 … 0.0422 因为有意义的英文文本的明文IC ≈ 0.065,而移位加密不改变其IC值,所以对应的密文的IC ≈0.065。通过上表可知秘钥长度d=7.

step2:计算秘钥中的每个字符 (1) 根据Virginia加密算法可知, 每个子串中的密文字母都是对明文中的字母经过相同的移位加密得到的,即第i(i=1…d)个子串是用秘钥key中的第i个字符进行移位加密得到的!移位加密的密钥空间仅为26。因此对每个密文子串测试26次移位算法进行解密,每次测试时计算该子串的拟重合指数,拟重合指数最高的那次移位数(编码)就是该子串所对应的Virginia加密密钥中的那个字母。 (2)对步骤(1)重复d次即可得到组成密钥的所有字母。

拟重合指数 拟重合指数:设某种语言由n个字母组成,每个字母i的统计概率为pi(i=1…n),每个字母在密文子串Cj ( j=1…d)中出现的频次为fi,j ,每个密文子串Cj的长度为ni,j ,则第j个子串的拟重合指数定义为:

明文中各个字母出现的统计概率(pi)

Example: 假如对密文子串3测试26次移位算法进行解密 移位数 密文子串3经过移位 加密后的拟重合指数 1(b) 0.0387 14 0.0326 2(c) 0.0325 15 0.0348 3(d) 0.0324 16 0.0416 4(e) 0.0368 17 0.0392 5 (f) 0.0615 18 0.0405 6 0.0433 19 0.0361 7 0.0332 20 0.0461 8 0.0279 21 0.0386 9 0.0468 22 0.0356 10 0.0384 23 0.0313 11 0.0365 24 0.0364 12 25 0.0429 13 26(a) 0.0340 子串3:knfjklyqnjlqidafjlvswumhkjqgtmnyybnysqryjntwhsjisnntjmxfzyurzzrdsntwnfrkytmnyykjqfnxnxssnnnlnnniznjqdzxbngfyqxjufxnxssxsixhjgzaybwfljyjlxfnjjrjqdmksrwmyxzwjjxftytstsijyrjxynytizsxgspqrxkfhumsdhtknndjsynyyudfydizjjnfwfslsdhssknfxwx 计算密文子串3执行26次移位算法的26个拟重合指数! 所以Virginia加密密钥中的第三个字母为”f” 依此类推,可求出7个密文子串的所对应的Virginia加密的密钥为”infosec”

The End Thank you!