Skip to content

Commit 343a46d

Browse files
committed
Update doc
[skip ci]
1 parent 21d4545 commit 343a46d

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
@@ -6537,29 +6537,36 @@ \subsection{Radix to binary conversion}
65376537
unsigned int *names_list_size);
65386538
\end{verbatim}
65396539
You may want to call these functions twice, first to get the amount
6540-
of memory to be allocated for the $names_list$, and a final time to
6541-
actually populate $names_list$. If $names_list$ is NULL,
6542-
$names_list_size$ will be the minimum size needed to receive the
6543-
complete $names_list$. If $names_list$ is NOT NULL, $names_list$ must
6544-
be a pointer to sufficient memory into which the $names_list$ will be
6545-
written. Also, the value in $names_list_size$ sets the upper bound of
6540+
of memory to be allocated for the $names\_list$, and a final time to
6541+
actually populate $names\_list$. If $names\_list$ is NULL,
6542+
$names\_list\_size$ will be the minimum size needed to receive the
6543+
complete $names\_list$. If $names\_list$ is NOT NULL, $names\_list$ must
6544+
be a pointer to sufficient memory into which the $names\_list$ will be
6545+
written. Also, the value in $names\_list\_size$ sets the upper bound of
65466546
the number of characters to be written. A -1 return value signifies
65476547
insufficient space.
65486548

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

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

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

82548261
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.
82558262

8263+
8264+
\mysection{Deprecated API functions}
8265+
8266+
\subsection{After v1.18.0}
8267+
8268+
\index{init\_LTM()} \index{init\_TFM()} \index{init\_GMP()}
8269+
\begin{verbatim}
8270+
void init_LTM(void);
8271+
void init_TFM(void);
8272+
void init_GMP(void);
8273+
\end{verbatim}
8274+
8275+
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()}.
8276+
82568277
\newpage
82578278
\markboth{Index}{Index}
82588279
\input{crypt.ind}

0 commit comments

Comments
 (0)