/* * mpi-priv.h - Private header file for MPI * Arbitrary precision integer arithmetic library * * NOTE WELL: the content of this header file is NOT part of the "public" * API for the MPI library, and may change at any time. * Application programs that use libmpi should NOT include this header file. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef _MPI_PRIV_H_ #define _MPI_PRIV_H_ 1
/* If we aren't using a wired-in logarithm table, we need to include the math library to get the log() function
*/
/* {{{ s_logv_2[] - log table for 2 in various bases */
#if MP_LOGTAB /* A table of the logs of 2 for various bases (the 0 and 1 entries of this table are meaningless and should not be referenced).
This table is used to compute output lengths for the mp_toradix() function. Since a number n in radix r takes up about log_r(n) digits, we estimate the output size by taking the least integer greater than log_r(n), where:
log_r(n) = log_2(n) * log_r(2)
This table, therefore, is a table of log_r(2) for 2 <= r <= 36, which are the output bases supported.
*/
/* If MP_LOGTAB is not defined, use the math library to compute the logarithms on the fly. Otherwise, use the table. Pick which works best for your system.
*/
/* When adding and multiplying digits, the results can be larger than can be contained in an mp_digit. Thus, an mp_word is used. These macros mask off the upper and lower digits of the mp_word (the mp_word may be more than 2 mp_digits wide, but we only concern ourselves with the low-order 2 mp_digits)
*/
/* c += a * b * (MP_RADIX ** offset); */ /* Callers of this macro should be aware that the return type might vary;
* it should be treated as a void function. */ #define s_mp_mul_d_add_offset(a, b, c, off) \
s_mpv_mul_d_add_prop(MP_DIGITS(a), MP_USED(a), b, MP_DIGITS(c) + off)
/* * s_mpi_getProcessorLineSize() returns the size in bytes of the cache line * if a cache exists, or zero if there is no cache. If more than one * cache line exists, it should return the smallest line size (which is * usually the L1 cache). * * mp_modexp uses this information to make sure that private key information * isn't being leaked through the cache. * * see mpcpucache.c for the implementation.
*/ unsignedlong s_mpi_getProcessorLineSize();
/* }}} */ #endif
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.17 Sekunden
(vorverarbeitet am 2026-06-06)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.