zoj 1009 Enigma (模拟)

该博客介绍了二战时期德国使用的Enigma电子加密机的工作原理,包括单转子和双转子结构,以及如何根据输入信息解密加密文本。通过程序设计,实现对Enigma加密的解密过程。
摘要由CSDN通过智能技术生成

原题

In World War II, Germany once used an electronic encryption machine called Enigma, which played a decisive role in the initial victories of Nazi Germany. It was proved to be one of the most reliable encryption systems in history. However, it was the blind trust on the reliability of the machine that brought about the doom of its user.

The structure of a one-rotor Enigma is shown as follows (the Enigma has only six keys):

The key element of the Enigma is the rotor, as shown in the second figure, which uses electronic circuits to transform plaintext (input from keyboard) into cryptograph (output on screen). When one key on the keyboard is pressed, the corresponding cryptograph is shown on screen. Then the rotor will automatically revolve a one-letter-step to a different position. The following figures illustrate how the rotor works when letter "b" is pressed three successively times:

When letter "b" is pressed for the first time, the signal goes through the circuit and "A" is shown

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值