📄 enigma.txt
字号:
ENIGMA
A simulator for the WW II cryptographic engine
(c) 1995 by Andreas G. Lessig, Hamburg
(1) Introduction
The program ENIGMA was written to simulate the three rotor version
of the german Enigma. I wanted it to come as close to the original
as possible. A second requirement was to keep it as portable as
possible. This led to some limitations I couldn't avoid:
1. The original Enigma produces a horrible sound when a key is
pressed. I wasn't able to program that. So my program remains
silent.
2. On a PC the driver ansi.sys is required. I know it isn't very
popular, but there is no way of programming graphics portable
in C.
3. The PC is the only System on which the programs makes use of
colours. On other system the ENIGMA is white on black or black
on white, depending on the graphic abilities of the system and
my knowledge in programming graphic routines for it.
You might want to write your own graphic routines. I won't
prohibit that, but follow the restrictions in the file
"porting.txt". There you also find some documentation for the
graphic routines.
4. Due to a lack of time I didn't program aroutine to simulate the
failure of single lamps which occured frequently at a real
Enigma I was comparing my program with.
I hope you nevertheless enjoy it.
Andreas Lessig, 27.4.1995
(2) Legal Notice
(a) The program comes "as is". There is no implied warranty whatsoever.
I don't guarantee for the functuality nor do I pay if you manage to
trash your system with it.
(b) You may use it for non comercial purposes. If you find a way to make
money out of it, you need a license to do so.
Just contact me and I'm sure we will come to an agreement. My current
email adress is
1lessig@rzdspc1.informatik.uni-hamburg.de
(c) You might copy the program for private purposes and distribute it on
a noncomercial base.
Again as long as you just charge your own costs for that, I encourage
you to spread my program. If you make profit out of it, I want my
share.
There is one restriction. This file, "porting.txt" and the source code
form a package. You might only distribute them together.
(d) If you want to change the graphic routines or port the program to
another system, feel free to do so.
But mark all changes as yours, update the log at the beginning of the
source and make an entry at the title screens, so everybody knows, this
version has be altered.
Make all changes which aren't portable 100% depending on a switch. How to
do this is described in "porting.txt".
(3) Getting started
The program has three options:
-c simulates a green (only PC) celluloid cover, through wich only the
lit windows can be seen.
-d DEBUG option. Shows before the initial screen the assumpions the
program makes about your system. During encryption all steps of the
process are shown.
-t simulates a tty connected to the enigma. On a white strip you can
see the last 65 encrypted characters formatted in groups of five.
Such a device wasn't used with the original Enigma. There were some
tests, but according to my sources technical problems led to the
suspension of this projekt.
After you have called the program you might see the debug screen or the
first title screen. Read every page carefully and press then <return>.
After three or for presses you should enter the setup. Here are the current
settings shown and you have the possibility to change them.
(a) Plugboard
Just press <p> and you enter the plugboard menu. Here you may enter
new wirings to the plugboard. If you enter a plug already used by
another connection that connection is removed.
With <ESC> you get back to the setup.
(b) Rotors
With <c> you get to the rotor setup. Here you you may choose rotors and
reflektor. You also can enter the ringsetting for each rotor.
<ESC> brings you back to the main setup.
(c) Operating the Enigma
With <e> you get to the simulation. Here you see in the lower part a
representation of the keyboard. If you press a key, its representation
will change its colour.
Above you see a representation of the windows. Everytime a Character is
entered one window will be lit by a bulb behind it. This way the result
of the encryption is displayed to the operator.
Over the windows you see the rotors. At least one of them will turn
before each encryption. You might use the arrow keys to change their
initial position. You might also use <Cntrl-b> and <Cntrl-f> to turn one
rotor and <Cntrl-p> and <Cntrl-n> to choose which rotor it shall be.
<F1> or <1> brings you back to the setup
<ESC> exits the program
(4) Acknowledgements
This program wouldn't have existed without Professor Klaus Brunnstein,
who borrowed a real Enigma from the Bundesamt f"ur Sicherheit in der
Informationstechnik, and Vesselin Bontchev, who explained it and found
the technical data which was indispensible for the realization of this
project.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -