Home | History | Annotate | Download | only in libtommath

Lines Matching refs:Function

161 access to every function LibTomMath offers.
172 function in the respective file will be compiled and linked into the library. Accordingly when the define
188 & functional mp\_div() function \\
195 A trim is a manner of removing functionality from a function that is not required. For instance, to perform
252 function per source file and often I use a ``middle-road'' approach where I don't cut corners for an extra 2\% speed
267 \hline Commented function prototypes & X && GnuPG function names are cryptic. \\
270 \hline Large function base & X & & GnuPG is barebones. \\
300 There are three possible return codes a function may return.
308 \hline MP\_OKAY & The function succeeded. \\
309 \hline MP\_VAL & The function input was invalid. \\
321 The last two codes listed are not actually ``return'ed'' by a function. They are placed in an integer (the caller must
323 to a string use the following function.
354 \section{Function Organization}
377 A single mp\_int can be initialized with the ``mp\_init'' function.
384 This function expects a pointer to an mp\_int structure and will initialize the members of the structure so the mp\_int
407 When you are finished with an mp\_int it is ideal to return the heap it used back to the system. The following function
415 The function expects a pointer to a previously initialized mp\_int structure and frees the heap it uses. It sets the
445 The mp\_init\_multi() function provides this functionality.
453 at once. If the function returns MP\_OKAY then all of the mp\_int variables are ready to use, otherwise none of them
454 are available for use. A complementary mp\_clear\_multi() function allows multiple mp\_int variables to be free'd
481 To initialized and make a copy of an mp\_int the mp\_init\_copy() function has been provided.
488 This function will initialize $a$ and make it a copy of $b$ if all goes well.
515 default number of digits. By default, all initializers allocate \textbf{MP\_PREC} digits. This function lets
523 The $size$ parameter must be greater than zero. If the function succeeds the mp\_int $a$ will be initialized
549 digits can be removed to return memory to the heap with the mp\_shrink() function.
606 $size$ the function will not do anything.
642 small constant assignment functions. The first function is used to set a single digit constant while the second sets
648 Setting a single digit can be accomplished with the following function.
656 function has a return type of \textbf{void}. It cannot cause an error so it is safe to assume the function
683 To set a constant that is the size of an ISO C ``unsigned long'' and larger than a single digit the following function
691 This will assign the value of the 32-bit variable $b$ to the mp\_int $a$. Unlike mp\_set() this function will always
693 this function can fail if it runs out of heap memory.
695 To get the ``unsigned long'' copy of an mp\_int the following function can be used.
810 mp\_int structures. This is analogous to an absolute comparison. The function mp\_cmp\_mag() will compare two
817 This will compare $a$ to $b$ placing $a$ to the left of $b$. This function cannot fail and will return one of the
856 If this program\footnote{This function uses the mp\_neg() function which is discussed in section \ref{sec:NEG}.} completes
867 To compare two mp\_int variables based on their signed value the mp\_cmp() function is provided.
876 individually. This function will return one of the compare conditions codes listed in figure \ref{fig:CMP}.
914 If this program\footnote{This function uses the mp\_neg() function which is discussed in section \ref{sec:NEG}.} completes
923 To compare a single digit against an mp\_int the following function has been provided.
931 positive. This function is rather handy when you have to compare against small values such as $1$ (which often
932 comes up in cryptography). The function cannot fail and will return one of the tree compare condition codes
1043 Since $10 > 7$ and $5 < 7$. To multiply by a power of two the following function can be used.
1051 zero the function will copy $a$ to ``c'' without performing any further actions.
1060 function simply copies $a$ over to ``c'' and zeroes $d$. The variable $d$ may be passed as a \textbf{NULL}
1071 following function provides this operation.
1079 in the least significant digits. Similarly to divide by a power of $x$ the following function is provided.
1085 This will divide $a$ in place by $x^b$ and discard the remainder. This function cannot fail as it performs the operations
1138 To perform a complete and general integer division with remainder use the following function.
1147 $b$ is zero the function returns \textbf{MP\_VAL}.
1157 Which assigns the full signed product $ab$ to $c$. This function actually breaks into one of four cases which are
1217 Since squaring can be performed faster than multiplication it is performed it's own function instead of just using
1304 a decent speedup over straight division. First a $\mu$ value must be precomputed with the following function.
1396 setup for instance, the limit is $127$ digits ($3556$--bits). Note that this function is not limited to
1402 To quickly calculate $R$ the following function was provided.
1506 This computes the value required for the modulus $a$ and stores it in $d$. This function cannot fail
1523 Note that unlike Montgomery reduction there is no normalization process. The result of this function is
1561 This computes $Y \equiv G^X \mbox{ (mod }P\mbox{)}$ using a variable width sliding window algorithm. This function
1566 This function is actually a shell around the two internal exponentiation functions. This routine will automatically
1576 This computes $c = a^{1/b}$ such that $c^b \le a$ and $(c+1)^b > a$. The implementation of this function is not
1596 if the function does not return \textbf{MP\_OKAY} the value in ``result'' should be considered undefined\footnote{Currently
1623 This is why a simple function has been provided to help out.
1665 Which is a function that must read $len$ bytes (and return the amount stored) into $dst$. The $dat$ variable is simply
1666 copied from the original input. It can be used to pass RNG context data to the callback. The function
1670 \textit{Note:} As of v0.30 of the LibTomMath library this function has been deprecated. It is still available
1671 but users are encouraged to use the new mp\_prime\_random\_ex() function instead.
1712 This still store $a$ in ``str'' as a base-``radix'' string of ASCII chars. This function appends a NUL character
1714 by the conversion before storing any data use the following function.
1721 function returns an error code and ``size'' will be zero.