summaryrefslogtreecommitdiff
path: root/doc/context/third/enigma/enigma_manual.tex
blob: 281ae93972c86f63649e5b9d37834add960f717d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
\startdocchapter[title=Example: Encrypted Document]

Encrypt the text of your document using the script interface. For
a start try out the settings as given in below listing.

\starttyping
mtxrun --script mtx-t-enigma                    \
       --setup="other_chars = ok,               \
                day_key = B I II III 01 01 01,  \
                rotor_setting = xyz,            \
                verbose=0"                      \
       --text="Nobody can read this."
\stoptyping

This will result in the thoroughly scrambled string
\type{zdkbxwwnwkazpokvgr}.
Then, use the same settings you encrypted the text with in your
document.

\startcontexttyping
\usemodule[enigma]
\defineenigma [secretmessage]
\setupenigma  [secretmessage] [
  other_chars = ok,
  day_key = B I II III 01 01 01,
  rotor_setting = xyz,
  verbose=3,
]

\starttext

\startsecretmessage
zdkbxwwnwkazpokvgr
\stopsecretmessage

\stoptext
\stopcontexttyping

If you compile this document with \CONTEXT, the plain text will
reappear.
Notice that punctuation is substituted with the letter “x” before
encryption and that spaces are omitted.

\stopdocchapter

\startdocchapter[title=Acknowledgements]
The Enigma module was inspired by Arno Trautmann’s
\identifier{chickenize} package.
Without \LUATEX, encryption on node-level would not have been possible.
\stopdocchapter