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: crypt.tex
+15-5Lines changed: 15 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@
47
47
\def\gap{\vspace{0.5ex}}
48
48
\makeindex
49
49
\begin{document}
50
-
\title{LibTomCrypt \\ Version 1.12}
50
+
\title{LibTomCrypt \\ Version 1.13}
51
51
\author{Tom St Denis \\
52
52
\\
53
53
tomstdenis@gmail.com \\
@@ -280,8 +280,7 @@ \section{Macros}
280
280
281
281
\section{Functions with Variable Length Output}
282
282
Certain functions such as (for example) ``rsa\_export()'' give an output that is variable length. To prevent buffer overflows you
283
-
must pass it the length of the buffer\footnote{Extensive error checking is not in place but it will be in future releases so it is a good idea to follow through with these guidelines.} where
284
-
the output will be stored. For example:
283
+
must pass it the length of the buffer where the output will be stored. For example:
285
284
\begin{small}
286
285
\begin{verbatim}
287
286
#include <tomcrypt.h>
@@ -313,6 +312,9 @@ \section{Functions with Variable Length Output}
313
312
indicating a buffer overflow would have occurred. If the function succeeds it stores the length of the output
314
313
back into ``x'' so that the calling application will know how many bytes were used.
315
314
315
+
As of v1.13, most functions will update your length on failure to indicate the size required by the function. Not all functions
316
+
support this so please check the source before you rely on it doing that.
317
+
316
318
\section{Functions that need a PRNG}
317
319
\index{Pseudo Random Number Generator} \index{PRNG}
318
320
Certain functions such as ``rsa\_make\_key()'' require a Pseudo Random Number Generator (PRNG). These functions do not setup
@@ -5018,6 +5020,14 @@ \section{BigNum Math Descriptors}
5018
5020
*/
5019
5021
int (*mulmod)(void *a, void *b, void *c, void *d);
0 commit comments