You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/ISSUE_TEMPLATE.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@ This is a very generic template, remove items that do not apply. For completed i
10
10
11
11
*[ ] Checked the developer manual
12
12
*[ ] Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=repo%3Alibtom%2Flibtomcrypt
13
+
*[ ] Checked that your issue isn't due to the fact that you're using asymmetric cryptography and you forgot linking in and/or setting an MPI provider (usually this causes either random crashes or runtime errors like `LTC_ARGCHK 'ltc_mp.name != NULL' failure ...`). c.f. Ch. "Math Descriptors" of the developer manual.
13
14
*[ ] Checked that your issue isn't related to TomsFastMath's limitation that PK operations can by default only be done with max. 2048bit keys
That will build and install the library with all descriptors (and link against all), but only use TomsFastMath in the timing demo.
8295
8283
8284
+
To avoid random crashes and run--time errors in the form \texttt{LTC\_ARGCHK 'ltc\_mp.name != NULL' failure ...}, one has to
8285
+
initialise the \texttt{ltc\_mp} struct. This can be done in multiple ways as shown below.
8286
+
8287
+
\index{crypt\_mp\_init()}
8288
+
\begin{verbatim}
8289
+
int crypt_mp_init(const char* mpi);
8290
+
\end{verbatim}
8291
+
8292
+
To ease the setup of a specific math descriptor, in cases where the library was compiled with support for multiple MPI libraries,
8293
+
the function \textit{crypt\_mp\_init()} is provided.
8294
+
It takes a string to the desired MPI library to use as an argument.
8295
+
The three default MPI libraries are identified as follows, \textit{LibTomMath} as \texttt{"ltm"}, \textit{TomsFastmath} as \texttt{"tfm"}
8296
+
and the \textit{GNU Multi Precision Arithmetic Library} as \texttt{"gmp"}.
8297
+
The identification happens case-insensitive and only on the first character.
8298
+
8299
+
8300
+
\begin{verbatim}
8301
+
#include <tomcrypt.h>
8302
+
8303
+
int main(void)
8304
+
{
8305
+
/* set it by hand */
8306
+
ltc_mp = gmp_desc;
8307
+
ltc_mp = ltm_desc;
8308
+
ltc_mp = tfm_desc;
8309
+
8310
+
/* use the provided API */
8311
+
crypt_mp_init("GMP");
8312
+
crypt_mp_init("LibTomMath");
8313
+
crypt_mp_init("TomsFastMath");
8314
+
}
8315
+
\end{verbatim}
8316
+
8317
+
8296
8318
\chapter{Optimizations}
8297
8319
\mysection{Introduction}
8298
8320
The entire API was designed with plug and play in mind at the low level. That is you can swap out any cipher, hash, PRNG or bignum library and the dependent API will not
0 commit comments