• 古典密码-简单替换密码


    原理

    简单替换密码(Simple Substitution Cipher)加密时,将每个明文字母替换为与之唯一对应且不同的字母。它与恺撒密码之间的区别是其密码字母表的字母不是简单的移位,而是完全是混乱的,这也使得其破解难度要高于凯撒密码。 比如:

    明文字母 : abcdefghijklmnopqrstuvwxyz
    密钥字母 : phqgiumeaylnofdxjkrcvstzwb
    

    a 对应 p,d 对应 h,以此类推。

    明文:the quick brown fox jumps over the lazy dog
    密文:cei jvaql hkdtf udz yvoxr dsik cei npbw gdm
    

    而解密时,我们一般是知道了每一个字母的对应规则,才可以正常解密。

    破解

    由于这种加密方式导致其所有的密钥个数是26!26! ,所以几乎上不可能使用暴力的解决方式。所以我们 一般采用词频分析。

    工具

    • 在线网站:http://quipqiup.com/
      该网站提供一个密文和线索输入框,执行后自动进行匹配破解,例如:

      密文Puzzle:
      cei jvaql hkdtf udz yvoxr dsik cei npbw gdm

      线索Clues:
      g=d

      解密结果:第二行

      0 -1.604 the jumps brown fox quick over the lazy dog
      1 -1.604 the quick brown fox jumps over the lazy dog
      2 -1.632 the films brown you ?i??? over the jack dog
      3 -1.632 the ?i??? brown you films over the jack dog
      4 -1.860 one ?i??? black was right axel one jump day
      5 -1.885 she ?u??? front box quick over she play dog
      6 -1.885 she quick front box ?u??? over she play dog
      7 -1.889 she ?u??? brown tom quick over she play dog
  • 相关阅读:
    表格维护:弹出
    表格联动
    表单查询
    浅谈分治 —— 洛谷P1228 地毯填补问题 题解
    The Captain 题解
    网课集训记
    2020-1-20寒假集训记
    博客使用声明
    JZOJ P5829 string 线段树
    线段树--CF438D The Child and Sequence
  • 原文地址:https://www.cnblogs.com/labster/p/13834472.html
Copyright © 2020-2023  润新知