mirror of
https://github.com/GaloisInc/cryptol.git
synced 2024-12-02 23:25:03 +03:00
parent
117dc0a931
commit
054a3e2248
Binary file not shown.
@ -701,10 +701,11 @@ The signature\indSignature on {\tt msg'} is revealing: We are taking a
|
|||||||
string that has {\tt diameter * row} characters in it, and chopping it
|
string that has {\tt diameter * row} characters in it, and chopping it
|
||||||
up so that it has {\tt row} elements, each of which is a string that
|
up so that it has {\tt row} elements, each of which is a string that
|
||||||
has {\tt diameter} characters in it. Here is Cryptol in action,
|
has {\tt diameter} characters in it. Here is Cryptol in action,
|
||||||
encrypting the message {\tt ATTACKATDAWN}:
|
encrypting the message {\tt ATTACKATDAWN}, with {\tt diameter} set to
|
||||||
|
{\tt 3}:
|
||||||
\begin{Verbatim}
|
\begin{Verbatim}
|
||||||
Cryptol> :set ascii=on
|
Cryptol> :set ascii=on
|
||||||
Cryptol> scytale "ATTACKATDAWN"
|
Cryptol> scytale `{diameter=3} "ATTACKATDAWN"
|
||||||
"ACDTKATAWATN"
|
"ACDTKATAWATN"
|
||||||
\end{Verbatim}
|
\end{Verbatim}
|
||||||
Decryption is essentially the same process, except we have to {\tt
|
Decryption is essentially the same process, except we have to {\tt
|
||||||
@ -724,7 +725,7 @@ precisely the same, except for the signature on {\tt msg'}! When
|
|||||||
viewed as a matrix, the types precisely tell which transposition we
|
viewed as a matrix, the types precisely tell which transposition we
|
||||||
want at each step. We have:
|
want at each step. We have:
|
||||||
\begin{Verbatim}
|
\begin{Verbatim}
|
||||||
Cryptol> dScytale "ACDTKATAWATN"
|
Cryptol> dScytale `{diameter=3} "ACDTKATAWATN"
|
||||||
"ATTACKATDAWN"
|
"ATTACKATDAWN"
|
||||||
\end{Verbatim}
|
\end{Verbatim}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user