美文网首页
恺撒加密法

恺撒加密法

作者: 鹿生鲜 | 来源:发表于2017-01-12 11:19 被阅读0次

    「恺撒密码」据传是古罗马恺撒大帝用来保护重要军情的加密系统。

    恺撒加密(Caesar cipher)是一种简单的消息编码方式:它根据字母表将消息中的每个字母移动常量位k。举个例子如果k等于3,则在编码后的消息中,每个字母都会向前移动3位:a会被替换为d;b会被替换成e;依此类推。字母表末尾将回卷到字母表开头。于是,w会被替换为z,x会被替换为a。

    Our beloved Republic is in the hands of madmen. This is a dark day and I stand at a fork of the road. I can abide the law and surrender my arms to the senate and watch the Repubic fall to tyranny and chaos! Or, I can go home with my sword in my hand and run those maniacs to the Tarpeian Rock!

    将这段演讲(《Rome》中Caesar反攻Pompey所作演讲)以key=13加密得到如下结果:

    bhe orybirq erchoyvp vf va gur unaqf bs znqzra. guvf vf n qnex qnl naq v fgnaq ng n sbex bs gur ebnq. v pna novqr gur ynj naq fheeraqre zl nezf gb gur frangr naq jngpu gur erchovp snyy gb glenaal naq punbf! be, v pna tb ubzr jvgu zl fjbeq va zl unaq naq eha gubfr znavnpf gb gur gnecrvna ebpx!

    恺撒加密法Python代码,恺撒加密法暴力破解(穷举)代码:

    恺撒加密法 暴力破解(穷举)

    相关文章

      网友评论

          本文标题:恺撒加密法

          本文链接:https://www.haomeiwen.com/subject/viydbttx.html