X-Git-Url: https://git.distorted.org.uk/~mdw/mdwtools/blobdiff_plain/baa9f3563a25ec9040d59b44a86d62f4d9786258..3ff2337bdbdfae2cc2f13846a216ce6af53bdd05:/crypto.dtx

diff --git a/crypto.dtx b/crypto.dtx
index b233a2d..a966f69 100644
--- a/crypto.dtx
+++ b/crypto.dtx
@@ -17,12 +17,12 @@
 %% it under the terms of the GNU General Public License as published by
 %% the Free Software Foundation; either version 2 of the License, or
 %% (at your option) any later version.
-%% 
+%%
 %% This program is distributed in the hope that it will be useful,
 %% but WITHOUT ANY WARRANTY; without even the implied warranty of
 %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 %% GNU General Public License for more details.
-%% 
+%%
 %% You should have received a copy of the GNU General Public License
 %% along with this program; if not, write to the Free Software Foundation,
 %% Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -34,7 +34,7 @@
 %<+package>                [2001/09/16 1.0 Crypto typesetting]
 % \end{meta-comment}
 %
-% \CheckSum{245}
+% \CheckSum{258}
 %% \CharacterTable
 %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
 %%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
@@ -138,6 +138,12 @@
 % using the |\inr| command, which just typesets an $\in$ sign with a
 % subscript `R': `$\inr$'.
 %
+% Should one wish, one can use a different character than `R' to denote
+% randomness.  Some authors use `\$', for example.  I know of one
+% (cheapskate?) author who has used `\rlap/c'.  Redefining the |\random|
+% command lets you do this.  For example, you can say
+% |\newcommand{\random}{\$}| should you so wish.
+%
 % \DescribeMacro\id
 % Long identifiers can be typeset using the |\id| command. giving the
 % identifier name as an argument.  The |\id| command is only valid in maths
@@ -174,7 +180,7 @@
 % \DescribeMacro\Game
 % \begin{synshorts}
 % Some standard `things' are provided: "\\Succ{"<notion>"}{"<scheme>"}",
-% "\\Adv{"<notion>"}{"<scheme>"}", "\\InSec{"<notion>"}", 
+% "\\Adv{"<notion>"}{"<scheme>"}", "\\InSec{"<notion>"}",
 % "\\Expt{"<notion>"}{"<scheme>"}", and "\\Game{"<notion>"}{"<scheme>"}".
 % \end{synshorts}
 %
@@ -193,12 +199,12 @@
 % \syntax{"\\Perm{"<L>"}"} typeset $\Func{l}{L}$ and $\Perm{L}$ respectively,
 % and are intended to denote the sets of all functions $F\colon \{0, 1\}^l
 % \to \{0, 1\}^L$ and all permutations $\Pi\colon \{0, 1\}^L \to \{0, 1\}^L$
-% respectively. 
+% respectively.
 %
 % \DescribeMacro\PKCS
 % Finally, the |\PKCS| macro typesets `\PKCS{$n$}', allowing you to name RSA
 % Security Inc.'s Public Key Cryptography Standards in a relatively nice way.
-% 
+%
 % \implementation
 %
 %
@@ -213,7 +219,7 @@
 \RequirePackage{amstext}
 \RequirePackage{xspace}
 %    \end{macrocode}
-
+%
 % \subsection{Algorithm typsetting}
 %
 % \begin{macro}{\cookie}
@@ -240,8 +246,9 @@
 % nicer.
 %
 %    \begin{macrocode}
-\def\inr{\mathrel{\in_R}}
-\def\getsr{\mathrel{\mathop{\gets}\limits^{\scriptscriptstyle R}}}
+\providecommand\random{R}
+\def\inr{\mathrel{\in_{\random}}}
+\def\getsr{\mathrel{\mathop{\gets}\limits^{\scriptscriptstyle\random}}}
 %    \end{macrocode}
 %
 % \end{macro}
@@ -278,6 +285,9 @@
 \def\PARSE{\kw{parse}}
 \def\AS{\kw{as}}
 \def\NEW{\ifmmode\mathop{\kw{new}}\else\kw{new}\fi}
+\def\SEND{\kw{send}}
+\def\OUTPUT{\kw{output}}
+\def\STOP{\kw{stop}}
 %    \end{macrocode}
 %
 % \begin{environment}{program}
