@@ -6537,29 +6537,36 @@ \subsection{Radix to binary conversion}
65376537 unsigned int *names_list_size);
65386538\end {verbatim }
65396539You 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
65466546the number of characters to be written. A -1 return value signifies
65476547insufficient 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
65506550where each name and value is separated by a comma, the pairs are separated
65516551by 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+
65616565Here is a Python program demonstrating how to call various LTC dynamic
65626566language support functions.
6567+
6568+ A more detailed example is given in the library source in \texttt {demos/demo\_ dynamic.py }.
6569+
65636570\begin {verbatim }
65646571from ctypes import *
65656572
@@ -8253,6 +8260,20 @@ \subsection{RSA Functions}
82538260
82548261Since 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