Skip to content

Commit d709e3d

Browse files
committed
Update doc
[skip ci]
1 parent 1a89296 commit d709e3d

File tree

1 file changed

+33
-12
lines changed

1 file changed

+33
-12
lines changed

doc/crypt.tex

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6539,29 +6539,36 @@ \subsection{Radix to binary conversion}
65396539
unsigned int *names_list_size);
65406540
\end{verbatim}
65416541
You may want to call these functions twice, first to get the amount
6542-
of memory to be allocated for the $names_list$, and a final time to
6543-
actually populate $names_list$. If $names_list$ is NULL,
6544-
$names_list_size$ will be the minimum size needed to receive the
6545-
complete $names_list$. If $names_list$ is NOT NULL, $names_list$ must
6546-
be a pointer to sufficient memory into which the $names_list$ will be
6547-
written. Also, the value in $names_list_size$ sets the upper bound of
6542+
of memory to be allocated for the $names\_list$, and a final time to
6543+
actually populate $names\_list$. If $names\_list$ is NULL,
6544+
$names\_list\_size$ will be the minimum size needed to receive the
6545+
complete $names\_list$. If $names\_list$ is NOT NULL, $names\_list$ must
6546+
be a pointer to sufficient memory into which the $names\_list$ will be
6547+
written. Also, the value in $names\_list\_size$ sets the upper bound of
65486548
the number of characters to be written. A -1 return value signifies
65496549
insufficient space.
65506550

6551-
The format of the $names_list$ string is a series of $name,value$ pairs
6551+
The format of the $names\_list$ string is a series of $name,value$ pairs
65526552
where each name and value is separated by a comma, the pairs are separated
65536553
by newlines, and the list is null terminated.
65546554

6555-
Calling either of these functions will initialize the respective
6556-
math library.
6555+
\index{crypt\_mp\_init()}
65576556
\begin{verbatim}
6558-
void init_LTM(void);
6559-
void init_TFM(void);
6560-
void init_GMP(void);
6557+
int crypt_mp_init(const char* mpi);
65616558
\end{verbatim}
65626559

6560+
To ease the setup of a specific math descriptor, in cases where the library was compiled with support for multiple MPI libraries,
6561+
the function \textit{crypt\_mp\_init()} is provided.
6562+
It takes a string to the desired MPI library to use as an argument.
6563+
The three default MPI libraries are identified as follows, \textit{LibTomMath} as \texttt{"ltm"}, \textit{TomsFastmath} as \texttt{"tfm"}
6564+
and the \textit{GNU Multi Precision Arithmetic Library} as \texttt{"gmp"}.
6565+
The identification happens case-insensitive and only on the first character.
6566+
65636567
Here is a Python program demonstrating how to call various LTC dynamic
65646568
language support functions.
6569+
6570+
A more detailed example is given in the library source in \texttt{demos/demo\_dynamic.py}.
6571+
65656572
\begin{verbatim}
65666573
from ctypes import *
65676574
@@ -8255,6 +8262,20 @@ \subsection{RSA Functions}
82558262

82568263
Since the function is given the entire RSA key (for private keys only) CRT is possible as prescribed in the PKCS \#1 v2.1 specification.
82578264

8265+
8266+
\mysection{Deprecated API functions}
8267+
8268+
\subsection{After v1.18.0}
8269+
8270+
\index{init\_LTM()} \index{init\_TFM()} \index{init\_GMP()}
8271+
\begin{verbatim}
8272+
void init_LTM(void);
8273+
void init_TFM(void);
8274+
void init_GMP(void);
8275+
\end{verbatim}
8276+
8277+
These three MPI init functions have been introduced in version 1.18.0 and have been deprecated in the same version in favor of \textit{crypt\_mp\_init()}.
8278+
82588279
\newpage
82598280
\markboth{Index}{Index}
82608281
\input{crypt.ind}

0 commit comments

Comments
 (0)