xref: /minix3/crypto/external/bsd/heimdal/dist/lib/hcrypto/libtommath/poster.tex (revision ebfedea0ce5bbe81e252ddf32d732e40fb633fae)
1*ebfedea0SLionel Sambuc\documentclass[landscape,11pt]{article}
2*ebfedea0SLionel Sambuc\usepackage{amsmath, amssymb}
3*ebfedea0SLionel Sambuc\usepackage{hyperref}
4*ebfedea0SLionel Sambuc\begin{document}
5*ebfedea0SLionel Sambuc\hspace*{-3in}
6*ebfedea0SLionel Sambuc\begin{tabular}{llllll}
7*ebfedea0SLionel Sambuc$c = a + b$  & {\tt mp\_add(\&a, \&b, \&c)} & $b = 2a$  & {\tt mp\_mul\_2(\&a, \&b)} & \\
8*ebfedea0SLionel Sambuc$c = a - b$  & {\tt mp\_sub(\&a, \&b, \&c)} & $b = a/2$ & {\tt mp\_div\_2(\&a, \&b)} & \\
9*ebfedea0SLionel Sambuc$c = ab $   & {\tt mp\_mul(\&a, \&b, \&c)}  & $c = 2^ba$  & {\tt mp\_mul\_2d(\&a, b, \&c)}  \\
10*ebfedea0SLionel Sambuc$b = a^2 $  & {\tt mp\_sqr(\&a, \&b)}       & $c = a/2^b, d = a \mod 2^b$ & {\tt mp\_div\_2d(\&a, b, \&c, \&d)} \\
11*ebfedea0SLionel Sambuc$c = \lfloor a/b \rfloor, d = a \mod b$ & {\tt mp\_div(\&a, \&b, \&c, \&d)} & $c = a \mod 2^b $  & {\tt mp\_mod\_2d(\&a, b, \&c)}  \\
12*ebfedea0SLionel Sambuc && \\
13*ebfedea0SLionel Sambuc$a = b $  & {\tt mp\_set\_int(\&a, b)}  & $c = a \vee b$  & {\tt mp\_or(\&a, \&b, \&c)}  \\
14*ebfedea0SLionel Sambuc$b = a $  & {\tt mp\_copy(\&a, \&b)} & $c = a \wedge b$  & {\tt mp\_and(\&a, \&b, \&c)}  \\
15*ebfedea0SLionel Sambuc && $c = a \oplus b$  & {\tt mp\_xor(\&a, \&b, \&c)}  \\
16*ebfedea0SLionel Sambuc & \\
17*ebfedea0SLionel Sambuc$b = -a $  & {\tt mp\_neg(\&a, \&b)}  & $d = a + b \mod c$  & {\tt mp\_addmod(\&a, \&b, \&c, \&d)}  \\
18*ebfedea0SLionel Sambuc$b = |a| $  & {\tt mp\_abs(\&a, \&b)} & $d = a - b \mod c$  & {\tt mp\_submod(\&a, \&b, \&c, \&d)}  \\
19*ebfedea0SLionel Sambuc && $d = ab \mod c$  & {\tt mp\_mulmod(\&a, \&b, \&c, \&d)}  \\
20*ebfedea0SLionel SambucCompare $a$ and $b$ & {\tt mp\_cmp(\&a, \&b)} & $c = a^2 \mod b$  & {\tt mp\_sqrmod(\&a, \&b, \&c)}  \\
21*ebfedea0SLionel SambucIs Zero? & {\tt mp\_iszero(\&a)} & $c = a^{-1} \mod b$  & {\tt mp\_invmod(\&a, \&b, \&c)} \\
22*ebfedea0SLionel SambucIs Even? & {\tt mp\_iseven(\&a)} & $d = a^b \mod c$ & {\tt mp\_exptmod(\&a, \&b, \&c, \&d)} \\
23*ebfedea0SLionel SambucIs Odd ? & {\tt mp\_isodd(\&a)} \\
24*ebfedea0SLionel Sambuc&\\
25*ebfedea0SLionel Sambuc$\vert \vert a \vert \vert$ & {\tt mp\_unsigned\_bin\_size(\&a)} & $res$ = 1 if $a$ prime to $t$ rounds? & {\tt mp\_prime\_is\_prime(\&a, t, \&res)} \\
26*ebfedea0SLionel Sambuc$buf \leftarrow a$          & {\tt mp\_to\_unsigned\_bin(\&a, buf)} & Next prime after $a$ to $t$ rounds. & {\tt mp\_prime\_next\_prime(\&a, t, bbs\_style)} \\
27*ebfedea0SLionel Sambuc$a \leftarrow buf[0..len-1]$          & {\tt mp\_read\_unsigned\_bin(\&a, buf, len)} \\
28*ebfedea0SLionel Sambuc&\\
29*ebfedea0SLionel Sambuc$b = \sqrt{a}$ & {\tt mp\_sqrt(\&a, \&b)}  & $c = \mbox{gcd}(a, b)$ & {\tt mp\_gcd(\&a, \&b, \&c)} \\
30*ebfedea0SLionel Sambuc$c = a^{1/b}$ & {\tt mp\_n\_root(\&a, b, \&c)} & $c = \mbox{lcm}(a, b)$ & {\tt mp\_lcm(\&a, \&b, \&c)} \\
31*ebfedea0SLionel Sambuc&\\
32*ebfedea0SLionel SambucGreater Than & MP\_GT & Equal To & MP\_EQ \\
33*ebfedea0SLionel SambucLess Than & MP\_LT & Bits per digit & DIGIT\_BIT \\
34*ebfedea0SLionel Sambuc\end{tabular}
35*ebfedea0SLionel Sambuc\end{document}
36