Caesar Cipher
一个凯撒密码<一个HreF=“#citation-1" class="citation-link">[[1这是给予的
使用凯撒密码
设计和使用凯撒密码的步骤
选择一个值以移动字母。
制作一个表格中包含标准字母顺序的字母的表,底行是新的移位字母。
通过将消息中的每个字母与等效移位的字母交换来编码消息。
Make sure that the message’s intended recipient knows the shifting scheme you used to encode the message so they can decode it.
凯撒密码解密消息编码,s一世mplyt一个ketHe value of 26 minus the shift value, and apply that new value to shift the encoded message back to its original form.
使用下表描述的凯撒密码,编码以下消息:“我喜欢化学”。(注意:无视案例)。
一个 b C d e F G H 一世 j k l m n o p 问 r s t 你 v w X y z k l m n o p 问 r s t 你 v w X y z 一个 b C d e F G H 一世 j Note: this is a shift of 10.
10个转移编码为“我喜欢化学”到“ S VSUO Mrowscdbi”。
使用14个偏移的凯撒密码,编码以下消息:我发送秘密消息。(注意:您可以无视案例)。
一个 b C d e F G H 一世 j k l m n o p 问 r s t 你 v w X y z o p 问 r s t 你 v w X y z 一个 b C d e F G H 一世 j k l m n Solution:
浏览桌子,将“我发送秘密消息”一词中的每个字母匹配到表中相应的编码字母。例如,字母“ S”被编码为“ G”,字母“ C”被编码为“ Q”。
Using this process, "I send secret messages" can be encoded as "W gsbr gsqfsh asggousg".
Pros and Cons of a Caesar Cipher
凯撒密码非常易于设计,但也很容易解码。要破解凯撒代码,解码器可以简单地经过字母的每一个可能的偏移(全部
凯撒密码的实施
这是在Python中实现凯撒密码编码器的一种方法。<一个HreF=“#citation-2" class="citation-link">[2]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 23 24 26 27 28 29 28 29 30 31 32 32 33 |
|
这是在Python实施蛮力凯撒密码求解器的一种方法。<一个HreF=“#citation-2" class="citation-link">[2]
也可以看看
References
- , C。GydF4y2BaCaesar3。2016年4月30日从<一个HreF=“Https://commons.wikimedia.org/wiki/File:Caesar3.svg">https://commons.wikimedia.org/wiki/file:caesar3.svg
- Sweigart,A。GydF4y2Ba用蛮力技术黑客攻击凯撒密码
。2016年5月10日从<一个HreF=“Https://inventwithpython.com/hacking/chapter7.html">https://inventwithpython.com/hacking/chapter7.html