Lines Matching refs:_int
334 The basic ``multiple precision integer'' type is known as the ``mp\_int'' within LibTomMath. This data type is used to
338 \index{mp\_int}
350 All LTM functions that use the mp\_int type will expect a pointer to mp\_int structure. You must allocate memory to
352 done to use an mp\_int is that it must be initialized.
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
385 represents the default integer which is zero. If the functions returns MP\_OKAY then the mp\_int is ready to be used
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
416 pointer\footnote{The ``dp'' member.} within the mp\_int to \textbf{NULL} which is used to prevent double free situations.
417 Is is legal to call mp\_clear() twice on the same mp\_int in a row.
441 Certain algorithms require more than one large integer. In these instances it is ideal to initialize all of the mp\_int
452 It accepts a \textbf{NULL} terminated list of pointers to mp\_int structures. It will attempt to initialize them all
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.
514 Another less common initializer is mp\_init\_size() which allows the user to initialize an mp\_int with a given
523 The $size$ parameter must be greater than zero. If the function succeeds the mp\_int $a$ will be initialized
548 When an mp\_int is in a state where it won't be changed again\footnote{A Diffie-Hellman modulus for instance.} excess
556 This will remove excess digits of the mp\_int $a$. If the operation fails the mp\_int should be intact without the
557 excess digits being removed. Note that you can use a shrunk mp\_int in further computations, however, such operations
558 will require heap operations which can be slow. It is not ideal to shrink mp\_int variables that you will further
594 Within the mp\_int structure are two parameters which control the limitations of the array of digits that represent
595 the integer the mp\_int is meant to equal. The \textit{used} parameter dictates how many digits are significant, that is,
596 contribute to the value of the mp\_int. The \textit{alloc} parameter dictates how many digits are currently available in
597 the array. If you need to perform an operation that requires more digits you will have to mp\_grow() the mp\_int to
686 \index{mp\_set\_int}
691 This will assign the value of the 32-bit variable $b$ to the mp\_int $a$. Unlike mp\_set() this function will always
695 To get the ``unsigned long'' copy of an mp\_int the following function can be used.
697 \index{mp\_get\_int}
702 This will return the 32 least significant bits of the mp\_int $a$.
740 \index{mp\_init\_set} \index{mp\_init\_set\_int}
810 mp\_int structures. This is analogous to an absolute comparison. The function mp\_cmp\_mag() will compare two
811 mp\_int variables based on their digits only.
867 To compare two mp\_int variables based on their signed value the mp\_cmp() function is provided.
874 This will compare $a$ to the left of $b$. It will first compare the signs of the two mp\_int variables. If they
923 To compare a single digit against an mp\_int the following function has been provided.
1065 Strictly speaking the organization of the integers within the mp\_int structures is what is known as a
1734 Converting an mp\_int to and from binary is another keen idea.
1829 These work like the full mp\_int capable variants except the second parameter $b$ is a mp\_digit. These
1831 an entire mp\_int to store a number like $1$ or $2$.