fix doc/bn.tex
This commit is contained in:
parent
6a9deb79da
commit
d81c3d5f03
@ -1168,7 +1168,7 @@ It is also not very uncommon to need just the power of two $2^b$; for example t
|
|||||||
\begin{alltt}
|
\begin{alltt}
|
||||||
int mp_2expt(mp_int *a, int b);
|
int mp_2expt(mp_int *a, int b);
|
||||||
\end{alltt}
|
\end{alltt}
|
||||||
It is faster than doing it by shifting $1$ with \texttt{mp_mul_2d}.
|
It is faster than doing it by shifting $1$ with \texttt{mp\_mul\_2d}.
|
||||||
|
|
||||||
\subsection{Polynomial Basis Operations}
|
\subsection{Polynomial Basis Operations}
|
||||||
|
|
||||||
@ -1745,7 +1745,7 @@ moduli of the a ``restricted diminished radix'' form lead to the fastest modular
|
|||||||
and the other two algorithms.
|
and the other two algorithms.
|
||||||
|
|
||||||
\section{Modulus a Power of Two}
|
\section{Modulus a Power of Two}
|
||||||
\index{mp\_mod_2d}
|
\index{mp\_mod\_2d}
|
||||||
\begin{alltt}
|
\begin{alltt}
|
||||||
int mp_mod_2d(const mp_int *a, int b, mp_int *c)
|
int mp_mod_2d(const mp_int *a, int b, mp_int *c)
|
||||||
\end{alltt}
|
\end{alltt}
|
||||||
@ -2009,7 +2009,8 @@ int mp_rand(mp_int *a, int digits)
|
|||||||
\end{alltt}
|
\end{alltt}
|
||||||
The function generates a random number of \texttt{digits} bits.
|
The function generates a random number of \texttt{digits} bits.
|
||||||
|
|
||||||
This random number is cryptographically secure if the source of random numbers the operating systems offers is cryptographically secure. It will use \texttt{arc4random()} if the OS is a BSD flavor, Wincrypt on Windows, and \texttt{\dev\urandom} on all operating systems that have it.
|
This random number is cryptographically secure if the source of random numbers the operating systems offers is cryptographically secure.
|
||||||
|
It will use \texttt{arc4random()} if the OS is a BSD flavor, Wincrypt on Windows, and \texttt{\\dev\\urandom} on all operating systems that have it.
|
||||||
|
|
||||||
|
|
||||||
\chapter{Input and Output}
|
\chapter{Input and Output}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user