Import Tcl-code 8.6.8
This commit is contained in:
@@ -87,7 +87,7 @@ extern "C" {
|
||||
# define DIGIT_BIT 60
|
||||
#else
|
||||
/* this is the default case, 28-bit digits */
|
||||
|
||||
|
||||
/* this is to make porting into LibTomCrypt easier :-) */
|
||||
#ifndef CRYPT
|
||||
# if defined(_MSC_VER) || defined(__BORLANDC__)
|
||||
@@ -105,14 +105,14 @@ extern "C" {
|
||||
#endif
|
||||
typedef ulong64 mp_word;
|
||||
|
||||
#ifdef MP_31BIT
|
||||
#ifdef MP_31BIT
|
||||
/* this is an extension that uses 31-bit digits */
|
||||
# define DIGIT_BIT 31
|
||||
#else
|
||||
/* default case is 28-bit digits, defines MP_28BIT as a handy macro to test */
|
||||
# define DIGIT_BIT 28
|
||||
# define MP_28BIT
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* define heap macros */
|
||||
@@ -346,7 +346,7 @@ int mp_2expt(mp_int *a, int b);
|
||||
|
||||
/* Counts the number of lsbs which are zero before the first zero bit */
|
||||
/*
|
||||
int mp_cnt_lsb(mp_int *a);
|
||||
int mp_cnt_lsb(const mp_int *a);
|
||||
*/
|
||||
|
||||
/* I Love Earth! */
|
||||
@@ -646,7 +646,7 @@ int mp_prime_miller_rabin(mp_int *a, mp_int *b, int *result);
|
||||
*/
|
||||
|
||||
/* This gives [for a given bit size] the number of trials required
|
||||
* such that Miller-Rabin gives a prob of failure lower than 2^-96
|
||||
* such that Miller-Rabin gives a prob of failure lower than 2^-96
|
||||
*/
|
||||
/*
|
||||
int mp_prime_rabin_miller_trials(int size);
|
||||
@@ -673,7 +673,7 @@ int mp_prime_next_prime(mp_int *a, int t, int bbs_style);
|
||||
*/
|
||||
|
||||
/* makes a truly random prime of a given size (bytes),
|
||||
* call with bbs = 1 if you want it to be congruent to 3 mod 4
|
||||
* call with bbs = 1 if you want it to be congruent to 3 mod 4
|
||||
*
|
||||
* You have to supply a callback which fills in a buffer with random bytes. "dat" is a parameter you can
|
||||
* have passed to the callback (e.g. a state or something). This function doesn't use "dat" itself
|
||||
@@ -686,7 +686,7 @@ int mp_prime_next_prime(mp_int *a, int t, int bbs_style);
|
||||
/* makes a truly random prime of a given size (bits),
|
||||
*
|
||||
* Flags are as follows:
|
||||
*
|
||||
*
|
||||
* LTM_PRIME_BBS - make prime congruent to 3 mod 4
|
||||
* LTM_PRIME_SAFE - make sure (p-1)/2 is prime as well (implies LTM_PRIME_BBS)
|
||||
* LTM_PRIME_2MSB_OFF - make the 2nd highest bit zero
|
||||
|
||||
Reference in New Issue
Block a user