iPXE
Data Structures | Macros | Functions | Variables
bigint_test.c File Reference

Big integer self-tests. More...

#include <assert.h>
#include <string.h>
#include <ipxe/bigint.h>
#include <ipxe/test.h>

Go to the source code of this file.

Data Structures

struct  bigint_test
 A big integer test value. More...
 

Macros

#define BIGINT(...)   { __VA_ARGS__ }
 Define inline big integer. More...
 
#define bigint_add_ok(addend, value, expected, overflow)
 
#define bigint_subtract_ok(subtrahend, value, expected, underflow)
 
#define bigint_shl_ok(value, expected, bit)
 
#define bigint_shr_ok(value, expected, bit)
 
#define bigint_is_zero_ok(value, expected)
 
#define bigint_is_geq_ok(value, reference, expected)
 
#define bigint_bit_is_set_ok(value, bit, expected)
 
#define bigint_max_set_bit_ok(value, expected)
 
#define bigint_swap_ok(first, second)
 
#define bigint_multiply_ok(multiplicand, multiplier, expected)
 
#define bigint_reduce_ok(modulus, expected)
 
#define bigint_mod_invert_ok(invertend, expected)
 
#define bigint_montgomery_ok(modulus, mont, expected)
 
#define bigint_mod_exp_ok(base, modulus, exponent, expected)
 

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 
void bigint_init_sample (bigint_element_t *value0, unsigned int size, const void *data, size_t len)
 
void bigint_done_sample (const bigint_element_t *value0, unsigned int size, void *out, size_t len)
 
int bigint_add_sample (const bigint_element_t *addend0, bigint_element_t *value0, unsigned int size)
 
int bigint_subtract_sample (const bigint_element_t *subtrahend0, bigint_element_t *value0, unsigned int size)
 
int bigint_shl_sample (bigint_element_t *value0, unsigned int size)
 
int bigint_shr_sample (bigint_element_t *value0, unsigned int size)
 
int bigint_is_zero_sample (const bigint_element_t *value0, unsigned int size)
 
int bigint_is_geq_sample (const bigint_element_t *value0, const bigint_element_t *reference0, unsigned int size)
 
int bigint_bit_is_set_sample (const bigint_element_t *value0, unsigned int size, unsigned int bit)
 
int bigint_max_set_bit_sample (const bigint_element_t *value0, unsigned int size)
 
void bigint_grow_sample (const bigint_element_t *source0, unsigned int source_size, bigint_element_t *dest0, unsigned int dest_size)
 
void bigint_shrink_sample (const bigint_element_t *source0, unsigned int source_size, bigint_element_t *dest0, unsigned int dest_size)
 
void bigint_copy_sample (const bigint_element_t *source0, bigint_element_t *dest0, unsigned int size)
 
void bigint_swap_sample (bigint_element_t *first0, bigint_element_t *second0, unsigned int size, int swap)
 
void bigint_multiply_sample (const bigint_element_t *multiplicand0, unsigned int multiplicand_size, const bigint_element_t *multiplier0, unsigned int multiplier_size, bigint_element_t *result0)
 
void bigint_reduce_sample (const bigint_element_t *modulus0, bigint_element_t *result0, unsigned int size)
 
void bigint_mod_invert_sample (const bigint_element_t *invertend0, bigint_element_t *inverse0, unsigned int size)
 
void bigint_montgomery_sample (const bigint_element_t *modulus0, bigint_element_t *value0, bigint_element_t *result0, unsigned int size)
 
void bigint_mod_exp_sample (const bigint_element_t *base0, const bigint_element_t *modulus0, const bigint_element_t *exponent0, bigint_element_t *result0, unsigned int size, unsigned int exponent_size, void *tmp)
 
static void bigint_add_okx (struct bigint_test *addend, struct bigint_test *value, struct bigint_test *expected, int overflow, const char *file, unsigned int line)
 Report result of big integer addition test. More...
 
static void bigint_subtract_okx (struct bigint_test *subtrahend, struct bigint_test *value, struct bigint_test *expected, int underflow, const char *file, unsigned int line)
 Report result of big integer subtraction test. More...
 
static void bigint_shl_okx (struct bigint_test *value, struct bigint_test *expected, int bit, const char *file, unsigned int line)
 Report result of big integer left shift test. More...
 
static void bigint_shr_okx (struct bigint_test *value, struct bigint_test *expected, int bit, const char *file, unsigned int line)
 Report result of big integer right shift test. More...
 
static void bigint_is_zero_okx (struct bigint_test *value, int expected, const char *file, unsigned int line)
 Report result of big integer zero comparison test. More...
 
static void bigint_is_geq_okx (struct bigint_test *value, struct bigint_test *reference, int expected, const char *file, unsigned int line)
 Report result of big integer greater-than-or-equal comparison test. More...
 
static void bigint_bit_is_set_okx (struct bigint_test *value, unsigned int bit, int expected, const char *file, unsigned int line)
 Report result of big integer bit-set test. More...
 
static void bigint_max_set_bit_okx (struct bigint_test *value, int expected, const char *file, unsigned int line)
 Report result of big integer maximum set bit test. More...
 
static void bigint_swap_okx (struct bigint_test *first, struct bigint_test *second, const char *file, unsigned int line)
 Report result of big integer swap test. More...
 
static void bigint_multiply_okx (struct bigint_test *multiplicand, struct bigint_test *multiplier, struct bigint_test *expected, const char *file, unsigned int line)
 Report result of big integer multiplication test. More...
 
static void bigint_reduce_okx (struct bigint_test *modulus, struct bigint_test *expected, const char *file, unsigned int line)
 Report result of big integer modular direct reduction of R^2 test. More...
 
static void bigint_mod_invert_okx (struct bigint_test *invertend, struct bigint_test *expected, const char *file, unsigned int line)
 Report result of big integer modular inversion test. More...
 
static void bigint_montgomery_okx (struct bigint_test *modulus, struct bigint_test *mont, struct bigint_test *expected, const char *file, unsigned int line)
 Report result of Montgomery reduction (REDC) test. More...
 
static void bigint_mod_exp_okx (struct bigint_test *base, struct bigint_test *modulus, struct bigint_test *exponent, struct bigint_test *expected, const char *file, unsigned int line)
 Report result of big integer modular exponentiation test. More...
 
static void bigint_test_exec (void)
 Perform big integer self-tests. More...
 

Variables

struct self_test bigint_test __self_test
 Big integer self-test. More...
 

Detailed Description

Big integer self-tests.

Definition in file bigint_test.c.

Macro Definition Documentation

◆ BIGINT

#define BIGINT (   ...)    { __VA_ARGS__ }

Define inline big integer.

Definition at line 41 of file bigint_test.c.

◆ bigint_add_ok

#define bigint_add_ok (   addend,
  value,
  expected,
  overflow 
)
Value:
do { \
static const uint8_t addend_raw[] = addend; \
static const uint8_t value_raw[] = value; \
static const uint8_t expected_raw[] = expected; \
static struct bigint_test addend_test = \
{ addend_raw, sizeof ( addend_raw ) }; \
static struct bigint_test value_test = \
{ value_raw, sizeof ( value_raw ) }; \
static struct bigint_test expected_test = \
{ expected_raw, sizeof ( expected_raw ) }; \
bigint_add_okx ( &addend_test, &value_test, &expected_test, \
overflow, __FILE__, __LINE__ ); \
} while ( 0 )
pseudo_bit_t value[0x00020]
Definition: arbel.h:13
A big integer test value.
Definition: bigint_test.c:44
unsigned char uint8_t
Definition: stdint.h:10

Definition at line 286 of file bigint_test.c.

◆ bigint_subtract_ok

#define bigint_subtract_ok (   subtrahend,
  value,
  expected,
  underflow 
)
Value:
do { \
static const uint8_t subtrahend_raw[] = subtrahend; \
static const uint8_t value_raw[] = value; \
static const uint8_t expected_raw[] = expected; \
static struct bigint_test subtrahend_test = \
{ subtrahend_raw, sizeof ( subtrahend_raw ) }; \
static struct bigint_test value_test = \
{ value_raw, sizeof ( value_raw ) }; \
static struct bigint_test expected_test = \
{ expected_raw, sizeof ( expected_raw ) }; \
bigint_subtract_okx ( &subtrahend_test, &value_test, \
&expected_test, underflow, \
__FILE__, __LINE__ ); \
} while ( 0 )
pseudo_bit_t value[0x00020]
Definition: arbel.h:13
A big integer test value.
Definition: bigint_test.c:44
unsigned char uint8_t
Definition: stdint.h:10

Definition at line 335 of file bigint_test.c.

◆ bigint_shl_ok

#define bigint_shl_ok (   value,
  expected,
  bit 
)
Value:
do { \
static const uint8_t value_raw[] = value; \
static const uint8_t expected_raw[] = expected; \
static struct bigint_test value_test = \
{ value_raw, sizeof ( value_raw ) }; \
static struct bigint_test expected_test = \
{ expected_raw, sizeof ( expected_raw ) }; \
bigint_shl_okx ( &value_test, &expected_test, bit, \
__FILE__, __LINE__ ); \
} while ( 0 )
static unsigned int unsigned int bit
Definition: bigint.h:391
pseudo_bit_t value[0x00020]
Definition: arbel.h:13
A big integer test value.
Definition: bigint_test.c:44
unsigned char uint8_t
Definition: stdint.h:10

Definition at line 381 of file bigint_test.c.

◆ bigint_shr_ok

#define bigint_shr_ok (   value,
  expected,
  bit 
)
Value:
do { \
static const uint8_t value_raw[] = value; \
static const uint8_t expected_raw[] = expected; \
static struct bigint_test value_test = \
{ value_raw, sizeof ( value_raw ) }; \
static struct bigint_test expected_test = \
{ expected_raw, sizeof ( expected_raw ) }; \
bigint_shr_okx ( &value_test, &expected_test, bit, \
__FILE__, __LINE__ ); \
} while ( 0 )
static unsigned int unsigned int bit
Definition: bigint.h:391
pseudo_bit_t value[0x00020]
Definition: arbel.h:13
A big integer test value.
Definition: bigint_test.c:44
unsigned char uint8_t
Definition: stdint.h:10

Definition at line 419 of file bigint_test.c.

◆ bigint_is_zero_ok

#define bigint_is_zero_ok (   value,
  expected 
)
Value:
do { \
static const uint8_t value_raw[] = value; \
static struct bigint_test value_test = \
{ value_raw, sizeof ( value_raw ) }; \
bigint_is_zero_okx ( &value_test, expected, \
__FILE__, __LINE__ ); \
} while ( 0 )
pseudo_bit_t value[0x00020]
Definition: arbel.h:13
A big integer test value.
Definition: bigint_test.c:44
unsigned char uint8_t
Definition: stdint.h:10

Definition at line 450 of file bigint_test.c.

◆ bigint_is_geq_ok

#define bigint_is_geq_ok (   value,
  reference,
  expected 
)
Value:
do { \
static const uint8_t value_raw[] = value; \
static const uint8_t reference_raw[] = reference; \
static struct bigint_test value_test = \
{ value_raw, sizeof ( value_raw ) }; \
static struct bigint_test reference_test = \
{ reference_raw, sizeof ( reference_raw ) }; \
bigint_is_geq_okx ( &value_test, &reference_test, expected, \
__FILE__, __LINE__ ); \
} while ( 0 )
pseudo_bit_t value[0x00020]
Definition: arbel.h:13
A big integer test value.
Definition: bigint_test.c:44
unsigned char uint8_t
Definition: stdint.h:10

Definition at line 486 of file bigint_test.c.

◆ bigint_bit_is_set_ok

#define bigint_bit_is_set_ok (   value,
  bit,
  expected 
)
Value:
do { \
static const uint8_t value_raw[] = value; \
static struct bigint_test value_test = \
{ value_raw, sizeof ( value_raw ) }; \
bigint_bit_is_set_okx ( &value_test, bit, expected, \
__FILE__, __LINE__ ); \
} while ( 0 )
static unsigned int unsigned int bit
Definition: bigint.h:391
pseudo_bit_t value[0x00020]
Definition: arbel.h:13
A big integer test value.
Definition: bigint_test.c:44
unsigned char uint8_t
Definition: stdint.h:10

Definition at line 519 of file bigint_test.c.

◆ bigint_max_set_bit_ok

#define bigint_max_set_bit_ok (   value,
  expected 
)
Value:
do { \
static const uint8_t value_raw[] = value; \
static struct bigint_test value_test = \
{ value_raw, sizeof ( value_raw ) }; \
bigint_max_set_bit_okx ( &value_test, expected, \
__FILE__, __LINE__ ); \
} while ( 0 )
pseudo_bit_t value[0x00020]
Definition: arbel.h:13
A big integer test value.
Definition: bigint_test.c:44
unsigned char uint8_t
Definition: stdint.h:10

Definition at line 547 of file bigint_test.c.

◆ bigint_swap_ok

#define bigint_swap_ok (   first,
  second 
)
Value:
do { \
static const uint8_t first_raw[] = first; \
static const uint8_t second_raw[] = second; \
static struct bigint_test first_test = \
{ first_raw, sizeof ( first_raw ) }; \
static struct bigint_test second_test = \
{ second_raw, sizeof ( second_raw ) }; \
bigint_swap_okx ( &first_test, &second_test, \
__FILE__, __LINE__ ); \
} while ( 0 )
uint32_t first
First block in range.
Definition: pccrr.h:14
A big integer test value.
Definition: bigint_test.c:44
unsigned char uint8_t
Definition: stdint.h:10

Definition at line 591 of file bigint_test.c.

◆ bigint_multiply_ok

#define bigint_multiply_ok (   multiplicand,
  multiplier,
  expected 
)
Value:
do { \
static const uint8_t multiplicand_raw[] = multiplicand; \
static const uint8_t multiplier_raw[] = multiplier; \
static const uint8_t expected_raw[] = expected; \
static struct bigint_test multiplicand_test = \
{ multiplicand_raw, sizeof ( multiplicand_raw ) }; \
static struct bigint_test multiplier_test = \
{ multiplier_raw, sizeof ( multiplier_raw ) }; \
static struct bigint_test expected_test = \
{ expected_raw, sizeof ( expected_raw ) }; \
bigint_multiply_okx ( &multiplicand_test, &multiplier_test, \
&expected_test, __FILE__, __LINE__ ); \
} while ( 0 )
A big integer test value.
Definition: bigint_test.c:44
unsigned char uint8_t
Definition: stdint.h:10
static const uint32_t multiplier
Port multiplier number.
Definition: bigint.h:334

Definition at line 639 of file bigint_test.c.

◆ bigint_reduce_ok

#define bigint_reduce_ok (   modulus,
  expected 
)
Value:
do { \
static const uint8_t modulus_raw[] = modulus; \
static const uint8_t expected_raw[] = expected; \
static struct bigint_test modulus_test = \
{ modulus_raw, sizeof ( modulus_raw ) }; \
static struct bigint_test expected_test = \
{ expected_raw, sizeof ( expected_raw ) }; \
bigint_reduce_okx ( &modulus_test, &expected_test, \
__FILE__, __LINE__ ); \
} while ( 0 )
A big integer test value.
Definition: bigint_test.c:44
unsigned char uint8_t
Definition: stdint.h:10

Definition at line 683 of file bigint_test.c.

◆ bigint_mod_invert_ok

#define bigint_mod_invert_ok (   invertend,
  expected 
)
Value:
do { \
static const uint8_t invertend_raw[] = invertend; \
static const uint8_t expected_raw[] = expected; \
static struct bigint_test invertend_test = \
{ invertend_raw, sizeof ( invertend_raw ) }; \
static struct bigint_test expected_test = \
{ expected_raw, sizeof ( expected_raw ) }; \
bigint_mod_invert_okx ( &invertend_test, &expected_test, \
__FILE__, __LINE__ ); \
} while ( 0 )
A big integer test value.
Definition: bigint_test.c:44
unsigned char uint8_t
Definition: stdint.h:10

Definition at line 722 of file bigint_test.c.

◆ bigint_montgomery_ok

#define bigint_montgomery_ok (   modulus,
  mont,
  expected 
)
Value:
do { \
static const uint8_t modulus_raw[] = modulus; \
static const uint8_t mont_raw[] = mont; \
static const uint8_t expected_raw[] = expected; \
static struct bigint_test modulus_test = \
{ modulus_raw, sizeof ( modulus_raw ) }; \
static struct bigint_test mont_test = \
{ mont_raw, sizeof ( mont_raw ) }; \
static struct bigint_test expected_test = \
{ expected_raw, sizeof ( expected_raw ) }; \
bigint_montgomery_okx ( &modulus_test, &mont_test, \
&expected_test, __FILE__, __LINE__ ); \
} while ( 0 )
A big integer test value.
Definition: bigint_test.c:44
unsigned char uint8_t
Definition: stdint.h:10

Definition at line 765 of file bigint_test.c.

◆ bigint_mod_exp_ok

#define bigint_mod_exp_ok (   base,
  modulus,
  exponent,
  expected 
)
Value:
do { \
static const uint8_t base_raw[] = base; \
static const uint8_t modulus_raw[] = modulus; \
static const uint8_t exponent_raw[] = exponent; \
static const uint8_t expected_raw[] = expected; \
static struct bigint_test base_test = \
{ base_raw, sizeof ( base_raw ) }; \
static struct bigint_test modulus_test = \
{ modulus_raw, sizeof ( modulus_raw ) }; \
static struct bigint_test exponent_test = \
{ exponent_raw, sizeof ( exponent_raw ) }; \
static struct bigint_test expected_test = \
{ expected_raw, sizeof ( expected_raw ) }; \
bigint_mod_exp_okx ( &base_test, &modulus_test, &exponent_test, \
&expected_test, __FILE__, __LINE__ ); \
} while ( 0 )
uint32_t base
Base.
Definition: librm.h:138
A big integer test value.
Definition: bigint_test.c:44
unsigned char uint8_t
Definition: stdint.h:10

Definition at line 821 of file bigint_test.c.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ bigint_init_sample()

void bigint_init_sample ( bigint_element_t value0,
unsigned int  size,
const void *  data,
size_t  len 
)

Definition at line 53 of file bigint_test.c.

54  {
55  bigint_t ( size ) *value __attribute__ (( may_alias ))
56  = ( ( void * ) value0 );
57 
58  bigint_init ( value, data, len );
59 }
#define __attribute__(x)
Definition: compiler.h:10
uint16_t size
Buffer size.
Definition: dwmac.h:14
#define bigint_init(value, data, len)
Initialise big integer.
Definition: bigint.h:61
static uint32_t * value0
Definition: bigint.h:60
pseudo_bit_t value[0x00020]
Definition: arbel.h:13
ring len
Length.
Definition: dwmac.h:231
uint8_t data[48]
Additional event data.
Definition: ena.h:22
typedef bigint_t(X25519_SIZE) x25519_t
An X25519 unsigned big integer used in internal calculations.

References __attribute__, bigint_init, bigint_t(), data, len, size, value, and value0.

◆ bigint_done_sample()

void bigint_done_sample ( const bigint_element_t value0,
unsigned int  size,
void *  out,
size_t  len 
)

Definition at line 61 of file bigint_test.c.

62  {
63  const bigint_t ( size ) *value __attribute__ (( may_alias ))
64  = ( ( const void * ) value0 );
65 
66  bigint_done ( value, out, len );
67 }
#define __attribute__(x)
Definition: compiler.h:10
uint16_t size
Buffer size.
Definition: dwmac.h:14
__be32 out[4]
Definition: CIB_PRM.h:36
static uint32_t * value0
Definition: bigint.h:60
pseudo_bit_t value[0x00020]
Definition: arbel.h:13
ring len
Length.
Definition: dwmac.h:231
#define bigint_done(value, out, len)
Finalise big integer.
Definition: bigint.h:74
typedef bigint_t(X25519_SIZE) x25519_t
An X25519 unsigned big integer used in internal calculations.

References __attribute__, bigint_done, bigint_t(), len, out, size, value, and value0.

◆ bigint_add_sample()

int bigint_add_sample ( const bigint_element_t addend0,
bigint_element_t value0,
unsigned int  size 
)

Definition at line 69 of file bigint_test.c.

70  {
71  const bigint_t ( size ) *addend __attribute__ (( may_alias ))
72  = ( ( const void * ) addend0 );
73  bigint_t ( size ) *value __attribute__ (( may_alias ))
74  = ( ( void * ) value0 );
75 
76  return bigint_add ( addend, value );
77 }
#define __attribute__(x)
Definition: compiler.h:10
uint16_t size
Buffer size.
Definition: dwmac.h:14
static uint32_t * value0
Definition: bigint.h:60
pseudo_bit_t value[0x00020]
Definition: arbel.h:13
#define bigint_add(addend, value)
Add big integers.
Definition: bigint.h:86
typedef bigint_t(X25519_SIZE) x25519_t
An X25519 unsigned big integer used in internal calculations.

References __attribute__, bigint_add, bigint_t(), size, value, and value0.

◆ bigint_subtract_sample()

int bigint_subtract_sample ( const bigint_element_t subtrahend0,
bigint_element_t value0,
unsigned int  size 
)

Definition at line 79 of file bigint_test.c.

80  {
81  const bigint_t ( size ) *subtrahend __attribute__ (( may_alias ))
82  = ( ( const void * ) subtrahend0 );
83  bigint_t ( size ) *value __attribute__ (( may_alias ))
84  = ( ( void * ) value0 );
85 
86  return bigint_subtract ( subtrahend, value );
87 }
#define __attribute__(x)
Definition: compiler.h:10
uint16_t size
Buffer size.
Definition: dwmac.h:14
static uint32_t * value0
Definition: bigint.h:60
pseudo_bit_t value[0x00020]
Definition: arbel.h:13
#define bigint_subtract(subtrahend, value)
Subtract big integers.
Definition: bigint.h:98
typedef bigint_t(X25519_SIZE) x25519_t
An X25519 unsigned big integer used in internal calculations.

References __attribute__, bigint_subtract, bigint_t(), size, value, and value0.

◆ bigint_shl_sample()

int bigint_shl_sample ( bigint_element_t value0,
unsigned int  size 
)

Definition at line 89 of file bigint_test.c.

89  {
90  bigint_t ( size ) *value __attribute__ (( may_alias ))
91  = ( ( void * ) value0 );
92 
93  return bigint_shl ( value );
94 }
#define __attribute__(x)
Definition: compiler.h:10
uint16_t size
Buffer size.
Definition: dwmac.h:14
static uint32_t * value0
Definition: bigint.h:60
pseudo_bit_t value[0x00020]
Definition: arbel.h:13
#define bigint_shl(value)
Shift big integer left.
Definition: bigint.h:110
typedef bigint_t(X25519_SIZE) x25519_t
An X25519 unsigned big integer used in internal calculations.

References __attribute__, bigint_shl, bigint_t(), size, value, and value0.

◆ bigint_shr_sample()

int bigint_shr_sample ( bigint_element_t value0,
unsigned int  size 
)

Definition at line 96 of file bigint_test.c.

96  {
97  bigint_t ( size ) *value __attribute__ (( may_alias ))
98  = ( ( void * ) value0 );
99 
100  return bigint_shr ( value );
101 }
#define __attribute__(x)
Definition: compiler.h:10
uint16_t size
Buffer size.
Definition: dwmac.h:14
static uint32_t * value0
Definition: bigint.h:60
#define bigint_shr(value)
Shift big integer right.
Definition: bigint.h:121
pseudo_bit_t value[0x00020]
Definition: arbel.h:13
typedef bigint_t(X25519_SIZE) x25519_t
An X25519 unsigned big integer used in internal calculations.

References __attribute__, bigint_shr, bigint_t(), size, value, and value0.

◆ bigint_is_zero_sample()

int bigint_is_zero_sample ( const bigint_element_t value0,
unsigned int  size 
)

Definition at line 103 of file bigint_test.c.

104  {
105  const bigint_t ( size ) *value __attribute__ (( may_alias ))
106  = ( ( const void * ) value0 );
107 
108  return bigint_is_zero ( value );
109 }
#define __attribute__(x)
Definition: compiler.h:10
uint16_t size
Buffer size.
Definition: dwmac.h:14
#define bigint_is_zero(value)
Test if big integer is equal to zero.
Definition: bigint.h:133
static uint32_t * value0
Definition: bigint.h:60
pseudo_bit_t value[0x00020]
Definition: arbel.h:13
typedef bigint_t(X25519_SIZE) x25519_t
An X25519 unsigned big integer used in internal calculations.

References __attribute__, bigint_is_zero, bigint_t(), size, value, and value0.

◆ bigint_is_geq_sample()

int bigint_is_geq_sample ( const bigint_element_t value0,
const bigint_element_t reference0,
unsigned int  size 
)

Definition at line 111 of file bigint_test.c.

113  {
114  const bigint_t ( size ) *value __attribute__ (( may_alias ))
115  = ( ( const void * ) value0 );
116  const bigint_t ( size ) *reference __attribute__ (( may_alias ))
117  = ( ( const void * ) reference0 );
118 
119  return bigint_is_geq ( value, reference );
120 }
#define __attribute__(x)
Definition: compiler.h:10
static const uint32_t * reference0
Definition: bigint.h:197
uint16_t size
Buffer size.
Definition: dwmac.h:14
static uint32_t * value0
Definition: bigint.h:60
#define bigint_is_geq(value, reference)
Compare big integers.
Definition: bigint.h:144
pseudo_bit_t value[0x00020]
Definition: arbel.h:13
typedef bigint_t(X25519_SIZE) x25519_t
An X25519 unsigned big integer used in internal calculations.

References __attribute__, bigint_is_geq, bigint_t(), reference0, size, value, and value0.

◆ bigint_bit_is_set_sample()

int bigint_bit_is_set_sample ( const bigint_element_t value0,
unsigned int  size,
unsigned int  bit 
)

Definition at line 122 of file bigint_test.c.

123  {
124  const bigint_t ( size ) *value __attribute__ (( may_alias ))
125  = ( ( const void * ) value0 );
126 
127  return bigint_bit_is_set ( value, bit );
128 }
#define __attribute__(x)
Definition: compiler.h:10
uint16_t size
Buffer size.
Definition: dwmac.h:14
static unsigned int unsigned int bit
Definition: bigint.h:391
static uint32_t * value0
Definition: bigint.h:60
pseudo_bit_t value[0x00020]
Definition: arbel.h:13
#define bigint_bit_is_set(value, bit)
Test if bit is set in big integer.
Definition: bigint.h:178
typedef bigint_t(X25519_SIZE) x25519_t
An X25519 unsigned big integer used in internal calculations.

References __attribute__, bigint_bit_is_set, bigint_t(), bit, size, value, and value0.

◆ bigint_max_set_bit_sample()

int bigint_max_set_bit_sample ( const bigint_element_t value0,
unsigned int  size 
)

Definition at line 130 of file bigint_test.c.

131  {
132  const bigint_t ( size ) *value __attribute__ (( may_alias ))
133  = ( ( const void * ) value0 );
134 
135  return bigint_max_set_bit ( value );
136 }
#define __attribute__(x)
Definition: compiler.h:10
#define bigint_max_set_bit(value)
Find highest bit set in big integer.
Definition: bigint.h:198
uint16_t size
Buffer size.
Definition: dwmac.h:14
static uint32_t * value0
Definition: bigint.h:60
pseudo_bit_t value[0x00020]
Definition: arbel.h:13
typedef bigint_t(X25519_SIZE) x25519_t
An X25519 unsigned big integer used in internal calculations.

References __attribute__, bigint_max_set_bit, bigint_t(), size, value, and value0.

◆ bigint_grow_sample()

void bigint_grow_sample ( const bigint_element_t source0,
unsigned int  source_size,
bigint_element_t dest0,
unsigned int  dest_size 
)

Definition at line 138 of file bigint_test.c.

140  {
141  const bigint_t ( source_size ) *source __attribute__ (( may_alias ))
142  = ( ( const void * ) source0 );
143  bigint_t ( dest_size ) *dest __attribute__ (( may_alias ))
144  = ( ( void * ) dest0 );
145 
146  bigint_grow ( source, dest );
147 }
#define __attribute__(x)
Definition: compiler.h:10
#define bigint_grow(source, dest)
Grow big integer.
Definition: bigint.h:208
static unsigned int uint32_t unsigned int dest_size
Definition: bigint.h:251
static unsigned int source_size
Definition: bigint.h:250
if(len >=6 *4) __asm__ __volatile__("movsl" if(len >=5 *4) __asm__ __volatile__("movsl" if(len >=4 *4) __asm__ __volatile__("movsl" if(len >=3 *4) __asm__ __volatile__("movsl" if(len >=2 *4) __asm__ __volatile__("movsl" if(len >=1 *4) __asm__ __volatile__("movsl" if((len % 4) >=2) __asm__ __volatile__("movsw" if((len % 2) >=1) __asm__ __volatile__("movsb" return dest
Definition: string.h:150
static unsigned int uint32_t * dest0
Definition: bigint.h:250
typedef bigint_t(X25519_SIZE) x25519_t
An X25519 unsigned big integer used in internal calculations.

References __attribute__, bigint_grow, bigint_t(), dest, dest0, dest_size, and source_size.

◆ bigint_shrink_sample()

void bigint_shrink_sample ( const bigint_element_t source0,
unsigned int  source_size,
bigint_element_t dest0,
unsigned int  dest_size 
)

Definition at line 149 of file bigint_test.c.

151  {
152  const bigint_t ( source_size ) *source __attribute__ (( may_alias ))
153  = ( ( const void * ) source0 );
154  bigint_t ( dest_size ) *dest __attribute__ (( may_alias ))
155  = ( ( void * ) dest0 );
156 
157  bigint_shrink ( source, dest );
158 }
#define __attribute__(x)
Definition: compiler.h:10
#define bigint_shrink(source, dest)
Shrink big integer.
Definition: bigint.h:221
static unsigned int uint32_t unsigned int dest_size
Definition: bigint.h:251
static unsigned int source_size
Definition: bigint.h:250
if(len >=6 *4) __asm__ __volatile__("movsl" if(len >=5 *4) __asm__ __volatile__("movsl" if(len >=4 *4) __asm__ __volatile__("movsl" if(len >=3 *4) __asm__ __volatile__("movsl" if(len >=2 *4) __asm__ __volatile__("movsl" if(len >=1 *4) __asm__ __volatile__("movsl" if((len % 4) >=2) __asm__ __volatile__("movsw" if((len % 2) >=1) __asm__ __volatile__("movsb" return dest
Definition: string.h:150
static unsigned int uint32_t * dest0
Definition: bigint.h:250
typedef bigint_t(X25519_SIZE) x25519_t
An X25519 unsigned big integer used in internal calculations.

References __attribute__, bigint_shrink, bigint_t(), dest, dest0, dest_size, and source_size.

◆ bigint_copy_sample()

void bigint_copy_sample ( const bigint_element_t source0,
bigint_element_t dest0,
unsigned int  size 
)

Definition at line 160 of file bigint_test.c.

161  {
162  const bigint_t ( size ) *source __attribute__ (( may_alias ))
163  = ( ( const void * ) source0 );
164  bigint_t ( size ) *dest __attribute__ (( may_alias ))
165  = ( ( void * ) dest0 );
166 
167  bigint_copy ( source, dest );
168 }
#define __attribute__(x)
Definition: compiler.h:10
uint16_t size
Buffer size.
Definition: dwmac.h:14
#define bigint_copy(source, dest)
Copy big integer.
Definition: bigint.h:234
if(len >=6 *4) __asm__ __volatile__("movsl" if(len >=5 *4) __asm__ __volatile__("movsl" if(len >=4 *4) __asm__ __volatile__("movsl" if(len >=3 *4) __asm__ __volatile__("movsl" if(len >=2 *4) __asm__ __volatile__("movsl" if(len >=1 *4) __asm__ __volatile__("movsl" if((len % 4) >=2) __asm__ __volatile__("movsw" if((len % 2) >=1) __asm__ __volatile__("movsb" return dest
Definition: string.h:150
static unsigned int uint32_t * dest0
Definition: bigint.h:250
typedef bigint_t(X25519_SIZE) x25519_t
An X25519 unsigned big integer used in internal calculations.

References __attribute__, bigint_copy, bigint_t(), dest, dest0, and size.

◆ bigint_swap_sample()

void bigint_swap_sample ( bigint_element_t first0,
bigint_element_t second0,
unsigned int  size,
int  swap 
)

Definition at line 170 of file bigint_test.c.

171  {
172  bigint_t ( size ) *first __attribute__ (( may_alias ))
173  = ( ( void * ) first0 );
174  bigint_t ( size ) *second __attribute__ (( may_alias ))
175  = ( ( void * ) second0 );
176 
177  bigint_swap ( first, second, swap );
178 }
#define __attribute__(x)
Definition: compiler.h:10
uint32_t first
First block in range.
Definition: pccrr.h:14
uint16_t size
Buffer size.
Definition: dwmac.h:14
#define bigint_swap(first, second, swap)
Conditionally swap big integers (in constant time)
Definition: bigint.h:246
typedef bigint_t(X25519_SIZE) x25519_t
An X25519 unsigned big integer used in internal calculations.

References __attribute__, bigint_swap, bigint_t(), first, and size.

◆ bigint_multiply_sample()

void bigint_multiply_sample ( const bigint_element_t multiplicand0,
unsigned int  multiplicand_size,
const bigint_element_t multiplier0,
unsigned int  multiplier_size,
bigint_element_t result0 
)

Definition at line 180 of file bigint_test.c.

184  {
185  unsigned int result_size = ( multiplicand_size + multiplier_size );
186  const bigint_t ( multiplicand_size ) __attribute__ (( may_alias ))
187  *multiplicand = ( ( const void * ) multiplicand0 );
188  const bigint_t ( multiplier_size ) __attribute__ (( may_alias ))
189  *multiplier = ( ( const void * ) multiplier0 );
190  bigint_t ( result_size ) __attribute__ (( may_alias ))
191  *result = ( ( void * ) result0 );
192 
193  bigint_multiply ( multiplicand, multiplier, result );
194 }
#define __attribute__(x)
Definition: compiler.h:10
uint16_t result
Definition: hyperv.h:33
static const uint32_t multiplier
Port multiplier number.
Definition: bigint.h:334
#define bigint_multiply(multiplicand, multiplier, result)
Multiply big integers.
Definition: bigint.h:259
typedef bigint_t(X25519_SIZE) x25519_t
An X25519 unsigned big integer used in internal calculations.

References __attribute__, bigint_multiply, bigint_t(), multiplier, and result.

◆ bigint_reduce_sample()

void bigint_reduce_sample ( const bigint_element_t modulus0,
bigint_element_t result0,
unsigned int  size 
)

Definition at line 196 of file bigint_test.c.

197  {
198  const bigint_t ( size ) __attribute__ (( may_alias ))
199  *modulus = ( ( const void * ) modulus0 );
200  bigint_t ( size ) __attribute__ (( may_alias ))
201  *result = ( ( void * ) result0 );
202 
203  bigint_reduce ( modulus, result );
204 }
#define __attribute__(x)
Definition: compiler.h:10
uint16_t size
Buffer size.
Definition: dwmac.h:14
uint16_t result
Definition: hyperv.h:33
#define bigint_reduce(modulus, result)
Reduce big integer R^2 modulo N.
Definition: bigint.h:273
typedef bigint_t(X25519_SIZE) x25519_t
An X25519 unsigned big integer used in internal calculations.

References __attribute__, bigint_reduce, bigint_t(), result, and size.

◆ bigint_mod_invert_sample()

void bigint_mod_invert_sample ( const bigint_element_t invertend0,
bigint_element_t inverse0,
unsigned int  size 
)

Definition at line 206 of file bigint_test.c.

208  {
209  const bigint_t ( size ) __attribute__ (( may_alias ))
210  *invertend = ( ( const void * ) invertend0 );
211  bigint_t ( size ) __attribute__ (( may_alias ))
212  *inverse = ( ( void * ) inverse0 );
213 
214  bigint_mod_invert ( invertend, inverse );
215 }
#define __attribute__(x)
Definition: compiler.h:10
uint16_t size
Buffer size.
Definition: dwmac.h:14
#define bigint_mod_invert(invertend, inverse)
Compute inverse of odd big integer modulo any power of two.
Definition: bigint.h:285
typedef bigint_t(X25519_SIZE) x25519_t
An X25519 unsigned big integer used in internal calculations.

References __attribute__, bigint_mod_invert, bigint_t(), and size.

◆ bigint_montgomery_sample()

void bigint_montgomery_sample ( const bigint_element_t modulus0,
bigint_element_t value0,
bigint_element_t result0,
unsigned int  size 
)

Definition at line 217 of file bigint_test.c.

220  {
221  const bigint_t ( size ) __attribute__ (( may_alias ))
222  *modulus = ( ( const void * ) modulus0 );
223  bigint_t ( 2 * size ) __attribute__ (( may_alias ))
224  *value = ( ( void * ) value0 );
225  bigint_t ( size ) __attribute__ (( may_alias ))
226  *result = ( ( void * ) result0 );
227 
228  bigint_montgomery ( modulus, value, result );
229 }
#define __attribute__(x)
Definition: compiler.h:10
uint16_t size
Buffer size.
Definition: dwmac.h:14
static uint32_t * value0
Definition: bigint.h:60
pseudo_bit_t value[0x00020]
Definition: arbel.h:13
uint16_t result
Definition: hyperv.h:33
#define bigint_montgomery(modulus, value, result)
Perform classic Montgomery reduction (REDC) of a big integer.
Definition: bigint.h:313
typedef bigint_t(X25519_SIZE) x25519_t
An X25519 unsigned big integer used in internal calculations.

References __attribute__, bigint_montgomery, bigint_t(), result, size, value, and value0.

◆ bigint_mod_exp_sample()

void bigint_mod_exp_sample ( const bigint_element_t base0,
const bigint_element_t modulus0,
const bigint_element_t exponent0,
bigint_element_t result0,
unsigned int  size,
unsigned int  exponent_size,
void *  tmp 
)

Definition at line 231 of file bigint_test.c.

236  {
237  const bigint_t ( size ) *base __attribute__ (( may_alias ))
238  = ( ( const void * ) base0 );
239  const bigint_t ( size ) *modulus __attribute__ (( may_alias ))
240  = ( ( const void * ) modulus0 );
241  const bigint_t ( exponent_size ) *exponent __attribute__ (( may_alias ))
242  = ( ( const void * ) exponent0 );
243  bigint_t ( size ) *result __attribute__ (( may_alias ))
244  = ( ( void * ) result0 );
245 
246  bigint_mod_exp ( base, modulus, exponent, result, tmp );
247 }
#define __attribute__(x)
Definition: compiler.h:10
uint32_t base
Base.
Definition: librm.h:138
#define bigint_mod_exp(base, modulus, exponent, result, tmp)
Perform modular exponentiation of big integers.
Definition: bigint.h:346
uint16_t size
Buffer size.
Definition: dwmac.h:14
unsigned long tmp
Definition: linux_pci.h:64
uint16_t result
Definition: hyperv.h:33
typedef bigint_t(X25519_SIZE) x25519_t
An X25519 unsigned big integer used in internal calculations.

References __attribute__, base, bigint_mod_exp, bigint_t(), result, size, and tmp.

◆ bigint_add_okx()

static void bigint_add_okx ( struct bigint_test addend,
struct bigint_test value,
struct bigint_test expected,
int  overflow,
const char *  file,
unsigned int  line 
)
static

Report result of big integer addition test.

Parameters
addendBig integer to add
valueBig integer to be added to
expectedBig integer expected result
overflowExpected result overflows range
fileTest code file
lineTest code line

Definition at line 259 of file bigint_test.c.

262  {
263  uint8_t result_raw[ expected->len ];
264  unsigned int size = bigint_required_size ( value->len );
265  unsigned int msb = ( 8 * value->len );
266  bigint_t ( size ) addend_temp;
267  bigint_t ( size ) value_temp;
268  int carry;
269 
270  assert ( bigint_size ( &addend_temp ) == bigint_size ( &value_temp ) );
271  bigint_init ( &value_temp, value->raw, value->len );
272  bigint_init ( &addend_temp, addend->raw, addend->len );
273  DBG ( "Add: 0x%s", bigint_ntoa ( &addend_temp ) );
274  DBG ( " + 0x%s", bigint_ntoa ( &value_temp ) );
275  carry = bigint_add ( &addend_temp, &value_temp );
276  DBG ( " = 0x%s%s\n", bigint_ntoa ( &value_temp ),
277  ( carry ? " (carry)" : "" ) );
278  bigint_done ( &value_temp, result_raw, sizeof ( result_raw ) );
279 
280  okx ( memcmp ( result_raw, expected->raw, sizeof ( result_raw ) ) == 0,
281  file, line );
282  if ( sizeof ( result_raw ) < sizeof ( value_temp ) )
283  carry += bigint_bit_is_set ( &value_temp, msb );
284  okx ( carry == overflow, file, line );
285 }
int carry
Definition: bigint.h:67
const uint8_t * raw
Raw value.
Definition: bigint_test.c:46
uint16_t size
Buffer size.
Definition: dwmac.h:14
#define bigint_init(value, data, len)
Initialise big integer.
Definition: bigint.h:61
#define okx(success, file, line)
Report test result.
Definition: test.h:44
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
size_t len
Length of raw value.
Definition: bigint_test.c:48
pseudo_bit_t value[0x00020]
Definition: arbel.h:13
#define bigint_done(value, out, len)
Finalise big integer.
Definition: bigint.h:74
#define bigint_required_size(len)
Determine number of elements required for a big-integer type.
Definition: bigint.h:30
unsigned char uint8_t
Definition: stdint.h:10
#define bigint_size(bigint)
Determine number of elements in big-integer type.
Definition: bigint.h:40
#define bigint_bit_is_set(value, bit)
Test if bit is set in big integer.
Definition: bigint.h:178
#define DBG(...)
Print a debugging message.
Definition: compiler.h:498
#define bigint_add(addend, value)
Add big integers.
Definition: bigint.h:86
#define bigint_ntoa(value)
Transcribe big integer (for debugging)
Definition: bigint.h:49
int memcmp(const void *first, const void *second, size_t len)
Compare memory regions.
Definition: string.c:114
typedef bigint_t(X25519_SIZE) x25519_t
An X25519 unsigned big integer used in internal calculations.

References assert(), bigint_add, bigint_bit_is_set, bigint_done, bigint_init, bigint_ntoa, bigint_required_size, bigint_size, bigint_t(), carry, DBG, bigint_test::len, memcmp(), okx, bigint_test::raw, size, and value.

◆ bigint_subtract_okx()

static void bigint_subtract_okx ( struct bigint_test subtrahend,
struct bigint_test value,
struct bigint_test expected,
int  underflow,
const char *  file,
unsigned int  line 
)
static

Report result of big integer subtraction test.

Parameters
subtrahendBig integer to subtract
valueBig integer to be subtracted from
expectedBig integer expected result
underflowExpected result underflows range
fileTest code file
lineTest code line

Definition at line 310 of file bigint_test.c.

313  {
314  uint8_t result_raw[ expected->len ];
315  unsigned int size = bigint_required_size ( value->len );
316  bigint_t ( size ) subtrahend_temp;
317  bigint_t ( size ) value_temp;
318  int borrow;
319 
320  assert ( bigint_size ( &subtrahend_temp ) ==
321  bigint_size ( &value_temp ) );
322  bigint_init ( &value_temp, value->raw, value->len );
323  bigint_init ( &subtrahend_temp, subtrahend->raw, subtrahend->len );
324  DBG ( "Subtract: 0x%s", bigint_ntoa ( &value_temp ) );
325  DBG ( " - 0x%s", bigint_ntoa ( &subtrahend_temp ) );
326  borrow = bigint_subtract ( &subtrahend_temp, &value_temp );
327  DBG ( " = 0x%s%s\n", bigint_ntoa ( &value_temp ),
328  ( borrow ? " (borrow)" : "" ) );
329  bigint_done ( &value_temp, result_raw, sizeof ( result_raw ) );
330 
331  okx ( memcmp ( result_raw, expected->raw, sizeof ( result_raw ) ) == 0,
332  file, line );
333  okx ( borrow == underflow, file, line );
334 }
const uint8_t * raw
Raw value.
Definition: bigint_test.c:46
uint16_t size
Buffer size.
Definition: dwmac.h:14
#define bigint_init(value, data, len)
Initialise big integer.
Definition: bigint.h:61
#define okx(success, file, line)
Report test result.
Definition: test.h:44
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
size_t len
Length of raw value.
Definition: bigint_test.c:48
pseudo_bit_t value[0x00020]
Definition: arbel.h:13
#define bigint_done(value, out, len)
Finalise big integer.
Definition: bigint.h:74
int borrow
Definition: bigint.h:99
#define bigint_required_size(len)
Determine number of elements required for a big-integer type.
Definition: bigint.h:30
unsigned char uint8_t
Definition: stdint.h:10
#define bigint_size(bigint)
Determine number of elements in big-integer type.
Definition: bigint.h:40
#define DBG(...)
Print a debugging message.
Definition: compiler.h:498
#define bigint_subtract(subtrahend, value)
Subtract big integers.
Definition: bigint.h:98
#define bigint_ntoa(value)
Transcribe big integer (for debugging)
Definition: bigint.h:49
int memcmp(const void *first, const void *second, size_t len)
Compare memory regions.
Definition: string.c:114
typedef bigint_t(X25519_SIZE) x25519_t
An X25519 unsigned big integer used in internal calculations.

References assert(), bigint_done, bigint_init, bigint_ntoa, bigint_required_size, bigint_size, bigint_subtract, bigint_t(), borrow, DBG, bigint_test::len, memcmp(), okx, bigint_test::raw, size, and value.

◆ bigint_shl_okx()

static void bigint_shl_okx ( struct bigint_test value,
struct bigint_test expected,
int  bit,
const char *  file,
unsigned int  line 
)
static

Report result of big integer left shift test.

Parameters
valueBig integer
expectedBig integer expected result
bitExpected bit shifted out
fileTest code file
lineTest code line

Definition at line 360 of file bigint_test.c.

362  {
363  uint8_t result_raw[ expected->len ];
364  unsigned int size = bigint_required_size ( value->len );
365  unsigned int msb = ( 8 * value->len );
366  bigint_t ( size ) value_temp;
367  int out;
368 
369  bigint_init ( &value_temp, value->raw, value->len );
370  DBG ( "Shift left 0x%s << 1", bigint_ntoa ( &value_temp ) );
371  out = bigint_shl ( &value_temp );
372  DBG ( " = 0x%s (%d)\n", bigint_ntoa ( &value_temp ), out );
373  bigint_done ( &value_temp, result_raw, sizeof ( result_raw ) );
374 
375  okx ( memcmp ( result_raw, expected->raw, sizeof ( result_raw ) ) == 0,
376  file, line );
377  if ( sizeof ( result_raw ) < sizeof ( value_temp ) )
378  out += bigint_bit_is_set ( &value_temp, msb );
379  okx ( out == bit, file, line );
380 }
const uint8_t * raw
Raw value.
Definition: bigint_test.c:46
uint16_t size
Buffer size.
Definition: dwmac.h:14
#define bigint_init(value, data, len)
Initialise big integer.
Definition: bigint.h:61
static unsigned int unsigned int bit
Definition: bigint.h:391
__be32 out[4]
Definition: CIB_PRM.h:36
#define okx(success, file, line)
Report test result.
Definition: test.h:44
size_t len
Length of raw value.
Definition: bigint_test.c:48
pseudo_bit_t value[0x00020]
Definition: arbel.h:13
#define bigint_done(value, out, len)
Finalise big integer.
Definition: bigint.h:74
#define bigint_required_size(len)
Determine number of elements required for a big-integer type.
Definition: bigint.h:30
unsigned char uint8_t
Definition: stdint.h:10
#define bigint_shl(value)
Shift big integer left.
Definition: bigint.h:110
#define bigint_bit_is_set(value, bit)
Test if bit is set in big integer.
Definition: bigint.h:178
#define DBG(...)
Print a debugging message.
Definition: compiler.h:498
#define bigint_ntoa(value)
Transcribe big integer (for debugging)
Definition: bigint.h:49
int memcmp(const void *first, const void *second, size_t len)
Compare memory regions.
Definition: string.c:114
typedef bigint_t(X25519_SIZE) x25519_t
An X25519 unsigned big integer used in internal calculations.

References bigint_bit_is_set, bigint_done, bigint_init, bigint_ntoa, bigint_required_size, bigint_shl, bigint_t(), bit, DBG, bigint_test::len, memcmp(), okx, out, bigint_test::raw, size, and value.

◆ bigint_shr_okx()

static void bigint_shr_okx ( struct bigint_test value,
struct bigint_test expected,
int  bit,
const char *  file,
unsigned int  line 
)
static

Report result of big integer right shift test.

Parameters
valueBig integer
expectedBig integer expected result
bitExpected bit shifted out
fileTest code file
lineTest code line

Definition at line 401 of file bigint_test.c.

403  {
404  uint8_t result_raw[ expected->len ];
405  unsigned int size = bigint_required_size ( value->len );
406  bigint_t ( size ) value_temp;
407  int out;
408 
409  bigint_init ( &value_temp, value->raw, value->len );
410  DBG ( "Shift right 0x%s >> 1", bigint_ntoa ( &value_temp ) );
411  out = bigint_shr ( &value_temp );
412  DBG ( " = 0x%s (%d)\n", bigint_ntoa ( &value_temp ), out );
413  bigint_done ( &value_temp, result_raw, sizeof ( result_raw ) );
414 
415  okx ( memcmp ( result_raw, expected->raw, sizeof ( result_raw ) ) == 0,
416  file, line );
417  okx ( out == bit, file, line );
418 }
const uint8_t * raw
Raw value.
Definition: bigint_test.c:46
uint16_t size
Buffer size.
Definition: dwmac.h:14
#define bigint_init(value, data, len)
Initialise big integer.
Definition: bigint.h:61
static unsigned int unsigned int bit
Definition: bigint.h:391
__be32 out[4]
Definition: CIB_PRM.h:36
#define okx(success, file, line)
Report test result.
Definition: test.h:44
#define bigint_shr(value)
Shift big integer right.
Definition: bigint.h:121
size_t len
Length of raw value.
Definition: bigint_test.c:48
pseudo_bit_t value[0x00020]
Definition: arbel.h:13
#define bigint_done(value, out, len)
Finalise big integer.
Definition: bigint.h:74
#define bigint_required_size(len)
Determine number of elements required for a big-integer type.
Definition: bigint.h:30
unsigned char uint8_t
Definition: stdint.h:10
#define DBG(...)
Print a debugging message.
Definition: compiler.h:498
#define bigint_ntoa(value)
Transcribe big integer (for debugging)
Definition: bigint.h:49
int memcmp(const void *first, const void *second, size_t len)
Compare memory regions.
Definition: string.c:114
typedef bigint_t(X25519_SIZE) x25519_t
An X25519 unsigned big integer used in internal calculations.

References bigint_done, bigint_init, bigint_ntoa, bigint_required_size, bigint_shr, bigint_t(), bit, DBG, bigint_test::len, memcmp(), okx, out, bigint_test::raw, size, and value.

◆ bigint_is_zero_okx()

static void bigint_is_zero_okx ( struct bigint_test value,
int  expected,
const char *  file,
unsigned int  line 
)
static

Report result of big integer zero comparison test.

Parameters
valueBig integer
expectedExpected result
fileTest code file
lineTest code line

Definition at line 438 of file bigint_test.c.

439  {
440  unsigned int size = bigint_required_size ( value->len );
441  bigint_t ( size ) value_temp;
442  int is_zero;
443 
444  bigint_init ( &value_temp, value->raw, value->len );
445  DBG ( "Zero comparison: 0x%s", bigint_ntoa ( &value_temp ) );
446  is_zero = bigint_is_zero ( &value_temp );
447  DBG ( " %s 0\n", ( is_zero ? "==" : "!=" ) );
448  okx ( ( !! is_zero ) == ( !! (expected) ), file, line );
449 }
uint16_t size
Buffer size.
Definition: dwmac.h:14
#define bigint_init(value, data, len)
Initialise big integer.
Definition: bigint.h:61
#define bigint_is_zero(value)
Test if big integer is equal to zero.
Definition: bigint.h:133
#define okx(success, file, line)
Report test result.
Definition: test.h:44
pseudo_bit_t value[0x00020]
Definition: arbel.h:13
#define bigint_required_size(len)
Determine number of elements required for a big-integer type.
Definition: bigint.h:30
#define DBG(...)
Print a debugging message.
Definition: compiler.h:498
#define bigint_ntoa(value)
Transcribe big integer (for debugging)
Definition: bigint.h:49
typedef bigint_t(X25519_SIZE) x25519_t
An X25519 unsigned big integer used in internal calculations.

References bigint_init, bigint_is_zero, bigint_ntoa, bigint_required_size, bigint_t(), DBG, okx, size, and value.

◆ bigint_is_geq_okx()

static void bigint_is_geq_okx ( struct bigint_test value,
struct bigint_test reference,
int  expected,
const char *  file,
unsigned int  line 
)
static

Report result of big integer greater-than-or-equal comparison test.

Parameters
valueBig integer
referenceReference big integer
expectedExpected result
fileTest code file
lineTest code line

Definition at line 467 of file bigint_test.c.

469  {
470  unsigned int size = bigint_required_size ( value->len );
471  bigint_t ( size ) value_temp;
472  bigint_t ( size ) reference_temp;
473  int is_geq;
474 
475  assert ( bigint_size ( &reference_temp ) ==
476  bigint_size ( &value_temp ) );
477  bigint_init ( &value_temp, value->raw, value->len );
478  bigint_init ( &reference_temp, reference->raw, reference->len );
479  DBG ( "Greater-than-or-equal comparison: 0x%s",
480  bigint_ntoa ( &value_temp ) );
481  is_geq = bigint_is_geq ( &value_temp, &reference_temp );
482  DBG ( " %s 0x%s\n", ( is_geq ? ">=" : "<" ),
483  bigint_ntoa ( &reference_temp ) );
484  okx ( ( !! is_geq ) == ( !! (expected) ), file, line );
485 }
const uint8_t * raw
Raw value.
Definition: bigint_test.c:46
uint16_t size
Buffer size.
Definition: dwmac.h:14
#define bigint_init(value, data, len)
Initialise big integer.
Definition: bigint.h:61
#define bigint_is_geq(value, reference)
Compare big integers.
Definition: bigint.h:144
#define okx(success, file, line)
Report test result.
Definition: test.h:44
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
size_t len
Length of raw value.
Definition: bigint_test.c:48
pseudo_bit_t value[0x00020]
Definition: arbel.h:13
#define bigint_required_size(len)
Determine number of elements required for a big-integer type.
Definition: bigint.h:30
#define bigint_size(bigint)
Determine number of elements in big-integer type.
Definition: bigint.h:40
#define DBG(...)
Print a debugging message.
Definition: compiler.h:498
#define bigint_ntoa(value)
Transcribe big integer (for debugging)
Definition: bigint.h:49
typedef bigint_t(X25519_SIZE) x25519_t
An X25519 unsigned big integer used in internal calculations.

References assert(), bigint_init, bigint_is_geq, bigint_ntoa, bigint_required_size, bigint_size, bigint_t(), DBG, bigint_test::len, okx, bigint_test::raw, size, and value.

◆ bigint_bit_is_set_okx()

static void bigint_bit_is_set_okx ( struct bigint_test value,
unsigned int  bit,
int  expected,
const char *  file,
unsigned int  line 
)
static

Report result of big integer bit-set test.

Parameters
valueBig integer
bitBit to test
expectedExpected result
fileTest code file
lineTest code line

Definition at line 506 of file bigint_test.c.

508  {
509  unsigned int size = bigint_required_size ( value->len );
510  bigint_t ( size ) value_temp;
511  int bit_is_set;
512 
513  bigint_init ( &value_temp, value->raw, value->len );
514  DBG ( "Bit set: 0x%s bit %d", bigint_ntoa ( &value_temp ), bit );
515  bit_is_set = bigint_bit_is_set ( &value_temp, bit );
516  DBG ( " is %sset\n", ( bit_is_set ? "" : "not " ) );
517  okx ( ( !! bit_is_set ) == ( !! (expected) ), file, line );
518 }
uint16_t size
Buffer size.
Definition: dwmac.h:14
#define bigint_init(value, data, len)
Initialise big integer.
Definition: bigint.h:61
static unsigned int unsigned int bit
Definition: bigint.h:391
#define okx(success, file, line)
Report test result.
Definition: test.h:44
pseudo_bit_t value[0x00020]
Definition: arbel.h:13
#define bigint_required_size(len)
Determine number of elements required for a big-integer type.
Definition: bigint.h:30
#define bigint_bit_is_set(value, bit)
Test if bit is set in big integer.
Definition: bigint.h:178
#define DBG(...)
Print a debugging message.
Definition: compiler.h:498
#define bigint_ntoa(value)
Transcribe big integer (for debugging)
Definition: bigint.h:49
typedef bigint_t(X25519_SIZE) x25519_t
An X25519 unsigned big integer used in internal calculations.

References bigint_bit_is_set, bigint_init, bigint_ntoa, bigint_required_size, bigint_t(), bit, DBG, okx, size, and value.

◆ bigint_max_set_bit_okx()

static void bigint_max_set_bit_okx ( struct bigint_test value,
int  expected,
const char *  file,
unsigned int  line 
)
static

Report result of big integer maximum set bit test.

Parameters
valueBig integer
expectedExpected result
fileTest code file
lineTest code line

Definition at line 535 of file bigint_test.c.

536  {
537  unsigned int size = bigint_required_size ( value->len );
538  bigint_t ( size ) value_temp;
539  int max_set_bit;
540 
541  bigint_init ( &value_temp, value->raw, value->len );
542  DBG ( "Maximum set bit: 0x%s", bigint_ntoa ( &value_temp ) );
543  max_set_bit = bigint_max_set_bit ( &value_temp );
544  DBG ( " MSB is bit %d\n", ( max_set_bit - 1 ) );
545  okx ( max_set_bit == expected, file, line );
546 }
#define bigint_max_set_bit(value)
Find highest bit set in big integer.
Definition: bigint.h:198
uint16_t size
Buffer size.
Definition: dwmac.h:14
#define bigint_init(value, data, len)
Initialise big integer.
Definition: bigint.h:61
#define okx(success, file, line)
Report test result.
Definition: test.h:44
pseudo_bit_t value[0x00020]
Definition: arbel.h:13
#define bigint_required_size(len)
Determine number of elements required for a big-integer type.
Definition: bigint.h:30
#define DBG(...)
Print a debugging message.
Definition: compiler.h:498
#define bigint_ntoa(value)
Transcribe big integer (for debugging)
Definition: bigint.h:49
typedef bigint_t(X25519_SIZE) x25519_t
An X25519 unsigned big integer used in internal calculations.

References bigint_init, bigint_max_set_bit, bigint_ntoa, bigint_required_size, bigint_t(), DBG, okx, size, and value.

◆ bigint_swap_okx()

static void bigint_swap_okx ( struct bigint_test first,
struct bigint_test second,
const char *  file,
unsigned int  line 
)
static

Report result of big integer swap test.

Parameters
firstBig integer to be conditionally swapped
secondBig integer to be conditionally swapped
fileTest code file
lineTest code line

Definition at line 563 of file bigint_test.c.

565  {
566  uint8_t temp[ first->len ];
567  unsigned int size = bigint_required_size ( sizeof ( temp) );
568  bigint_t ( size ) first_temp;
569  bigint_t ( size ) second_temp;
570 
571  assert ( first->len == sizeof ( temp ) );
572  assert ( second->len == sizeof ( temp ) );
573  bigint_init ( &first_temp, first->raw, first->len );
574  bigint_init ( &second_temp, second->raw, second->len );
575  bigint_swap ( &first_temp, &second_temp, 0 );
576  bigint_done ( &first_temp, temp, sizeof ( temp ) );
577  okx ( memcmp ( temp, first->raw, sizeof ( temp ) ) == 0, file, line );
578  bigint_done ( &second_temp, temp, sizeof ( temp ) );
579  okx ( memcmp ( temp, second->raw, sizeof ( temp ) ) == 0, file, line );
580  bigint_swap ( &first_temp, &second_temp, 1 );
581  bigint_done ( &first_temp, temp, sizeof ( temp ) );
582  okx ( memcmp ( temp, second->raw, sizeof ( temp ) ) == 0, file, line );
583  bigint_done ( &second_temp, temp, sizeof ( temp ) );
584  okx ( memcmp ( temp, first->raw, sizeof ( temp ) ) == 0, file, line );
585  bigint_swap ( &first_temp, &second_temp, 1 );
586  bigint_done ( &first_temp, temp, sizeof ( temp ) );
587  okx ( memcmp ( temp, first->raw, sizeof ( temp ) ) == 0, file, line );
588  bigint_done ( &second_temp, temp, sizeof ( temp ) );
589  okx ( memcmp ( temp, second->raw, sizeof ( temp ) ) == 0, file, line );
590 }
uint32_t first
First block in range.
Definition: pccrr.h:14
const uint8_t * raw
Raw value.
Definition: bigint_test.c:46
uint16_t size
Buffer size.
Definition: dwmac.h:14
#define bigint_init(value, data, len)
Initialise big integer.
Definition: bigint.h:61
#define okx(success, file, line)
Report test result.
Definition: test.h:44
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
size_t len
Length of raw value.
Definition: bigint_test.c:48
#define bigint_done(value, out, len)
Finalise big integer.
Definition: bigint.h:74
#define bigint_required_size(len)
Determine number of elements required for a big-integer type.
Definition: bigint.h:30
unsigned char uint8_t
Definition: stdint.h:10
#define bigint_swap(first, second, swap)
Conditionally swap big integers (in constant time)
Definition: bigint.h:246
int memcmp(const void *first, const void *second, size_t len)
Compare memory regions.
Definition: string.c:114
typedef bigint_t(X25519_SIZE) x25519_t
An X25519 unsigned big integer used in internal calculations.

References assert(), bigint_done, bigint_init, bigint_required_size, bigint_swap, bigint_t(), first, bigint_test::len, memcmp(), okx, bigint_test::raw, and size.

◆ bigint_multiply_okx()

static void bigint_multiply_okx ( struct bigint_test multiplicand,
struct bigint_test multiplier,
struct bigint_test expected,
const char *  file,
unsigned int  line 
)
static

Report result of big integer multiplication test.

Parameters
multiplicandBig integer to be multiplied
multiplierBig integer to be multiplied
expectedBig integer expected result
fileTest code file
lineTest code line

Definition at line 611 of file bigint_test.c.

614  {
615  uint8_t result_raw[ expected->len ];
616  unsigned int multiplicand_size =
617  bigint_required_size ( multiplicand->len );
618  unsigned int multiplier_size =
620  bigint_t ( multiplicand_size ) multiplicand_temp;
621  bigint_t ( multiplier_size ) multiplier_temp;
622  bigint_t ( multiplicand_size + multiplier_size ) result_temp;
623 
624  assert ( bigint_size ( &result_temp ) ==
625  ( bigint_size ( &multiplicand_temp ) +
626  bigint_size ( &multiplier_temp ) ) );
627  bigint_init ( &multiplicand_temp, multiplicand->raw,
628  multiplicand->len );
629  bigint_init ( &multiplier_temp, multiplier->raw, multiplier->len );
630  DBG ( "Multiply 0x%s", bigint_ntoa ( &multiplicand_temp ) );
631  DBG ( " * 0x%s", bigint_ntoa ( &multiplier_temp ) );
632  bigint_multiply ( &multiplicand_temp, &multiplier_temp, &result_temp );
633  DBG ( " = 0x%s\n", bigint_ntoa ( &result_temp ) );
634  bigint_done ( &result_temp, result_raw, sizeof ( result_raw ) );
635 
636  okx ( memcmp ( result_raw, expected->raw, sizeof ( result_raw ) ) == 0,
637  file, line );
638 }
const uint8_t * raw
Raw value.
Definition: bigint_test.c:46
#define bigint_init(value, data, len)
Initialise big integer.
Definition: bigint.h:61
#define okx(success, file, line)
Report test result.
Definition: test.h:44
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
size_t len
Length of raw value.
Definition: bigint_test.c:48
#define bigint_done(value, out, len)
Finalise big integer.
Definition: bigint.h:74
#define bigint_required_size(len)
Determine number of elements required for a big-integer type.
Definition: bigint.h:30
unsigned char uint8_t
Definition: stdint.h:10
static const uint32_t multiplier
Port multiplier number.
Definition: bigint.h:334
#define bigint_size(bigint)
Determine number of elements in big-integer type.
Definition: bigint.h:40
#define bigint_multiply(multiplicand, multiplier, result)
Multiply big integers.
Definition: bigint.h:259
#define DBG(...)
Print a debugging message.
Definition: compiler.h:498
#define bigint_ntoa(value)
Transcribe big integer (for debugging)
Definition: bigint.h:49
int memcmp(const void *first, const void *second, size_t len)
Compare memory regions.
Definition: string.c:114
typedef bigint_t(X25519_SIZE) x25519_t
An X25519 unsigned big integer used in internal calculations.

References assert(), bigint_done, bigint_init, bigint_multiply, bigint_ntoa, bigint_required_size, bigint_size, bigint_t(), DBG, bigint_test::len, memcmp(), multiplier, okx, and bigint_test::raw.

◆ bigint_reduce_okx()

static void bigint_reduce_okx ( struct bigint_test modulus,
struct bigint_test expected,
const char *  file,
unsigned int  line 
)
static

Report result of big integer modular direct reduction of R^2 test.

Parameters
modulusBig integer modulus
expectedBig integer expected result
fileTest code file
lineTest code line

Definition at line 661 of file bigint_test.c.

663  {
664  uint8_t result_raw[ expected->len ];
665  unsigned int size = bigint_required_size ( modulus->len );
666  bigint_t ( size ) modulus_temp;
667  bigint_t ( size ) result_temp;
668 
669  assert ( bigint_size ( &modulus_temp ) ==
670  bigint_size ( &result_temp ) );
671  assert ( sizeof ( result_temp ) == sizeof ( result_raw ) );
672  bigint_init ( &modulus_temp, modulus->raw, modulus->len );
673  DBG ( "Modular reduce (2^%zd)", ( 2 * 8 * sizeof ( modulus_temp ) ) );
674  bigint_reduce ( &modulus_temp, &result_temp );
675  DBG ( " = 0x%s", bigint_ntoa ( &result_temp ) );
676  DBG ( " (mod 0x%s)\n", bigint_ntoa ( &modulus_temp ) );
677 
678  bigint_done ( &result_temp, result_raw, sizeof ( result_raw ) );
679 
680  okx ( memcmp ( result_raw, expected->raw, sizeof ( result_raw ) ) == 0,
681  file, line );
682 }
const uint8_t * raw
Raw value.
Definition: bigint_test.c:46
uint16_t size
Buffer size.
Definition: dwmac.h:14
#define bigint_init(value, data, len)
Initialise big integer.
Definition: bigint.h:61
#define okx(success, file, line)
Report test result.
Definition: test.h:44
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
size_t len
Length of raw value.
Definition: bigint_test.c:48
#define bigint_done(value, out, len)
Finalise big integer.
Definition: bigint.h:74
#define bigint_required_size(len)
Determine number of elements required for a big-integer type.
Definition: bigint.h:30
unsigned char uint8_t
Definition: stdint.h:10
#define bigint_size(bigint)
Determine number of elements in big-integer type.
Definition: bigint.h:40
#define bigint_reduce(modulus, result)
Reduce big integer R^2 modulo N.
Definition: bigint.h:273
#define DBG(...)
Print a debugging message.
Definition: compiler.h:498
#define bigint_ntoa(value)
Transcribe big integer (for debugging)
Definition: bigint.h:49
int memcmp(const void *first, const void *second, size_t len)
Compare memory regions.
Definition: string.c:114
typedef bigint_t(X25519_SIZE) x25519_t
An X25519 unsigned big integer used in internal calculations.

References assert(), bigint_done, bigint_init, bigint_ntoa, bigint_reduce, bigint_required_size, bigint_size, bigint_t(), DBG, bigint_test::len, memcmp(), okx, bigint_test::raw, and size.

◆ bigint_mod_invert_okx()

static void bigint_mod_invert_okx ( struct bigint_test invertend,
struct bigint_test expected,
const char *  file,
unsigned int  line 
)
static

Report result of big integer modular inversion test.

Parameters
invertendBig integer to be inverted
expectedBig integer expected result
fileTest code file
lineTest code line

Definition at line 702 of file bigint_test.c.

704  {
705  uint8_t inverse_raw[ expected->len ];
706  unsigned int invertend_size = bigint_required_size ( invertend->len );
707  unsigned int inverse_size =
708  bigint_required_size ( sizeof ( inverse_raw ) );
709  bigint_t ( invertend_size ) invertend_temp;
710  bigint_t ( inverse_size ) inverse_temp;
711 
712  bigint_init ( &invertend_temp, invertend->raw, invertend->len );
713  DBG ( "Modular invert: 0x%s", bigint_ntoa ( &invertend_temp ) );
714  bigint_mod_invert ( &invertend_temp, &inverse_temp );
715  DBG ( " * 0x%s = 1 (mod 2^%zd)\n", bigint_ntoa ( &inverse_temp ),
716  ( 8 * sizeof ( inverse_raw ) ) );
717  bigint_done ( &inverse_temp, inverse_raw, sizeof ( inverse_raw ) );
718 
719  okx ( memcmp ( inverse_raw, expected->raw,
720  sizeof ( inverse_raw ) ) == 0, file, line );
721 }
const uint8_t * raw
Raw value.
Definition: bigint_test.c:46
#define bigint_init(value, data, len)
Initialise big integer.
Definition: bigint.h:61
#define bigint_mod_invert(invertend, inverse)
Compute inverse of odd big integer modulo any power of two.
Definition: bigint.h:285
#define okx(success, file, line)
Report test result.
Definition: test.h:44
size_t len
Length of raw value.
Definition: bigint_test.c:48
#define bigint_done(value, out, len)
Finalise big integer.
Definition: bigint.h:74
#define bigint_required_size(len)
Determine number of elements required for a big-integer type.
Definition: bigint.h:30
unsigned char uint8_t
Definition: stdint.h:10
#define DBG(...)
Print a debugging message.
Definition: compiler.h:498
#define bigint_ntoa(value)
Transcribe big integer (for debugging)
Definition: bigint.h:49
int memcmp(const void *first, const void *second, size_t len)
Compare memory regions.
Definition: string.c:114
typedef bigint_t(X25519_SIZE) x25519_t
An X25519 unsigned big integer used in internal calculations.

References bigint_done, bigint_init, bigint_mod_invert, bigint_ntoa, bigint_required_size, bigint_t(), DBG, bigint_test::len, memcmp(), okx, and bigint_test::raw.

◆ bigint_montgomery_okx()

static void bigint_montgomery_okx ( struct bigint_test modulus,
struct bigint_test mont,
struct bigint_test expected,
const char *  file,
unsigned int  line 
)
static

Report result of Montgomery reduction (REDC) test.

Parameters
modulusBig integer modulus
montBig integer Montgomery product
expectedBig integer expected result
fileTest code file
lineTest code line

Definition at line 742 of file bigint_test.c.

745  {
746  uint8_t result_raw[ expected->len ];
747  unsigned int size = bigint_required_size ( modulus->len );
748  bigint_t ( size ) modulus_temp;
749  bigint_t ( 2 * size ) mont_temp;
750  bigint_t ( size ) result_temp;
751 
752  assert ( ( modulus->len % sizeof ( bigint_element_t ) ) == 0 );
753  bigint_init ( &modulus_temp, modulus->raw, modulus->len );
754  bigint_init ( &mont_temp, mont->raw, mont->len );
755  DBG ( "Montgomery 0x%s", bigint_ntoa ( &mont_temp ) );
756  bigint_montgomery ( &modulus_temp, &mont_temp, &result_temp );
757  DBG ( " = 0x%s * (2 ^ %zd)", bigint_ntoa ( &result_temp ),
758  ( 8 * sizeof ( modulus_temp ) ) );
759  DBG ( " (mod 0x%s)\n", bigint_ntoa ( &modulus_temp ) );
760  bigint_done ( &result_temp, result_raw, sizeof ( result_raw ) );
761 
762  okx ( memcmp ( result_raw, expected->raw, sizeof ( result_raw ) ) == 0,
763  file, line );
764 }
const uint8_t * raw
Raw value.
Definition: bigint_test.c:46
uint16_t size
Buffer size.
Definition: dwmac.h:14
#define bigint_init(value, data, len)
Initialise big integer.
Definition: bigint.h:61
#define okx(success, file, line)
Report test result.
Definition: test.h:44
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
size_t len
Length of raw value.
Definition: bigint_test.c:48
uint32_t bigint_element_t
Element of a big integer.
Definition: bigint.h:15
#define bigint_done(value, out, len)
Finalise big integer.
Definition: bigint.h:74
#define bigint_required_size(len)
Determine number of elements required for a big-integer type.
Definition: bigint.h:30
unsigned char uint8_t
Definition: stdint.h:10
#define bigint_montgomery(modulus, value, result)
Perform classic Montgomery reduction (REDC) of a big integer.
Definition: bigint.h:313
#define DBG(...)
Print a debugging message.
Definition: compiler.h:498
#define bigint_ntoa(value)
Transcribe big integer (for debugging)
Definition: bigint.h:49
int memcmp(const void *first, const void *second, size_t len)
Compare memory regions.
Definition: string.c:114
typedef bigint_t(X25519_SIZE) x25519_t
An X25519 unsigned big integer used in internal calculations.

References assert(), bigint_done, bigint_init, bigint_montgomery, bigint_ntoa, bigint_required_size, bigint_t(), DBG, bigint_test::len, memcmp(), okx, bigint_test::raw, and size.

◆ bigint_mod_exp_okx()

static void bigint_mod_exp_okx ( struct bigint_test base,
struct bigint_test modulus,
struct bigint_test exponent,
struct bigint_test expected,
const char *  file,
unsigned int  line 
)
static

Report result of big integer modular exponentiation test.

Parameters
baseBig integer base
modulusBig integer modulus
exponentBig integer exponent
expectedBig integer expected result
fileTest code file
lineTest code line

Definition at line 789 of file bigint_test.c.

793  {
794  uint8_t result_raw[ expected->len ];
795  unsigned int size = bigint_required_size ( base->len );
796  unsigned int exponent_size = bigint_required_size ( exponent->len );
797  bigint_t ( size ) base_temp;
798  bigint_t ( size ) modulus_temp;
799  bigint_t ( exponent_size ) exponent_temp;
800  bigint_t ( size ) result_temp;
801  size_t tmp_len = bigint_mod_exp_tmp_len ( &modulus_temp );
802  uint8_t tmp[tmp_len];
803 
804  assert ( bigint_size ( &modulus_temp ) == bigint_size ( &base_temp ) );
805  assert ( bigint_size ( &modulus_temp ) ==
806  bigint_size ( &result_temp ) );
807  bigint_init ( &base_temp, base->raw, base->len );
808  bigint_init ( &modulus_temp, modulus->raw, modulus->len );
809  bigint_init ( &exponent_temp, exponent->raw, exponent->len );
810  DBG ( "Modular exponentiation: 0x%s", bigint_ntoa ( &base_temp ) );
811  DBG ( " ^ 0x%s", bigint_ntoa ( &exponent_temp ) );
812  bigint_mod_exp ( &base_temp, &modulus_temp, &exponent_temp,
813  &result_temp, tmp );
814  DBG ( " = 0x%s", bigint_ntoa ( &result_temp ) );
815  DBG ( " (mod 0x%s)\n", bigint_ntoa ( &modulus_temp ) );
816  bigint_done ( &result_temp, result_raw, sizeof ( result_raw ) );
817 
818  okx ( memcmp ( result_raw, expected->raw, sizeof ( result_raw ) ) == 0,
819  file, line );
820 }
uint32_t base
Base.
Definition: librm.h:138
#define bigint_mod_exp(base, modulus, exponent, result, tmp)
Perform modular exponentiation of big integers.
Definition: bigint.h:346
const uint8_t * raw
Raw value.
Definition: bigint_test.c:46
uint16_t size
Buffer size.
Definition: dwmac.h:14
#define bigint_init(value, data, len)
Initialise big integer.
Definition: bigint.h:61
unsigned long tmp
Definition: linux_pci.h:64
#define okx(success, file, line)
Report test result.
Definition: test.h:44
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
size_t len
Length of raw value.
Definition: bigint_test.c:48
#define bigint_done(value, out, len)
Finalise big integer.
Definition: bigint.h:74
#define bigint_required_size(len)
Determine number of elements required for a big-integer type.
Definition: bigint.h:30
unsigned char uint8_t
Definition: stdint.h:10
#define bigint_size(bigint)
Determine number of elements in big-integer type.
Definition: bigint.h:40
#define DBG(...)
Print a debugging message.
Definition: compiler.h:498
#define bigint_mod_exp_tmp_len(modulus)
Calculate temporary working space required for moduluar exponentiation.
Definition: bigint.h:360
#define bigint_ntoa(value)
Transcribe big integer (for debugging)
Definition: bigint.h:49
int memcmp(const void *first, const void *second, size_t len)
Compare memory regions.
Definition: string.c:114
typedef bigint_t(X25519_SIZE) x25519_t
An X25519 unsigned big integer used in internal calculations.

References assert(), base, bigint_done, bigint_init, bigint_mod_exp, bigint_mod_exp_tmp_len, bigint_ntoa, bigint_required_size, bigint_size, bigint_t(), DBG, bigint_test::len, memcmp(), okx, bigint_test::raw, size, and tmp.

◆ bigint_test_exec()

static void bigint_test_exec ( void  )
static

Perform big integer self-tests.

Definition at line 842 of file bigint_test.c.

842  {
843 
844  bigint_add_ok ( BIGINT(), BIGINT(), BIGINT(), 0 );
845  bigint_add_ok ( BIGINT ( 0x8a ),
846  BIGINT ( 0x43 ),
847  BIGINT ( 0xcd ), 0 );
848  bigint_add_ok ( BIGINT ( 0xc5, 0x7b ),
849  BIGINT ( 0xd6, 0xb1 ),
850  BIGINT ( 0x9c, 0x2c ), 1 );
851  bigint_add_ok ( BIGINT ( 0xf9, 0xd9, 0xdc ),
852  BIGINT ( 0x6d, 0x4b, 0xca ),
853  BIGINT ( 0x67, 0x25, 0xa6 ), 1 );
854  bigint_add_ok ( BIGINT ( 0xdd, 0xc2, 0x20, 0x5f ),
855  BIGINT ( 0x80, 0x32, 0xc4, 0xb0 ),
856  BIGINT ( 0x5d, 0xf4, 0xe5, 0x0f ), 1 );
857  bigint_add_ok ( BIGINT ( 0x5e, 0x46, 0x4d, 0xc6, 0xa2, 0x7d, 0x45,
858  0xc3 ),
859  BIGINT ( 0xd6, 0xc0, 0xd7, 0xd4, 0xf6, 0x04, 0x47,
860  0xed ),
861  BIGINT ( 0x35, 0x07, 0x25, 0x9b, 0x98, 0x81, 0x8d,
862  0xb0 ), 1 );
863  bigint_add_ok ( BIGINT ( 0x0e, 0x46, 0x4d, 0xc6, 0xa2, 0x7d, 0x45,
864  0xc3 ),
865  BIGINT ( 0xd6, 0xc0, 0xd7, 0xd4, 0xf6, 0x04, 0x47,
866  0xed ),
867  BIGINT ( 0xe5, 0x07, 0x25, 0x9b, 0x98, 0x81, 0x8d,
868  0xb0 ), 0 );
869  bigint_add_ok ( BIGINT ( 0x01, 0xed, 0x45, 0x4b, 0x41, 0xeb, 0x4c,
870  0x2e, 0x53, 0x07, 0x15, 0x51, 0x56, 0x47,
871  0x29, 0xfc, 0x9c, 0xbd, 0xbd, 0xfb, 0x1b,
872  0xd1, 0x1d ),
873  BIGINT ( 0x73, 0xed, 0xfc, 0x35, 0x31, 0x22, 0xd7,
874  0xb1, 0xea, 0x91, 0x5a, 0xe4, 0xba, 0xbc,
875  0xa1, 0x38, 0x72, 0xae, 0x4b, 0x1c, 0xc1,
876  0x05, 0xb3 ),
877  BIGINT ( 0x75, 0xdb, 0x41, 0x80, 0x73, 0x0e, 0x23,
878  0xe0, 0x3d, 0x98, 0x70, 0x36, 0x11, 0x03,
879  0xcb, 0x35, 0x0f, 0x6c, 0x09, 0x17, 0xdc,
880  0xd6, 0xd0 ), 0 );
881  bigint_add_ok ( BIGINT ( 0x06, 0x8e, 0xd6, 0x18, 0xbb, 0x4b, 0x0c,
882  0xc5, 0x85, 0xde, 0xee, 0x9b, 0x3f, 0x65,
883  0x63, 0x86, 0xf5, 0x5a, 0x9f, 0xa2, 0xd7,
884  0xb2, 0xc7, 0xb6, 0x1d, 0x28, 0x6c, 0x50,
885  0x47, 0x10, 0x0a, 0x0e, 0x86, 0xcd, 0x2a,
886  0x64, 0xdc, 0xe6, 0x9d, 0x96, 0xd8, 0xf4,
887  0x56, 0x46, 0x6f, 0xbb, 0x7b, 0x64, 0x6f,
888  0xdc, 0x2a, 0xd1, 0x3b, 0xcc, 0x03, 0x85,
889  0x95, 0xf4, 0xe9, 0x68, 0x1f, 0x5c, 0xc5,
890  0xbf, 0x97, 0x19, 0x12, 0x88, 0x2e, 0x88,
891  0xb9, 0x34, 0xac, 0x74, 0x83, 0x2d, 0x8f,
892  0xb3, 0x97, 0x53, 0x99, 0xf3, 0xb4, 0x8b,
893  0x2d, 0x98, 0x69, 0x8d, 0x19, 0xf0, 0x40,
894  0x66, 0x3f, 0x60, 0x78, 0x34, 0x7f, 0x9b,
895  0xf7, 0x01, 0x74, 0x55, 0xca, 0x63, 0x25,
896  0x7b, 0x86, 0xe9, 0x73, 0xfd, 0x5d, 0x77,
897  0x32, 0x5e, 0x9e, 0x42, 0x53, 0xb6, 0x35,
898  0x92, 0xb9, 0xd7, 0x1b, 0xf7, 0x16, 0x55,
899  0xf6, 0xe2 ),
900  BIGINT ( 0x3f, 0x8f, 0x62, 0x21, 0x4a, 0x7a, 0xa2,
901  0xef, 0xa8, 0x79, 0x9b, 0x73, 0xac, 0xde,
902  0x72, 0xe4, 0xfc, 0x3c, 0xd3, 0xa9, 0x44,
903  0x1a, 0x6a, 0x02, 0x76, 0xe3, 0x78, 0x4d,
904  0x2e, 0x07, 0x9b, 0xb6, 0x3d, 0x5d, 0xc5,
905  0xcd, 0x68, 0x23, 0x4b, 0x5f, 0x89, 0x0e,
906  0xd7, 0xa7, 0xff, 0x18, 0x80, 0xdc, 0xfb,
907  0x34, 0x45, 0xca, 0x4b, 0xdb, 0x8a, 0x19,
908  0xcb, 0xc9, 0xe5, 0xa1, 0x63, 0xa2, 0x0d,
909  0x56, 0xc4, 0xf9, 0x51, 0x1b, 0x88, 0x4e,
910  0x36, 0xab, 0x15, 0x4d, 0x8f, 0xdc, 0x08,
911  0xc4, 0x4d, 0x43, 0xc7, 0x2b, 0xc9, 0x5c,
912  0x05, 0x26, 0xe3, 0x46, 0xf0, 0x64, 0xaa,
913  0x02, 0xa4, 0xbe, 0x3a, 0xd1, 0xca, 0x07,
914  0x6a, 0x6e, 0x62, 0xf4, 0x57, 0x71, 0x96,
915  0xec, 0xf0, 0x0b, 0xac, 0xa4, 0x4a, 0xa3,
916  0x6d, 0x01, 0xba, 0xbd, 0x62, 0xc0, 0x10,
917  0x54, 0x33, 0x8a, 0x71, 0xef, 0xaa, 0x1c,
918  0x25, 0x25 ),
919  BIGINT ( 0x46, 0x1e, 0x38, 0x3a, 0x05, 0xc5, 0xaf,
920  0xb5, 0x2e, 0x58, 0x8a, 0x0e, 0xec, 0x43,
921  0xd6, 0x6b, 0xf1, 0x97, 0x73, 0x4c, 0x1b,
922  0xcd, 0x31, 0xb8, 0x94, 0x0b, 0xe4, 0x9d,
923  0x75, 0x17, 0xa5, 0xc4, 0xc4, 0x2a, 0xf0,
924  0x32, 0x45, 0x09, 0xe8, 0xf6, 0x62, 0x03,
925  0x2d, 0xee, 0x6e, 0xd3, 0xfc, 0x41, 0x6b,
926  0x10, 0x70, 0x9b, 0x87, 0xa7, 0x8d, 0x9f,
927  0x61, 0xbe, 0xcf, 0x09, 0x82, 0xfe, 0xd3,
928  0x16, 0x5c, 0x12, 0x63, 0xa3, 0xb6, 0xd6,
929  0xef, 0xdf, 0xc1, 0xc2, 0x13, 0x09, 0x98,
930  0x77, 0xe4, 0x97, 0x61, 0x1f, 0x7d, 0xe7,
931  0x32, 0xbf, 0x4c, 0xd4, 0x0a, 0x54, 0xea,
932  0x68, 0xe4, 0x1e, 0xb3, 0x06, 0x49, 0xa3,
933  0x61, 0x6f, 0xd7, 0x4a, 0x21, 0xd4, 0xbc,
934  0x68, 0x76, 0xf5, 0x20, 0xa1, 0xa8, 0x1a,
935  0x9f, 0x60, 0x58, 0xff, 0xb6, 0x76, 0x45,
936  0xe6, 0xed, 0x61, 0x8d, 0xe6, 0xc0, 0x72,
937  0x1c, 0x07 ), 0 );
938  bigint_subtract_ok ( BIGINT(), BIGINT(), BIGINT(), 0 );
939  bigint_subtract_ok ( BIGINT ( 0x83 ),
940  BIGINT ( 0x50 ),
941  BIGINT ( 0xcd ), 1 );
942  bigint_subtract_ok ( BIGINT ( 0x2c, 0x7c ),
943  BIGINT ( 0x49, 0x0e ),
944  BIGINT ( 0x1c, 0x92 ), 0 );
945  bigint_subtract_ok ( BIGINT ( 0x9c, 0x30, 0xbf ),
946  BIGINT ( 0xde, 0x4e, 0x07 ),
947  BIGINT ( 0x42, 0x1d, 0x48 ), 0 );
948  bigint_subtract_ok ( BIGINT ( 0xbb, 0x77, 0x32, 0x5a ),
949  BIGINT ( 0x5a, 0xd5, 0xfe, 0x28 ),
950  BIGINT ( 0x9f, 0x5e, 0xcb, 0xce ), 1 );
951  bigint_subtract_ok ( BIGINT ( 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
952  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
953  0xff, 0xff, 0xff, 0xff, 0xff, 0xff ),
954  BIGINT ( 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
955  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
956  0x00, 0x00, 0x00, 0x00, 0x00, 0x2a ),
957  BIGINT ( 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
958  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
959  0x00, 0x00, 0x00, 0x00, 0x00, 0x2b ), 1 );
960  bigint_subtract_ok ( BIGINT ( 0x7b, 0xaa, 0x16, 0xcf, 0x15, 0x87,
961  0xe0, 0x4f, 0x2c, 0xa3, 0xec, 0x2f,
962  0x46, 0xfb, 0x83, 0xc6, 0xe0, 0xee,
963  0x57, 0xfa, 0x04, 0xce, 0xa6 ),
964  BIGINT ( 0x46, 0x55, 0xb6, 0x23, 0x63, 0xd0,
965  0x55, 0xdb, 0x8f, 0xcc, 0x55, 0xa8,
966  0x2f, 0x85, 0xc1, 0x9f, 0x2c, 0x13,
967  0x10, 0x9e, 0x76, 0x3c, 0x11 ),
968  BIGINT ( 0xca, 0xab, 0x9f, 0x54, 0x4e, 0x48,
969  0x75, 0x8c, 0x63, 0x28, 0x69, 0x78,
970  0xe8, 0x8a, 0x3d, 0xd8, 0x4b, 0x24,
971  0xb8, 0xa4, 0x71, 0x6d, 0x6b ), 1 );
972  bigint_subtract_ok ( BIGINT ( 0x5b, 0x06, 0x77, 0x7b, 0xfd, 0x34,
973  0x5f, 0x0f, 0xd9, 0xbd, 0x8e, 0x5d,
974  0xc8, 0x4a, 0x70, 0x95, 0x1b, 0xb6,
975  0x48, 0xfb, 0x0e, 0x40, 0xce, 0x06,
976  0x66, 0xcc, 0x29, 0xe9, 0x51, 0x59,
977  0x59, 0xc9, 0x65, 0x07, 0x75, 0xb8,
978  0xd4, 0xcb, 0x07, 0x68, 0x14, 0x48,
979  0xc7, 0x1e, 0xfe, 0xb3, 0x4c, 0xf1,
980  0x10, 0xf0, 0xc7, 0x82, 0x38, 0x4c,
981  0xaf, 0x05, 0x6d, 0x91, 0xc5, 0x18,
982  0xfd, 0x1e, 0x26, 0x1b, 0xef, 0x71,
983  0x70, 0x2e, 0x06, 0x70, 0x8e, 0x54,
984  0xfa, 0x2b, 0x4d, 0x96, 0x85, 0x10,
985  0x03, 0x76, 0xe7, 0x17, 0x59, 0x86,
986  0x6c, 0x8b, 0x24, 0x6e, 0xd9, 0x30,
987  0xf3, 0xd2, 0x9b, 0x62, 0xdc, 0x23,
988  0x54, 0x06, 0x51, 0xb1, 0x95, 0x58,
989  0xec, 0x27, 0xf6, 0x19, 0xae, 0xf4,
990  0x31, 0xec, 0x72, 0x53, 0xcd, 0x32,
991  0xed, 0xf4, 0x25, 0x4a, 0x5b, 0x36,
992  0xa2, 0xb4, 0xa0, 0x29, 0x0c, 0x6b,
993  0x3f, 0xc2 ),
994  BIGINT ( 0x7a, 0xd4, 0x25, 0xf1, 0xb5, 0xf5,
995  0x00, 0x96, 0x47, 0x5b, 0x4f, 0x9f,
996  0x1f, 0x61, 0x69, 0xd9, 0x72, 0x47,
997  0xde, 0xbd, 0x87, 0x5d, 0x50, 0x91,
998  0x69, 0xd8, 0x35, 0xe0, 0x43, 0xd8,
999  0xd5, 0x15, 0xf2, 0xcd, 0x01, 0x73,
1000  0x0d, 0x34, 0xf0, 0x34, 0x46, 0x76,
1001  0xc0, 0x55, 0x7b, 0x27, 0xf5, 0x7b,
1002  0x55, 0xe9, 0xd0, 0x29, 0x0b, 0x4b,
1003  0x9f, 0x07, 0xbf, 0x2c, 0x3f, 0xef,
1004  0x36, 0x34, 0xde, 0x29, 0x1d, 0x5d,
1005  0x84, 0x5a, 0x5d, 0xc1, 0x02, 0x4d,
1006  0x56, 0xf1, 0x47, 0x39, 0x37, 0xc9,
1007  0xb5, 0x5f, 0x73, 0xec, 0x7c, 0x3d,
1008  0xbd, 0xc0, 0xfd, 0x38, 0x6c, 0x91,
1009  0x88, 0x4a, 0x0f, 0xee, 0xa1, 0x80,
1010  0xf5, 0x6a, 0x7c, 0x8c, 0x02, 0xc3,
1011  0x5a, 0xb2, 0x15, 0xa6, 0x2f, 0x6b,
1012  0x5b, 0x78, 0xb5, 0xf3, 0xbd, 0xd0,
1013  0xc8, 0xbc, 0xb1, 0xbb, 0xe1, 0xce,
1014  0x22, 0x80, 0x34, 0x5a, 0x2a, 0x27,
1015  0x83, 0xdc ),
1016  BIGINT ( 0x1f, 0xcd, 0xae, 0x75, 0xb8, 0xc0,
1017  0xa1, 0x86, 0x6d, 0x9d, 0xc1, 0x41,
1018  0x57, 0x16, 0xf9, 0x44, 0x56, 0x91,
1019  0x95, 0xc2, 0x79, 0x1c, 0x82, 0x8b,
1020  0x03, 0x0c, 0x0b, 0xf6, 0xf2, 0x7f,
1021  0x7b, 0x4c, 0x8d, 0xc5, 0x8b, 0xba,
1022  0x38, 0x69, 0xe8, 0xcc, 0x32, 0x2d,
1023  0xf9, 0x36, 0x7c, 0x74, 0xa8, 0x8a,
1024  0x44, 0xf9, 0x08, 0xa6, 0xd2, 0xfe,
1025  0xf0, 0x02, 0x51, 0x9a, 0x7a, 0xd6,
1026  0x39, 0x16, 0xb8, 0x0d, 0x2d, 0xec,
1027  0x14, 0x2c, 0x57, 0x50, 0x73, 0xf8,
1028  0x5c, 0xc5, 0xf9, 0xa2, 0xb2, 0xb9,
1029  0xb1, 0xe8, 0x8c, 0xd5, 0x22, 0xb7,
1030  0x51, 0x35, 0xd8, 0xc9, 0x93, 0x60,
1031  0x94, 0x77, 0x74, 0x8b, 0xc5, 0x5d,
1032  0xa1, 0x64, 0x2a, 0xda, 0x6d, 0x6a,
1033  0x6e, 0x8a, 0x1f, 0x8c, 0x80, 0x77,
1034  0x29, 0x8c, 0x43, 0x9f, 0xf0, 0x9d,
1035  0xda, 0xc8, 0x8c, 0x71, 0x86, 0x97,
1036  0x7f, 0xcb, 0x94, 0x31, 0x1d, 0xbc,
1037  0x44, 0x1a ), 0 );
1038  bigint_shl_ok ( BIGINT(), BIGINT(), 0 );
1039  bigint_shl_ok ( BIGINT ( 0xe0 ),
1040  BIGINT ( 0xc0 ), 1 );
1041  bigint_shl_ok ( BIGINT ( 0x43, 0x1d ),
1042  BIGINT ( 0x86, 0x3a ), 0 );
1043  bigint_shl_ok ( BIGINT ( 0xac, 0xed, 0x9b ),
1044  BIGINT ( 0x59, 0xdb, 0x36 ), 1 );
1045  bigint_shl_ok ( BIGINT ( 0x2c, 0xe8, 0x3a, 0x22 ),
1046  BIGINT ( 0x59, 0xd0, 0x74, 0x44 ), 0 );
1047  bigint_shl_ok ( BIGINT ( 0x4e, 0x88, 0x4a, 0x05, 0x5e, 0x10, 0xee,
1048  0x5b, 0xc6, 0x40, 0x0e, 0x03, 0xd7, 0x0d,
1049  0x28, 0xa5, 0x55, 0xb2, 0x50, 0xef, 0x69,
1050  0xd1, 0x1d ),
1051  BIGINT ( 0x9d, 0x10, 0x94, 0x0a, 0xbc, 0x21, 0xdc,
1052  0xb7, 0x8c, 0x80, 0x1c, 0x07, 0xae, 0x1a,
1053  0x51, 0x4a, 0xab, 0x64, 0xa1, 0xde, 0xd3,
1054  0xa2, 0x3a ), 0 );
1055  bigint_shl_ok ( BIGINT ( 0x84, 0x56, 0xaa, 0xb4, 0x23, 0xd4, 0x4e,
1056  0xea, 0x92, 0x34, 0x61, 0x11, 0x3e, 0x38,
1057  0x31, 0x8b ),
1058  BIGINT ( 0x08, 0xad, 0x55, 0x68, 0x47, 0xa8, 0x9d,
1059  0xd5, 0x24, 0x68, 0xc2, 0x22, 0x7c, 0x70,
1060  0x63, 0x16 ), 1 );
1061  bigint_shl_ok ( BIGINT ( 0x4a, 0x2b, 0x6b, 0x7c, 0xbf, 0x8a, 0x43,
1062  0x71, 0x96, 0xd6, 0x2f, 0x14, 0xa0, 0x2a,
1063  0xf8, 0x15 ),
1064  BIGINT ( 0x94, 0x56, 0xd6, 0xf9, 0x7f, 0x14, 0x86,
1065  0xe3, 0x2d, 0xac, 0x5e, 0x29, 0x40, 0x55,
1066  0xf0, 0x2a ), 0 );
1067  bigint_shl_ok ( BIGINT ( 0x07, 0x62, 0x78, 0x70, 0x2e, 0xd4, 0x41,
1068  0xaa, 0x9b, 0x50, 0xb1, 0x9a, 0x71, 0xf5,
1069  0x1c, 0x2f, 0xe7, 0x0d, 0xf1, 0x46, 0x57,
1070  0x04, 0x99, 0x78, 0x4e, 0x84, 0x78, 0xba,
1071  0x57, 0xea, 0xa5, 0x43, 0xf7, 0x02, 0xf0,
1072  0x7a, 0x22, 0x60, 0x65, 0x42, 0xf2, 0x33,
1073  0x7d, 0xe3, 0xa8, 0x1b, 0xc4, 0x14, 0xdb,
1074  0xee, 0x4a, 0xf1, 0xe1, 0x52, 0xd4, 0xda,
1075  0x23, 0xed, 0x13, 0x5d, 0xea, 0xcf, 0xf6,
1076  0x5e, 0x39, 0x84, 0xe2, 0xb3, 0xa2, 0x05,
1077  0xba, 0xd9, 0x49, 0x8e, 0x75, 0x1d, 0xdb,
1078  0xe6, 0xb1, 0x6e, 0xda, 0x0a, 0x83, 0xd0,
1079  0x6e, 0xcf, 0x7a, 0x66, 0xb7, 0x64, 0x84,
1080  0xf5, 0x09, 0x5a, 0xa8, 0x11, 0x93, 0xf3,
1081  0x4f, 0x02, 0x28, 0x00, 0x3a, 0xf0, 0xa9,
1082  0x08, 0x77, 0x04, 0xf5, 0x04, 0xcd, 0x6b,
1083  0x24, 0xbe, 0x0f, 0x6d, 0xe3, 0xb2, 0xd3,
1084  0x07, 0x68, 0xe9, 0x00, 0x59, 0xa0, 0xe4,
1085  0x9e, 0x5e ),
1086  BIGINT ( 0x0e, 0xc4, 0xf0, 0xe0, 0x5d, 0xa8, 0x83,
1087  0x55, 0x36, 0xa1, 0x63, 0x34, 0xe3, 0xea,
1088  0x38, 0x5f, 0xce, 0x1b, 0xe2, 0x8c, 0xae,
1089  0x09, 0x32, 0xf0, 0x9d, 0x08, 0xf1, 0x74,
1090  0xaf, 0xd5, 0x4a, 0x87, 0xee, 0x05, 0xe0,
1091  0xf4, 0x44, 0xc0, 0xca, 0x85, 0xe4, 0x66,
1092  0xfb, 0xc7, 0x50, 0x37, 0x88, 0x29, 0xb7,
1093  0xdc, 0x95, 0xe3, 0xc2, 0xa5, 0xa9, 0xb4,
1094  0x47, 0xda, 0x26, 0xbb, 0xd5, 0x9f, 0xec,
1095  0xbc, 0x73, 0x09, 0xc5, 0x67, 0x44, 0x0b,
1096  0x75, 0xb2, 0x93, 0x1c, 0xea, 0x3b, 0xb7,
1097  0xcd, 0x62, 0xdd, 0xb4, 0x15, 0x07, 0xa0,
1098  0xdd, 0x9e, 0xf4, 0xcd, 0x6e, 0xc9, 0x09,
1099  0xea, 0x12, 0xb5, 0x50, 0x23, 0x27, 0xe6,
1100  0x9e, 0x04, 0x50, 0x00, 0x75, 0xe1, 0x52,
1101  0x10, 0xee, 0x09, 0xea, 0x09, 0x9a, 0xd6,
1102  0x49, 0x7c, 0x1e, 0xdb, 0xc7, 0x65, 0xa6,
1103  0x0e, 0xd1, 0xd2, 0x00, 0xb3, 0x41, 0xc9,
1104  0x3c, 0xbc ), 0 );
1105  bigint_shr_ok ( BIGINT(), BIGINT(), 0 );
1106  bigint_shr_ok ( BIGINT ( 0x8f ),
1107  BIGINT ( 0x47 ), 1 );
1108  bigint_shr_ok ( BIGINT ( 0xaa, 0x1d ),
1109  BIGINT ( 0x55, 0x0e ), 1 );
1110  bigint_shr_ok ( BIGINT ( 0xf0, 0xbd, 0x68 ),
1111  BIGINT ( 0x78, 0x5e, 0xb4 ), 0 );
1112  bigint_shr_ok ( BIGINT ( 0x33, 0xa0, 0x3d, 0x95 ),
1113  BIGINT ( 0x19, 0xd0, 0x1e, 0xca ), 1 );
1114  bigint_shr_ok ( BIGINT ( 0xa1, 0xf4, 0xb9, 0x64, 0x91, 0x99, 0xa1,
1115  0xf4, 0xae, 0xeb, 0x71, 0x97, 0x1b, 0x71,
1116  0x09, 0x38, 0x3f, 0x8f, 0xc5, 0x3a, 0xb9,
1117  0x75, 0x94 ),
1118  BIGINT ( 0x50, 0xfa, 0x5c, 0xb2, 0x48, 0xcc, 0xd0,
1119  0xfa, 0x57, 0x75, 0xb8, 0xcb, 0x8d, 0xb8,
1120  0x84, 0x9c, 0x1f, 0xc7, 0xe2, 0x9d, 0x5c,
1121  0xba, 0xca ), 0 );
1122  bigint_shr_ok ( BIGINT ( 0xa4, 0x19, 0xbb, 0x93, 0x0b, 0x3f, 0x47,
1123  0x5b, 0xb4, 0xb5, 0x7d, 0x75, 0x42, 0x22,
1124  0xcc, 0xdf ),
1125  BIGINT ( 0x52, 0x0c, 0xdd, 0xc9, 0x85, 0x9f, 0xa3,
1126  0xad, 0xda, 0x5a, 0xbe, 0xba, 0xa1, 0x11,
1127  0x66, 0x6f ), 1 );
1128  bigint_shr_ok ( BIGINT ( 0x27, 0x7e, 0x8f, 0x60, 0x40, 0x93, 0x43,
1129  0xd6, 0x89, 0x3e, 0x40, 0x61, 0x9a, 0x04,
1130  0x4c, 0x02 ),
1131  BIGINT ( 0x13, 0xbf, 0x47, 0xb0, 0x20, 0x49, 0xa1,
1132  0xeb, 0x44, 0x9f, 0x20, 0x30, 0xcd, 0x02,
1133  0x26, 0x01 ), 0 );
1134  bigint_shr_ok ( BIGINT ( 0xc0, 0xb3, 0x78, 0x46, 0x69, 0x6e, 0x35,
1135  0x94, 0xed, 0x28, 0xdc, 0xfd, 0xf6, 0xdb,
1136  0x2d, 0x24, 0xcb, 0xa4, 0x6f, 0x0e, 0x58,
1137  0x89, 0x04, 0xec, 0xc8, 0x0c, 0x2d, 0xb3,
1138  0x58, 0xa7, 0x22, 0x6d, 0x93, 0xe0, 0xb8,
1139  0x48, 0x6a, 0x3f, 0x04, 0x7e, 0xbe, 0xb8,
1140  0xa7, 0x84, 0xf5, 0xc9, 0x2f, 0x60, 0x9e,
1141  0x7c, 0xbc, 0xaf, 0x28, 0x89, 0x2f, 0xaa,
1142  0xd1, 0x82, 0x77, 0xa4, 0xdf, 0xf3, 0x4a,
1143  0xc6, 0xed, 0xa3, 0x07, 0xb4, 0xa9, 0xfd,
1144  0xef, 0xf8, 0x20, 0xb9, 0xb3, 0xff, 0x35,
1145  0x27, 0xed, 0x02, 0xea, 0xec, 0x63, 0xc0,
1146  0x46, 0x97, 0xc0, 0x4c, 0xca, 0x89, 0xca,
1147  0x14, 0xe8, 0xe0, 0x02, 0x14, 0x44, 0x46,
1148  0xf3, 0x2f, 0xbc, 0x6a, 0x28, 0xa2, 0xbe,
1149  0x20, 0xc8, 0xaa, 0x0f, 0xd9, 0x51, 0x8e,
1150  0x8d, 0x51, 0x29, 0x61, 0xef, 0x48, 0xae,
1151  0x3e, 0xe5, 0x10, 0xbf, 0xda, 0x9b, 0x92,
1152  0xb3, 0x77 ),
1153  BIGINT ( 0x60, 0x59, 0xbc, 0x23, 0x34, 0xb7, 0x1a,
1154  0xca, 0x76, 0x94, 0x6e, 0x7e, 0xfb, 0x6d,
1155  0x96, 0x92, 0x65, 0xd2, 0x37, 0x87, 0x2c,
1156  0x44, 0x82, 0x76, 0x64, 0x06, 0x16, 0xd9,
1157  0xac, 0x53, 0x91, 0x36, 0xc9, 0xf0, 0x5c,
1158  0x24, 0x35, 0x1f, 0x82, 0x3f, 0x5f, 0x5c,
1159  0x53, 0xc2, 0x7a, 0xe4, 0x97, 0xb0, 0x4f,
1160  0x3e, 0x5e, 0x57, 0x94, 0x44, 0x97, 0xd5,
1161  0x68, 0xc1, 0x3b, 0xd2, 0x6f, 0xf9, 0xa5,
1162  0x63, 0x76, 0xd1, 0x83, 0xda, 0x54, 0xfe,
1163  0xf7, 0xfc, 0x10, 0x5c, 0xd9, 0xff, 0x9a,
1164  0x93, 0xf6, 0x81, 0x75, 0x76, 0x31, 0xe0,
1165  0x23, 0x4b, 0xe0, 0x26, 0x65, 0x44, 0xe5,
1166  0x0a, 0x74, 0x70, 0x01, 0x0a, 0x22, 0x23,
1167  0x79, 0x97, 0xde, 0x35, 0x14, 0x51, 0x5f,
1168  0x10, 0x64, 0x55, 0x07, 0xec, 0xa8, 0xc7,
1169  0x46, 0xa8, 0x94, 0xb0, 0xf7, 0xa4, 0x57,
1170  0x1f, 0x72, 0x88, 0x5f, 0xed, 0x4d, 0xc9,
1171  0x59, 0xbb ), 1 );
1172  bigint_is_zero_ok ( BIGINT(), 1 );
1173  bigint_is_zero_ok ( BIGINT ( 0x9b ),
1174  0 );
1175  bigint_is_zero_ok ( BIGINT ( 0x5a, 0x9d ),
1176  0 );
1177  bigint_is_zero_ok ( BIGINT ( 0x5f, 0x80, 0x78 ),
1178  0 );
1179  bigint_is_zero_ok ( BIGINT ( 0xa0, 0x52, 0x47, 0x2e ),
1180  0 );
1181  bigint_is_zero_ok ( BIGINT ( 0x18, 0x08, 0x49, 0xdb, 0x7b, 0x5c,
1182  0xe7, 0x41, 0x07, 0xdf, 0xed, 0xf9,
1183  0xd3, 0x92, 0x0d, 0x75, 0xa6, 0xb0,
1184  0x14, 0xfa, 0xdd, 0xfd, 0x82 ),
1185  0 );
1186  bigint_is_zero_ok ( BIGINT ( 0x04, 0x04, 0xb5, 0xf5, 0x01, 0xae,
1187  0x2b, 0x91, 0xa7, 0xc1, 0x49, 0x97,
1188  0x3f, 0x45, 0x53, 0x52, 0xb8, 0x52,
1189  0xf1, 0x62, 0xa5, 0x21, 0x18, 0xd4,
1190  0xb0, 0xb4, 0x8a, 0x17, 0x0e, 0xe8,
1191  0xeb, 0xaa, 0x28, 0xae, 0x3d, 0x8e,
1192  0xe3, 0x6c, 0xd0, 0x01, 0x0c, 0x54,
1193  0xca, 0x23, 0xbb, 0x06, 0xcd, 0x7a,
1194  0x61, 0x89, 0x38, 0x34, 0x6e, 0xc7,
1195  0xc2, 0xee, 0xb1, 0x80, 0x61, 0x0e,
1196  0xc6, 0x8d, 0x65, 0xa0, 0xeb, 0x34,
1197  0xe9, 0x63, 0x09, 0x4c, 0x20, 0xac,
1198  0x42, 0xe3, 0x35, 0xa2, 0x3e, 0x3b,
1199  0x2e, 0x18, 0x70, 0x45, 0x7c, 0xab,
1200  0x42, 0xcc, 0xe0, 0x9e, 0x7c, 0x42,
1201  0xd1, 0xda, 0x6c, 0x51, 0x10, 0x1e,
1202  0x0e, 0x3f, 0xe5, 0xd6, 0xd8, 0x56,
1203  0x08, 0xb2, 0x3b, 0x15, 0xc4, 0x7c,
1204  0x0c, 0x7e, 0xaf, 0x7b, 0x9d, 0xd6,
1205  0x2b, 0xc0, 0x2f, 0xa2, 0xa3, 0xa3,
1206  0x77, 0x58, 0x1b, 0xe9, 0xa8, 0x9a,
1207  0x23, 0x7f ),
1208  0 );
1209  bigint_is_zero_ok ( BIGINT ( 0x00 ),
1210  1 );
1211  bigint_is_zero_ok ( BIGINT ( 0x00, 0x00 ),
1212  1 );
1213  bigint_is_zero_ok ( BIGINT ( 0x00, 0x00, 0x00 ),
1214  1 );
1215  bigint_is_zero_ok ( BIGINT ( 0x00, 0x00, 0x00, 0x00 ),
1216  1 );
1217  bigint_is_zero_ok ( BIGINT ( 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1218  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1219  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1220  0x00, 0x00, 0x00, 0x00, 0x00 ),
1221  1 );
1222  bigint_is_zero_ok ( BIGINT ( 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1223  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1224  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1225  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1226  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1227  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1228  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1229  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1230  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1231  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1232  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1233  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1234  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1235  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1236  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1237  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1238  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1239  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1240  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1241  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1242  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1243  0x00, 0x00 ),
1244  1 );
1245  bigint_is_zero_ok ( BIGINT ( 0xff ),
1246  0 );
1247  bigint_is_zero_ok ( BIGINT ( 0xff, 0xff ),
1248  0 );
1249  bigint_is_zero_ok ( BIGINT ( 0xff, 0xff, 0xff ),
1250  0 );
1251  bigint_is_zero_ok ( BIGINT ( 0xff, 0xff, 0xff, 0xff ),
1252  0 );
1253  bigint_is_zero_ok ( BIGINT ( 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1254  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1255  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1256  0xff, 0xff, 0xff, 0xff, 0xff ),
1257  0 );
1258  bigint_is_zero_ok ( BIGINT ( 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1259  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1260  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1261  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1262  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1263  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1264  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1265  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1266  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1267  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1268  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1269  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1270  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1271  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1272  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1273  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1274  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1275  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1276  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1277  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1278  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1279  0xff, 0xff ),
1280  0 );
1281  bigint_is_geq_ok ( BIGINT(), BIGINT(), 1 );
1282  bigint_is_geq_ok ( BIGINT ( 0xa2 ),
1283  BIGINT ( 0x58 ),
1284  1 );
1285  bigint_is_geq_ok ( BIGINT ( 0x58 ),
1286  BIGINT ( 0xa2 ),
1287  0 );
1288  bigint_is_geq_ok ( BIGINT ( 0xa2 ),
1289  BIGINT ( 0xa2 ),
1290  1 );
1291  bigint_is_geq_ok ( BIGINT ( 0x61, 0x29 ),
1292  BIGINT ( 0x87, 0xac ),
1293  0 );
1294  bigint_is_geq_ok ( BIGINT ( 0x87, 0xac ),
1295  BIGINT ( 0x61, 0x29 ),
1296  1 );
1297  bigint_is_geq_ok ( BIGINT ( 0x61, 0x29 ),
1298  BIGINT ( 0x61, 0x29 ),
1299  1 );
1300  bigint_is_geq_ok ( BIGINT ( 0xe6, 0x63, 0x14 ),
1301  BIGINT ( 0xb7, 0x2b, 0x76 ),
1302  1 );
1303  bigint_is_geq_ok ( BIGINT ( 0xb7, 0x2b, 0x76 ),
1304  BIGINT ( 0xe6, 0x63, 0x14 ),
1305  0 );
1306  bigint_is_geq_ok ( BIGINT ( 0xe6, 0x63, 0x14 ),
1307  BIGINT ( 0xe6, 0x63, 0x14 ),
1308  1 );
1309  bigint_is_geq_ok ( BIGINT ( 0xe7, 0x4f, 0xd4, 0x80 ),
1310  BIGINT ( 0xb5, 0xf9, 0x9b, 0x90 ),
1311  1 );
1312  bigint_is_geq_ok ( BIGINT ( 0xb5, 0xf9, 0x9b, 0x90 ),
1313  BIGINT ( 0xe7, 0x4f, 0xd4, 0x80 ),
1314  0 );
1315  bigint_is_geq_ok ( BIGINT ( 0xe7, 0x4f, 0xd4, 0x80 ),
1316  BIGINT ( 0xe7, 0x4f, 0xd4, 0x80 ),
1317  1 );
1318  bigint_is_geq_ok ( BIGINT ( 0xe6, 0x2c, 0x7c, 0x24, 0x78, 0x8f, 0x12,
1319  0x20, 0xde, 0xd3, 0x6b, 0xc9, 0x97, 0x2d,
1320  0x66, 0x74, 0xe5, 0xb6, 0xf7, 0x8f, 0x2b,
1321  0x60, 0x98 ),
1322  BIGINT ( 0x77, 0xbc, 0x3b, 0x1b, 0x57, 0x43, 0x3b,
1323  0x8c, 0x82, 0xda, 0xb5, 0xc7, 0x18, 0x09,
1324  0xb3, 0x59, 0x0e, 0x53, 0x2a, 0xb9, 0xd8,
1325  0xa2, 0xb4 ),
1326  1 );
1327  bigint_is_geq_ok ( BIGINT ( 0x77, 0xbc, 0x3b, 0x1b, 0x57, 0x43, 0x3b,
1328  0x8c, 0x82, 0xda, 0xb5, 0xc7, 0x18, 0x09,
1329  0xb3, 0x59, 0x0e, 0x53, 0x2a, 0xb9, 0xd8,
1330  0xa2, 0xb4 ),
1331  BIGINT ( 0xe6, 0x2c, 0x7c, 0x24, 0x78, 0x8f, 0x12,
1332  0x20, 0xde, 0xd3, 0x6b, 0xc9, 0x97, 0x2d,
1333  0x66, 0x74, 0xe5, 0xb6, 0xf7, 0x8f, 0x2b,
1334  0x60, 0x98 ),
1335  0 );
1336  bigint_is_geq_ok ( BIGINT ( 0xe6, 0x2c, 0x7c, 0x24, 0x78, 0x8f, 0x12,
1337  0x20, 0xde, 0xd3, 0x6b, 0xc9, 0x97, 0x2d,
1338  0x66, 0x74, 0xe5, 0xb6, 0xf7, 0x8f, 0x2b,
1339  0x60, 0x98 ),
1340  BIGINT ( 0xe6, 0x2c, 0x7c, 0x24, 0x78, 0x8f, 0x12,
1341  0x20, 0xde, 0xd3, 0x6b, 0xc9, 0x97, 0x2d,
1342  0x66, 0x74, 0xe5, 0xb6, 0xf7, 0x8f, 0x2b,
1343  0x60, 0x98 ),
1344  1 );
1345  bigint_is_geq_ok ( BIGINT ( 0x2a, 0x98, 0xfd, 0x87, 0x5d, 0x9f, 0xb4,
1346  0x8b, 0x5c, 0xcd, 0x5f, 0xcd, 0x53, 0xb3,
1347  0xd1, 0x81, 0x6a, 0x9c, 0x93, 0x66, 0x40,
1348  0xa7, 0x64, 0xe0, 0x8c, 0xec, 0x96, 0x63,
1349  0x4d, 0x29, 0xfa, 0xb1, 0x5d, 0x93, 0x2f,
1350  0xf9, 0x36, 0xea, 0x3b, 0xc1, 0xaf, 0x85,
1351  0xcb, 0xde, 0x2d, 0xc8, 0x48, 0x33, 0xce,
1352  0x7b, 0xa4, 0xa4, 0xda, 0x0f, 0xaa, 0x1b,
1353  0xcb, 0xed, 0xbe, 0x3a, 0xa5, 0xbb, 0x73,
1354  0x28, 0x04, 0xc6, 0x2a, 0xfb, 0x3a, 0xc3,
1355  0xae, 0x42, 0x1f, 0x53, 0x6c, 0xb2, 0x76,
1356  0xb7, 0xe2, 0x88, 0xcb, 0x88, 0xcf, 0xf0,
1357  0x52, 0x81, 0xd3, 0xb2, 0x1f, 0x56, 0xe1,
1358  0xe1, 0x47, 0x93, 0x6f, 0x2b, 0x49, 0xaa,
1359  0x50, 0x99, 0x7a, 0xc4, 0x56, 0xb7, 0x13,
1360  0x80, 0xf4, 0x73, 0x88, 0xc7, 0x39, 0x83,
1361  0x67, 0xc7, 0xcc, 0xb2, 0x28, 0x7a, 0xd3,
1362  0xdc, 0x48, 0xea, 0x62, 0x0d, 0xf5, 0x5a,
1363  0x27, 0x96 ),
1364  BIGINT ( 0xd4, 0x6b, 0x0a, 0x2e, 0x9f, 0xde, 0x4b,
1365  0x64, 0xfa, 0x6b, 0x37, 0x73, 0x66, 0x06,
1366  0xee, 0x04, 0xef, 0xe6, 0x3c, 0x7d, 0x57,
1367  0x22, 0x7f, 0x1f, 0x62, 0x1c, 0x7e, 0x20,
1368  0xda, 0x97, 0xd0, 0x27, 0x23, 0xf6, 0x77,
1369  0x5b, 0x49, 0x97, 0xe1, 0x65, 0x91, 0x13,
1370  0x93, 0xd6, 0x12, 0xc3, 0x66, 0x91, 0x76,
1371  0xe8, 0x47, 0x4c, 0x6a, 0x1b, 0xa2, 0x02,
1372  0xf8, 0x94, 0xaa, 0xe0, 0x1b, 0x0b, 0x17,
1373  0x86, 0x5e, 0xf5, 0x17, 0x23, 0xf5, 0x17,
1374  0x91, 0x6b, 0xd7, 0x2f, 0x5a, 0xfe, 0x8a,
1375  0x63, 0x28, 0x31, 0x1e, 0x09, 0x60, 0x29,
1376  0x5d, 0x55, 0xd8, 0x79, 0xeb, 0x78, 0x36,
1377  0x44, 0x69, 0xa4, 0x76, 0xa5, 0x35, 0x30,
1378  0xca, 0xc9, 0xf9, 0x62, 0xd7, 0x82, 0x13,
1379  0x56, 0xd0, 0x58, 0xfe, 0x16, 0x4b, 0xfb,
1380  0xa8, 0x4c, 0xb3, 0xd7, 0xcf, 0x5f, 0x93,
1381  0x9d, 0xc4, 0x11, 0xb4, 0xdd, 0xf8, 0x8f,
1382  0xe1, 0x11 ),
1383  0 );
1384  bigint_is_geq_ok ( BIGINT ( 0xd4, 0x6b, 0x0a, 0x2e, 0x9f, 0xde, 0x4b,
1385  0x64, 0xfa, 0x6b, 0x37, 0x73, 0x66, 0x06,
1386  0xee, 0x04, 0xef, 0xe6, 0x3c, 0x7d, 0x57,
1387  0x22, 0x7f, 0x1f, 0x62, 0x1c, 0x7e, 0x20,
1388  0xda, 0x97, 0xd0, 0x27, 0x23, 0xf6, 0x77,
1389  0x5b, 0x49, 0x97, 0xe1, 0x65, 0x91, 0x13,
1390  0x93, 0xd6, 0x12, 0xc3, 0x66, 0x91, 0x76,
1391  0xe8, 0x47, 0x4c, 0x6a, 0x1b, 0xa2, 0x02,
1392  0xf8, 0x94, 0xaa, 0xe0, 0x1b, 0x0b, 0x17,
1393  0x86, 0x5e, 0xf5, 0x17, 0x23, 0xf5, 0x17,
1394  0x91, 0x6b, 0xd7, 0x2f, 0x5a, 0xfe, 0x8a,
1395  0x63, 0x28, 0x31, 0x1e, 0x09, 0x60, 0x29,
1396  0x5d, 0x55, 0xd8, 0x79, 0xeb, 0x78, 0x36,
1397  0x44, 0x69, 0xa4, 0x76, 0xa5, 0x35, 0x30,
1398  0xca, 0xc9, 0xf9, 0x62, 0xd7, 0x82, 0x13,
1399  0x56, 0xd0, 0x58, 0xfe, 0x16, 0x4b, 0xfb,
1400  0xa8, 0x4c, 0xb3, 0xd7, 0xcf, 0x5f, 0x93,
1401  0x9d, 0xc4, 0x11, 0xb4, 0xdd, 0xf8, 0x8f,
1402  0xe1, 0x11 ),
1403  BIGINT ( 0x2a, 0x98, 0xfd, 0x87, 0x5d, 0x9f, 0xb4,
1404  0x8b, 0x5c, 0xcd, 0x5f, 0xcd, 0x53, 0xb3,
1405  0xd1, 0x81, 0x6a, 0x9c, 0x93, 0x66, 0x40,
1406  0xa7, 0x64, 0xe0, 0x8c, 0xec, 0x96, 0x63,
1407  0x4d, 0x29, 0xfa, 0xb1, 0x5d, 0x93, 0x2f,
1408  0xf9, 0x36, 0xea, 0x3b, 0xc1, 0xaf, 0x85,
1409  0xcb, 0xde, 0x2d, 0xc8, 0x48, 0x33, 0xce,
1410  0x7b, 0xa4, 0xa4, 0xda, 0x0f, 0xaa, 0x1b,
1411  0xcb, 0xed, 0xbe, 0x3a, 0xa5, 0xbb, 0x73,
1412  0x28, 0x04, 0xc6, 0x2a, 0xfb, 0x3a, 0xc3,
1413  0xae, 0x42, 0x1f, 0x53, 0x6c, 0xb2, 0x76,
1414  0xb7, 0xe2, 0x88, 0xcb, 0x88, 0xcf, 0xf0,
1415  0x52, 0x81, 0xd3, 0xb2, 0x1f, 0x56, 0xe1,
1416  0xe1, 0x47, 0x93, 0x6f, 0x2b, 0x49, 0xaa,
1417  0x50, 0x99, 0x7a, 0xc4, 0x56, 0xb7, 0x13,
1418  0x80, 0xf4, 0x73, 0x88, 0xc7, 0x39, 0x83,
1419  0x67, 0xc7, 0xcc, 0xb2, 0x28, 0x7a, 0xd3,
1420  0xdc, 0x48, 0xea, 0x62, 0x0d, 0xf5, 0x5a,
1421  0x27, 0x96 ),
1422  1 );
1423  bigint_is_geq_ok ( BIGINT ( 0x2a, 0x98, 0xfd, 0x87, 0x5d, 0x9f, 0xb4,
1424  0x8b, 0x5c, 0xcd, 0x5f, 0xcd, 0x53, 0xb3,
1425  0xd1, 0x81, 0x6a, 0x9c, 0x93, 0x66, 0x40,
1426  0xa7, 0x64, 0xe0, 0x8c, 0xec, 0x96, 0x63,
1427  0x4d, 0x29, 0xfa, 0xb1, 0x5d, 0x93, 0x2f,
1428  0xf9, 0x36, 0xea, 0x3b, 0xc1, 0xaf, 0x85,
1429  0xcb, 0xde, 0x2d, 0xc8, 0x48, 0x33, 0xce,
1430  0x7b, 0xa4, 0xa4, 0xda, 0x0f, 0xaa, 0x1b,
1431  0xcb, 0xed, 0xbe, 0x3a, 0xa5, 0xbb, 0x73,
1432  0x28, 0x04, 0xc6, 0x2a, 0xfb, 0x3a, 0xc3,
1433  0xae, 0x42, 0x1f, 0x53, 0x6c, 0xb2, 0x76,
1434  0xb7, 0xe2, 0x88, 0xcb, 0x88, 0xcf, 0xf0,
1435  0x52, 0x81, 0xd3, 0xb2, 0x1f, 0x56, 0xe1,
1436  0xe1, 0x47, 0x93, 0x6f, 0x2b, 0x49, 0xaa,
1437  0x50, 0x99, 0x7a, 0xc4, 0x56, 0xb7, 0x13,
1438  0x80, 0xf4, 0x73, 0x88, 0xc7, 0x39, 0x83,
1439  0x67, 0xc7, 0xcc, 0xb2, 0x28, 0x7a, 0xd3,
1440  0xdc, 0x48, 0xea, 0x62, 0x0d, 0xf5, 0x5a,
1441  0x27, 0x96 ),
1442  BIGINT ( 0x2a, 0x98, 0xfd, 0x87, 0x5d, 0x9f, 0xb4,
1443  0x8b, 0x5c, 0xcd, 0x5f, 0xcd, 0x53, 0xb3,
1444  0xd1, 0x81, 0x6a, 0x9c, 0x93, 0x66, 0x40,
1445  0xa7, 0x64, 0xe0, 0x8c, 0xec, 0x96, 0x63,
1446  0x4d, 0x29, 0xfa, 0xb1, 0x5d, 0x93, 0x2f,
1447  0xf9, 0x36, 0xea, 0x3b, 0xc1, 0xaf, 0x85,
1448  0xcb, 0xde, 0x2d, 0xc8, 0x48, 0x33, 0xce,
1449  0x7b, 0xa4, 0xa4, 0xda, 0x0f, 0xaa, 0x1b,
1450  0xcb, 0xed, 0xbe, 0x3a, 0xa5, 0xbb, 0x73,
1451  0x28, 0x04, 0xc6, 0x2a, 0xfb, 0x3a, 0xc3,
1452  0xae, 0x42, 0x1f, 0x53, 0x6c, 0xb2, 0x76,
1453  0xb7, 0xe2, 0x88, 0xcb, 0x88, 0xcf, 0xf0,
1454  0x52, 0x81, 0xd3, 0xb2, 0x1f, 0x56, 0xe1,
1455  0xe1, 0x47, 0x93, 0x6f, 0x2b, 0x49, 0xaa,
1456  0x50, 0x99, 0x7a, 0xc4, 0x56, 0xb7, 0x13,
1457  0x80, 0xf4, 0x73, 0x88, 0xc7, 0x39, 0x83,
1458  0x67, 0xc7, 0xcc, 0xb2, 0x28, 0x7a, 0xd3,
1459  0xdc, 0x48, 0xea, 0x62, 0x0d, 0xf5, 0x5a,
1460  0x27, 0x96 ),
1461  1 );
1462  bigint_bit_is_set_ok ( BIGINT ( 0x37 ),
1463  0, 1 );
1464  bigint_bit_is_set_ok ( BIGINT ( 0xe6, 0xcb ),
1465  0, 1 );
1466  bigint_bit_is_set_ok ( BIGINT ( 0xd9, 0x0c, 0x5b ),
1467  0, 1 );
1468  bigint_bit_is_set_ok ( BIGINT ( 0x8b, 0x56, 0x89, 0xaf ),
1469  0, 1 );
1470  bigint_bit_is_set_ok ( BIGINT ( 0x25, 0xfc, 0xaf, 0xeb, 0x81, 0xc3,
1471  0xb8, 0x2f, 0xbb, 0xe3, 0x07, 0xb2,
1472  0xe2, 0x2a, 0xe2, 0x2d, 0xb4, 0x4d,
1473  0x6d, 0xec, 0x51, 0xa0, 0x2f ),
1474  0, 1 );
1475  bigint_bit_is_set_ok ( BIGINT ( 0x25, 0xfc, 0xaf, 0xeb, 0x81, 0xc3,
1476  0xb8, 0x2f, 0xbb, 0xe3, 0x07, 0xb2,
1477  0xe2, 0x2a, 0xe2, 0x2d, 0xb4, 0x4d,
1478  0x6d, 0xec, 0x51, 0xa0, 0x2f ),
1479  45, 0 );
1480  bigint_bit_is_set_ok ( BIGINT ( 0x88, 0x04, 0xec, 0xe6, 0xfb, 0x31,
1481  0x87, 0x43, 0xb2, 0x04, 0x9e, 0x09,
1482  0xba, 0x3e, 0x6d, 0x64, 0x1a, 0x85,
1483  0xb6, 0x46, 0x7d, 0x71, 0x3c, 0x06,
1484  0xd6, 0x40, 0x52, 0x39, 0x95, 0xa1,
1485  0x06, 0xff, 0x6a, 0x5c, 0xa3, 0x6d,
1486  0x4a, 0xc9, 0x77, 0x87, 0x75, 0x25,
1487  0x57, 0x65, 0x72, 0x73, 0x64, 0x7e,
1488  0xe9, 0x16, 0x17, 0xf3, 0x65, 0x3f,
1489  0xd5, 0xcc, 0xd7, 0xa2, 0xee, 0xe7,
1490  0x8d, 0x48, 0xd5, 0x7e, 0xdd, 0x59,
1491  0x4b, 0xf0, 0x96, 0x8b, 0x21, 0x65,
1492  0x04, 0x66, 0xc5, 0xff, 0x3e, 0x60,
1493  0xba, 0x28, 0x38, 0x7d, 0x9c, 0x09,
1494  0xd1, 0x8e, 0xac, 0x73, 0x8e, 0xf2,
1495  0x1e, 0xdf, 0x83, 0x6e, 0x54, 0xd5,
1496  0x34, 0xc1, 0xc6, 0xf9, 0x62, 0x2a,
1497  0x7d, 0xec, 0x47, 0xf2, 0xfc, 0xa2,
1498  0x10, 0x0a, 0x67, 0x1b, 0xc6, 0x11,
1499  0x9d, 0x68, 0x25, 0x8b, 0xb5, 0x9b,
1500  0x83, 0xf8, 0xa2, 0x11, 0xf5, 0xd4,
1501  0xcb, 0xe0 ),
1502  0, 0 );
1503  bigint_bit_is_set_ok ( BIGINT ( 0x88, 0x04, 0xec, 0xe6, 0xfb, 0x31,
1504  0x87, 0x43, 0xb2, 0x04, 0x9e, 0x09,
1505  0xba, 0x3e, 0x6d, 0x64, 0x1a, 0x85,
1506  0xb6, 0x46, 0x7d, 0x71, 0x3c, 0x06,
1507  0xd6, 0x40, 0x52, 0x39, 0x95, 0xa1,
1508  0x06, 0xff, 0x6a, 0x5c, 0xa3, 0x6d,
1509  0x4a, 0xc9, 0x77, 0x87, 0x75, 0x25,
1510  0x57, 0x65, 0x72, 0x73, 0x64, 0x7e,
1511  0xe9, 0x16, 0x17, 0xf3, 0x65, 0x3f,
1512  0xd5, 0xcc, 0xd7, 0xa2, 0xee, 0xe7,
1513  0x8d, 0x48, 0xd5, 0x7e, 0xdd, 0x59,
1514  0x4b, 0xf0, 0x96, 0x8b, 0x21, 0x65,
1515  0x04, 0x66, 0xc5, 0xff, 0x3e, 0x60,
1516  0xba, 0x28, 0x38, 0x7d, 0x9c, 0x09,
1517  0xd1, 0x8e, 0xac, 0x73, 0x8e, 0xf2,
1518  0x1e, 0xdf, 0x83, 0x6e, 0x54, 0xd5,
1519  0x34, 0xc1, 0xc6, 0xf9, 0x62, 0x2a,
1520  0x7d, 0xec, 0x47, 0xf2, 0xfc, 0xa2,
1521  0x10, 0x0a, 0x67, 0x1b, 0xc6, 0x11,
1522  0x9d, 0x68, 0x25, 0x8b, 0xb5, 0x9b,
1523  0x83, 0xf8, 0xa2, 0x11, 0xf5, 0xd4,
1524  0xcb, 0xe0 ),
1525  45, 1 );
1526  bigint_bit_is_set_ok ( BIGINT ( 0x88, 0x04, 0xec, 0xe6, 0xfb, 0x31,
1527  0x87, 0x43, 0xb2, 0x04, 0x9e, 0x09,
1528  0xba, 0x3e, 0x6d, 0x64, 0x1a, 0x85,
1529  0xb6, 0x46, 0x7d, 0x71, 0x3c, 0x06,
1530  0xd6, 0x40, 0x52, 0x39, 0x95, 0xa1,
1531  0x06, 0xff, 0x6a, 0x5c, 0xa3, 0x6d,
1532  0x4a, 0xc9, 0x77, 0x87, 0x75, 0x25,
1533  0x57, 0x65, 0x72, 0x73, 0x64, 0x7e,
1534  0xe9, 0x16, 0x17, 0xf3, 0x65, 0x3f,
1535  0xd5, 0xcc, 0xd7, 0xa2, 0xee, 0xe7,
1536  0x8d, 0x48, 0xd5, 0x7e, 0xdd, 0x59,
1537  0x4b, 0xf0, 0x96, 0x8b, 0x21, 0x65,
1538  0x04, 0x66, 0xc5, 0xff, 0x3e, 0x60,
1539  0xba, 0x28, 0x38, 0x7d, 0x9c, 0x09,
1540  0xd1, 0x8e, 0xac, 0x73, 0x8e, 0xf2,
1541  0x1e, 0xdf, 0x83, 0x6e, 0x54, 0xd5,
1542  0x34, 0xc1, 0xc6, 0xf9, 0x62, 0x2a,
1543  0x7d, 0xec, 0x47, 0xf2, 0xfc, 0xa2,
1544  0x10, 0x0a, 0x67, 0x1b, 0xc6, 0x11,
1545  0x9d, 0x68, 0x25, 0x8b, 0xb5, 0x9b,
1546  0x83, 0xf8, 0xa2, 0x11, 0xf5, 0xd4,
1547  0xcb, 0xe0 ),
1548  1013, 0 );
1549  bigint_max_set_bit_ok ( BIGINT(), 0 );
1550  bigint_max_set_bit_ok ( BIGINT ( 0x3a ),
1551  6 );
1552  bigint_max_set_bit_ok ( BIGINT ( 0x03 ),
1553  2 );
1554  bigint_max_set_bit_ok ( BIGINT ( 0x00 ),
1555  0 );
1556  bigint_max_set_bit_ok ( BIGINT ( 0xff ),
1557  8 );
1558  bigint_max_set_bit_ok ( BIGINT ( 0x20, 0x30 ),
1559  14 );
1560  bigint_max_set_bit_ok ( BIGINT ( 0x00, 0x10 ),
1561  5 );
1562  bigint_max_set_bit_ok ( BIGINT ( 0x00, 0x00 ),
1563  0 );
1564  bigint_max_set_bit_ok ( BIGINT ( 0xff, 0xff ),
1565  16 );
1566  bigint_max_set_bit_ok ( BIGINT ( 0x06, 0xdb, 0x7a ),
1567  19 );
1568  bigint_max_set_bit_ok ( BIGINT ( 0x00, 0x00, 0x00 ),
1569  0 );
1570  bigint_max_set_bit_ok ( BIGINT ( 0x00, 0x00, 0x00 ),
1571  0 );
1572  bigint_max_set_bit_ok ( BIGINT ( 0xff, 0xff, 0xff ),
1573  24 );
1574  bigint_max_set_bit_ok ( BIGINT ( 0xee, 0xcb, 0x7b, 0xfd ),
1575  32 );
1576  bigint_max_set_bit_ok ( BIGINT ( 0x00, 0x00, 0x01, 0xdd ),
1577  9 );
1578  bigint_max_set_bit_ok ( BIGINT ( 0x00, 0x00, 0x00, 0x00 ),
1579  0 );
1580  bigint_max_set_bit_ok ( BIGINT ( 0xff, 0xff, 0xff, 0xff ),
1581  32 );
1582  bigint_max_set_bit_ok ( BIGINT ( 0x32, 0x39, 0x96, 0x52, 0x10, 0x67,
1583  0x7e, 0x32, 0xfc, 0x4e, 0x56, 0xc3,
1584  0x68, 0x18, 0x76, 0x1a, 0xac, 0x0e,
1585  0x93, 0xee, 0x55, 0xc5, 0x6e ),
1586  182 );
1587  bigint_max_set_bit_ok ( BIGINT ( 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1588  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1589  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1590  0x00, 0x00, 0xc8, 0xe6, 0x59 ),
1591  24 );
1592  bigint_max_set_bit_ok ( BIGINT ( 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1593  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1594  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1595  0x00, 0x00, 0x00, 0x00, 0x00 ),
1596  0 );
1597  bigint_max_set_bit_ok ( BIGINT ( 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1598  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1599  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1600  0xff, 0xff, 0xff, 0xff, 0xff ),
1601  184 );
1602  bigint_max_set_bit_ok ( BIGINT ( 0xcd, 0xb3, 0x22, 0x30, 0xdd, 0xa7,
1603  0xff, 0x37, 0xbf, 0xe3, 0x38, 0xf7,
1604  0xe1, 0x41, 0x73, 0xea, 0x3a, 0xfc,
1605  0x78, 0x9e, 0xfb, 0x4f, 0x85, 0xdc,
1606  0x1c, 0x40, 0x89, 0x6e, 0xda, 0xf9,
1607  0x9d, 0x6d, 0x12, 0x97, 0xb1, 0x80,
1608  0x2a, 0xeb, 0x91, 0xce, 0x3b, 0x83,
1609  0xb8, 0xa5, 0x3d, 0xce, 0x46, 0x56,
1610  0xb7, 0xd1, 0x28, 0xbc, 0x93, 0x4e,
1611  0x8c, 0x29, 0x6d, 0x2c, 0xcc, 0x58,
1612  0x49, 0x2f, 0x37, 0xa0, 0x08, 0x37,
1613  0x86, 0xdd, 0x38, 0x21, 0xa7, 0x57,
1614  0x37, 0xe3, 0xc5, 0xcc, 0x50, 0x11,
1615  0x1a, 0xe4, 0xea, 0xe7, 0x4d, 0x3c,
1616  0x37, 0x65, 0x78, 0xd1, 0xf6, 0xc3,
1617  0x94, 0x46, 0xd4, 0x0e, 0xd3, 0x9a,
1618  0x21, 0x8b, 0xa6, 0x54, 0xc0, 0xd2,
1619  0x88, 0x07, 0x24, 0xbf, 0x7d, 0x31,
1620  0xfd, 0x15, 0xa8, 0x92, 0x65, 0xe1,
1621  0x8d, 0xed, 0x70, 0x7b, 0x68, 0x0f,
1622  0xcc, 0x13, 0xb9, 0xb2, 0xdd, 0x3c,
1623  0x6a, 0x52 ),
1624  1024 );
1625  bigint_max_set_bit_ok ( BIGINT ( 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1626  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1627  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1628  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1629  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1630  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1631  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1632  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1633  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1634  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1635  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1636  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1637  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1638  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1639  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1640  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1641  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1642  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1643  0x00, 0x00, 0x00, 0x00, 0x66, 0xd9,
1644  0x91, 0x18, 0x6e, 0xd3, 0xff, 0x9b,
1645  0xdf, 0xf1, 0x9c, 0x7b, 0xf0, 0xa0,
1646  0xb9, 0xf5 ),
1647  127 );
1648  bigint_max_set_bit_ok ( BIGINT ( 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1649  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1650  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1651  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1652  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1653  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1654  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1655  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1656  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1657  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1658  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1659  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1660  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1661  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1662  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1663  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1664  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1665  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1666  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1667  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1668  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1669  0x00, 0x00 ),
1670  0 );
1671  bigint_max_set_bit_ok ( BIGINT ( 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1672  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1673  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1674  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1675  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1676  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1677  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1678  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1679  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1680  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1681  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1682  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1683  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1684  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1685  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1686  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1687  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1688  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1689  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1690  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1691  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1692  0xff, 0xff ),
1693  1024 );
1694  bigint_swap_ok ( BIGINT ( 0x68, 0x65, 0x6c, 0x6c, 0x6f ),
1695  BIGINT ( 0x77, 0x6f, 0x72, 0x6c, 0x64 ) );
1696  bigint_swap_ok ( BIGINT ( 0xc8, 0x1c, 0x31, 0xd7, 0x13, 0x69, 0x47,
1697  0x32, 0xb0, 0x0a, 0xf7, 0x2d, 0xb9, 0xc3,
1698  0x35, 0x96 ),
1699  BIGINT ( 0x8b, 0x1d, 0x8f, 0x21, 0x76, 0x16, 0x4c,
1700  0xf8, 0xb2, 0x63, 0xed, 0x89, 0x5e, 0x6b,
1701  0x35, 0x7c ) );
1702  bigint_multiply_ok ( BIGINT ( 0xf0 ),
1703  BIGINT ( 0xeb ),
1704  BIGINT ( 0xdc, 0x50 ) );
1705  bigint_multiply_ok ( BIGINT ( 0xd7, 0x16 ),
1706  BIGINT ( 0x88, 0xfb ),
1707  BIGINT ( 0x73, 0x16, 0x92, 0x92 ) );
1708  bigint_multiply_ok ( BIGINT ( 0xfe, 0xed, 0x1d ),
1709  BIGINT ( 0x69, 0x9c, 0x03 ),
1710  BIGINT ( 0x69, 0x2a, 0x9c, 0x5f, 0x73, 0x57 ) );
1711  bigint_multiply_ok ( BIGINT ( 0x96, 0xe9, 0x6f, 0x81 ),
1712  BIGINT ( 0x67, 0x3c, 0x5a, 0x16 ),
1713  BIGINT ( 0x3c, 0xdb, 0x7f, 0xae, 0x12, 0x7e,
1714  0xef, 0x16 ) );
1715  bigint_multiply_ok ( BIGINT ( 0x39, 0x1f, 0xc8, 0x6a ),
1716  BIGINT ( 0xba, 0x39, 0x4a, 0xb8, 0xac, 0xb3,
1717  0x4f, 0x64, 0x28, 0x46, 0xa6, 0x99 ),
1718  BIGINT ( 0x29, 0x8d, 0xe0, 0x5d, 0x08, 0xea,
1719  0x0d, 0xc7, 0x82, 0x5d, 0xba, 0x96,
1720  0x1c, 0xef, 0x83, 0x5a ) );
1721  bigint_multiply_ok ( BIGINT ( 0xe8, 0x08, 0x0b, 0xe9, 0x29, 0x36,
1722  0xea, 0x51, 0x1d, 0x75, 0x1a, 0xd5,
1723  0xba, 0xc6, 0xa0, 0xf3, 0x48, 0x5c,
1724  0xdf, 0x42, 0xdf, 0x28, 0x38 ),
1725  BIGINT ( 0x22, 0x07, 0x41, 0x54, 0x4e, 0xf9,
1726  0x90, 0xa8, 0xaf, 0xba, 0xf6, 0xb0,
1727  0x35, 0x7e, 0x98, 0xef, 0x2c, 0x31,
1728  0xc9, 0xa7, 0x25, 0x74, 0x8d ),
1729  BIGINT ( 0x1e, 0xd7, 0xa5, 0x03, 0xc0, 0x18,
1730  0x2e, 0x29, 0xb1, 0x3e, 0x96, 0x71,
1731  0x90, 0xa5, 0x6d, 0x43, 0x58, 0xf7,
1732  0x22, 0x80, 0x0b, 0x21, 0xc6, 0x70,
1733  0x90, 0x1c, 0xa8, 0x85, 0x87, 0xaf,
1734  0xd7, 0xdd, 0x27, 0x69, 0xaf, 0x20,
1735  0xa0, 0x2d, 0x43, 0x5d, 0xda, 0xba,
1736  0x4b, 0x3a, 0x86, 0xd8 ) );
1737  bigint_multiply_ok ( BIGINT ( 0xa2, 0x0f, 0xc6, 0x08, 0x0a, 0x01,
1738  0x19, 0x42, 0x0e, 0xaa, 0x5c, 0xae,
1739  0x4f, 0x4e, 0xb0, 0xad, 0xb2, 0xe8,
1740  0xee, 0xd5, 0x65, 0xec, 0x5a, 0xda,
1741  0xc0, 0xba, 0x78, 0xa8, 0x0f, 0x15,
1742  0x39, 0xd7, 0x7a, 0x10, 0xc2, 0xa7,
1743  0xec, 0x44, 0xac, 0xad, 0x39, 0x04,
1744  0x2e, 0x66, 0x54, 0x70, 0x57, 0xee,
1745  0xf6, 0x97, 0x19, 0x71, 0x16, 0xf9,
1746  0xbb, 0x2e, 0x84, 0x09, 0x6e, 0x9a,
1747  0x3b, 0x16, 0xb2, 0x65, 0x74, 0x50,
1748  0x19, 0xd1, 0xe9, 0x95, 0xa0, 0x7b,
1749  0x33, 0xb5, 0xac, 0x7c, 0x9e, 0xd4,
1750  0x68, 0x0d, 0xc9, 0xe4, 0x03, 0x86,
1751  0x1a, 0xa3, 0x42, 0x33, 0x28, 0x14,
1752  0x12, 0x7d, 0x5a, 0xd9, 0x30, 0x18,
1753  0x0a, 0xf4, 0x0c, 0x96, 0x58, 0xc9,
1754  0xb5, 0x37, 0xdb, 0x49, 0xdc, 0x01,
1755  0x4a, 0xcb, 0x6d, 0x87, 0x52, 0xf6,
1756  0xae, 0xa7, 0x71, 0x31, 0x9a, 0x1a,
1757  0xe2, 0x1c, 0x87, 0x51, 0xc9, 0xeb,
1758  0x70, 0x71 ),
1759  BIGINT ( 0x7c, 0xdd, 0x2f, 0x5d, 0x27, 0xfe,
1760  0xca, 0x70, 0x96, 0xc3, 0xb1, 0x1f,
1761  0xac, 0xa9, 0x3a, 0xdc, 0xcd, 0xbc,
1762  0x58, 0xb4, 0xde, 0xe7, 0xe5, 0x34,
1763  0x1a, 0xc0, 0xb9, 0x46, 0xf7, 0x52,
1764  0x76, 0x23, 0xe8, 0xe9, 0x92, 0xa1,
1765  0x86, 0x3c, 0x6f, 0xf1, 0x22, 0xf4,
1766  0x72, 0xb1, 0xde, 0xd3, 0x8f, 0x11,
1767  0x9e, 0x52, 0xe5, 0x81, 0x54, 0xe9,
1768  0xa7, 0x72, 0x3f, 0x3e, 0xa0, 0x80,
1769  0xbb, 0xae, 0x0e, 0x30, 0x6a, 0x11,
1770  0x91, 0x11, 0x3b, 0x3f, 0x44, 0x1f,
1771  0x8d, 0x4d, 0xea, 0xdd, 0x09, 0x95,
1772  0x9d, 0x02, 0xa6, 0x6d, 0x3b, 0x08,
1773  0x40, 0x8d, 0xb4, 0x4b, 0x05, 0x74,
1774  0x8c, 0x1f, 0xaa, 0x61, 0x6f, 0x0e,
1775  0xcc, 0xcf, 0xe0, 0x81, 0x03, 0xe4,
1776  0x9b, 0x11, 0xd9, 0xab, 0xf3, 0x24,
1777  0xe2, 0x3b, 0xe0, 0x05, 0x60, 0x65,
1778  0x16, 0xc6, 0x2e, 0x83, 0xa0, 0x98,
1779  0x8e, 0x11, 0x05, 0x00, 0xe4, 0x3f,
1780  0x7e, 0x65 ),
1781  BIGINT ( 0x4f, 0x0b, 0xa9, 0x85, 0xb8, 0x31,
1782  0x48, 0xea, 0x11, 0x44, 0xaf, 0x2d,
1783  0xed, 0x1a, 0x76, 0x45, 0xac, 0x87,
1784  0x0c, 0xf3, 0xd7, 0xc4, 0x8e, 0x5c,
1785  0xd7, 0xdf, 0x28, 0x74, 0xa6, 0x40,
1786  0xe4, 0x6b, 0x5b, 0x19, 0x36, 0x37,
1787  0x9c, 0xcd, 0x43, 0x76, 0x15, 0x00,
1788  0x5d, 0x23, 0xa2, 0x8a, 0x53, 0x25,
1789  0xbf, 0x18, 0xda, 0xe6, 0x09, 0xdf,
1790  0xaa, 0xeb, 0x9a, 0x82, 0x01, 0x14,
1791  0x2b, 0x20, 0x2b, 0xb6, 0x22, 0x62,
1792  0x6b, 0xcc, 0xd4, 0xc9, 0x02, 0x67,
1793  0x95, 0x43, 0x75, 0x4e, 0x97, 0x4e,
1794  0xec, 0x04, 0xde, 0x29, 0x0a, 0xef,
1795  0xf7, 0xc1, 0x72, 0x8c, 0x64, 0x38,
1796  0x16, 0x47, 0x9f, 0x16, 0x0c, 0xa5,
1797  0x79, 0x6b, 0xea, 0x2e, 0x4c, 0x3d,
1798  0x0c, 0xe6, 0x57, 0x51, 0x65, 0xa5,
1799  0x3b, 0xca, 0xae, 0x54, 0x0c, 0x67,
1800  0xf8, 0x23, 0x00, 0xc9, 0x8d, 0xe6,
1801  0x16, 0x91, 0x19, 0xb3, 0x5b, 0x68,
1802  0x7b, 0xf2, 0xe2, 0x5d, 0x69, 0x48,
1803  0x3f, 0x2b, 0xa0, 0x4f, 0x7c, 0x3c,
1804  0x26, 0xf9, 0xd9, 0xfd, 0x3d, 0x5d,
1805  0xd6, 0x05, 0x00, 0xd8, 0xdf, 0x5a,
1806  0x56, 0x8f, 0x16, 0x68, 0x4f, 0x15,
1807  0x19, 0x9d, 0xd7, 0x11, 0x51, 0x7d,
1808  0x73, 0x5c, 0xd4, 0xd5, 0xb4, 0xc7,
1809  0x42, 0xe3, 0xee, 0xf1, 0x67, 0xd6,
1810  0x69, 0x72, 0x04, 0x4b, 0x88, 0x3d,
1811  0x05, 0xd8, 0x1e, 0x50, 0xcb, 0xce,
1812  0x39, 0x19, 0x42, 0xb6, 0xa7, 0xf3,
1813  0xba, 0x78, 0x90, 0xd2, 0x09, 0x05,
1814  0x87, 0xf8, 0xc0, 0x9c, 0x47, 0xff,
1815  0xbf, 0xaa, 0x21, 0x8d, 0x81, 0x86,
1816  0xcd, 0x58, 0xdf, 0x30, 0xf1, 0xd1,
1817  0x60, 0x53, 0x85, 0x40, 0xbf, 0x14,
1818  0x3e, 0xdc, 0x9e, 0x9e, 0xc4, 0xc7,
1819  0x48, 0xa0, 0x83, 0xe0, 0x99, 0x8b,
1820  0x43, 0xf8, 0x52, 0x8a, 0x15, 0x88,
1821  0x89, 0x83, 0x7d, 0x71, 0xbb, 0x62,
1822  0x12, 0x7a, 0x23, 0x85, 0x3a, 0xbb,
1823  0xdb, 0x09, 0xfa, 0x95 ) );
1824  bigint_multiply_ok ( BIGINT ( 0xff ),
1825  BIGINT ( 0xff ),
1826  BIGINT ( 0xfe, 0x01 ) );
1827  bigint_multiply_ok ( BIGINT ( 0xff, 0xff ),
1828  BIGINT ( 0xff, 0xff ),
1829  BIGINT ( 0xff, 0xfe, 0x00, 0x01 ) );
1830  bigint_multiply_ok ( BIGINT ( 0xff, 0xff, 0xff ),
1831  BIGINT ( 0xff, 0xff, 0xff ),
1832  BIGINT ( 0xff, 0xff, 0xfe, 0x00, 0x00, 0x01 ) );
1833  bigint_multiply_ok ( BIGINT ( 0xff, 0xff, 0xff, 0xff ),
1834  BIGINT ( 0xff, 0xff, 0xff, 0xff ),
1835  BIGINT ( 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00,
1836  0x00, 0x01 ) );
1837  bigint_multiply_ok ( BIGINT ( 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1838  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1839  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1840  0xff, 0xff, 0xff, 0xff, 0xff ),
1841  BIGINT ( 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1842  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1843  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1844  0xff, 0xff, 0xff, 0xff, 0xff ),
1845  BIGINT ( 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1846  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1847  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1848  0xff, 0xff, 0xff, 0xff, 0xfe, 0x00,
1849  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1850  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1851  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1852  0x00, 0x00, 0x00, 0x01 ) );
1853  bigint_multiply_ok ( BIGINT ( 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1854  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1855  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1856  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1857  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1858  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1859  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1860  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1861  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1862  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1863  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1864  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1865  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1866  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1867  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1868  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1869  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1870  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1871  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1872  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1873  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1874  0xff, 0xff ),
1875  BIGINT ( 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1876  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1877  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1878  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1879  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1880  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1881  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1882  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1883  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1884  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1885  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1886  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1887  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1888  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1889  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1890  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1891  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1892  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1893  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1894  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1895  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1896  0xff, 0xff ),
1897  BIGINT ( 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1898  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1899  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1900  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1901  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1902  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1903  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1904  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1905  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1906  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1907  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1908  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1909  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1910  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1911  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1912  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1913  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1914  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1915  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1916  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1917  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1918  0xff, 0xfe, 0x00, 0x00, 0x00, 0x00,
1919  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1920  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1921  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1922  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1923  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1924  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1925  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1926  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1927  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1928  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1929  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1930  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1931  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1932  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1933  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1934  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1935  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1936  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1937  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1938  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1939  0x00, 0x00, 0x00, 0x01 ) );
1940  bigint_reduce_ok ( BIGINT ( 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1941  0x00 ),
1942  BIGINT ( 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1943  0x00 ) );
1944  bigint_reduce_ok ( BIGINT ( 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1945  0x01 ),
1946  BIGINT ( 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1947  0x00 ) );
1948  bigint_reduce_ok ( BIGINT ( 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
1949  0x00 ),
1950  BIGINT ( 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1951  0x00 ) );
1952  bigint_reduce_ok ( BIGINT ( 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1953  0x00 ),
1954  BIGINT ( 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1955  0x00 ) );
1956  bigint_reduce_ok ( BIGINT ( 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1957  0xff ),
1958  BIGINT ( 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1959  0x01 ) );
1960  bigint_reduce_ok ( BIGINT ( 0x39, 0x18, 0x47, 0xc9, 0xa2, 0x1d, 0x4b,
1961  0xa6 ),
1962  BIGINT ( 0x30, 0x9d, 0xcc, 0xac, 0xd6, 0xf9, 0x2f,
1963  0xa0 ) );
1964  bigint_reduce_ok ( BIGINT ( 0x81, 0x96, 0xdb, 0x36, 0xa6, 0xb7, 0x41,
1965  0x45, 0x92, 0x37, 0x7d, 0x48, 0x1b, 0x2f,
1966  0x3c, 0xa6 ),
1967  BIGINT ( 0x4a, 0x68, 0x25, 0xf7, 0x2b, 0x72, 0x91,
1968  0x6e, 0x09, 0x83, 0xca, 0xf1, 0x45, 0x79,
1969  0x84, 0x18 ) );
1970  bigint_reduce_ok ( BIGINT ( 0x84, 0x2d, 0xe4, 0x1c, 0xc3, 0x11, 0x4f,
1971  0xa0, 0x90, 0x4b, 0xa9, 0xa1, 0xdf, 0xed,
1972  0x4b, 0xe0, 0xb7, 0xfc, 0x5e, 0xd1, 0x91,
1973  0x59, 0x4d, 0xc2, 0xae, 0x2f, 0x46, 0x9e,
1974  0x32, 0x6e, 0xf4, 0x67 ),
1975  BIGINT ( 0x46, 0xdd, 0x36, 0x6c, 0x0b, 0xac, 0x3a,
1976  0x8f, 0x9a, 0x25, 0x90, 0xb2, 0x39, 0xe9,
1977  0xa4, 0x65, 0xc1, 0xd4, 0xc1, 0x99, 0x61,
1978  0x95, 0x47, 0xab, 0x4f, 0xd7, 0xad, 0xd4,
1979  0x3e, 0xe9, 0x9c, 0xfc ) );
1980  bigint_mod_invert_ok ( BIGINT ( 0x01 ), BIGINT ( 0x01 ) );
1981  bigint_mod_invert_ok ( BIGINT ( 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1982  0xff, 0xff ),
1983  BIGINT ( 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1984  0xff, 0xff ) );
1985  bigint_mod_invert_ok ( BIGINT ( 0xa4, 0xcb, 0xbc, 0xc9, 0x9f, 0x7a,
1986  0x65, 0xbf ),
1987  BIGINT ( 0xb9, 0xd5, 0xf4, 0x88, 0x0b, 0xf8,
1988  0x8a, 0x3f ) );
1989  bigint_mod_invert_ok ( BIGINT ( 0x95, 0x6a, 0xc5, 0xe7, 0x2e, 0x5b,
1990  0x44, 0xed, 0xbf, 0x7e, 0xfe, 0x8d,
1991  0xf4, 0x5a, 0x48, 0xc1 ),
1992  BIGINT ( 0xad, 0xb8, 0x3d, 0x85, 0x10, 0xdf,
1993  0xea, 0x70, 0x71, 0x2c, 0x80, 0xf4,
1994  0x6e, 0x66, 0x47, 0x41 ) );
1995  bigint_mod_invert_ok ( BIGINT ( 0x35, 0xe4, 0x80, 0x48, 0xdd, 0xa1,
1996  0x46, 0xc0, 0x84, 0x63, 0xc1, 0xe4,
1997  0xf7, 0xbf, 0xb3, 0x05 ),
1998  BIGINT ( 0xf2, 0x9c, 0x63, 0x29, 0xfa, 0xe4,
1999  0xbf, 0x90, 0xa6, 0x9a, 0xec, 0xcf,
2000  0x5f, 0xe2, 0x21, 0xcd ) );
2001  bigint_mod_invert_ok ( BIGINT ( 0xb9, 0xbb, 0x7f, 0x9c, 0x7a, 0x32,
2002  0x43, 0xed, 0x9d, 0xd4, 0x0d, 0x6f,
2003  0x32, 0xfa, 0x4b, 0x62, 0x38, 0x3a,
2004  0xbf, 0x4c, 0xbd, 0xa8, 0x47, 0xce,
2005  0xa2, 0x30, 0x34, 0xe0, 0x2c, 0x09,
2006  0x14, 0x89 ),
2007  BIGINT ( 0xfc, 0x05, 0xc4, 0x2a, 0x90, 0x99,
2008  0x82, 0xf8, 0x81, 0x1d, 0x87, 0xb8,
2009  0xca, 0xe4, 0x95, 0xe2, 0xac, 0x18,
2010  0xb3, 0xe1, 0x3e, 0xc6, 0x5a, 0x03,
2011  0x51, 0x6f, 0xb7, 0xe3, 0xa5, 0xd6,
2012  0xa1, 0xb9 ) );
2013  bigint_mod_invert_ok ( BIGINT ( 0xfe, 0x43, 0xf6, 0xa0, 0x32, 0x02,
2014  0x47, 0xaa, 0xaa, 0x0e, 0x33, 0x19,
2015  0x2e, 0xe6, 0x22, 0x07 ),
2016  BIGINT ( 0x7b, 0xd1, 0x0f, 0x78, 0x0c, 0x65,
2017  0xab, 0xb7 ) );
2018  bigint_montgomery_ok ( BIGINT ( 0x74, 0xdf, 0xd1, 0xb8, 0x14, 0xf7,
2019  0x05, 0x83 ),
2020  BIGINT ( 0x50, 0x6a, 0x38, 0x55, 0x9f, 0xb9,
2021  0x9d, 0xba, 0xff, 0x23, 0x86, 0x65,
2022  0xe3, 0x2c, 0x3f, 0x17 ),
2023  BIGINT ( 0x45, 0x1f, 0x51, 0x44, 0x6f, 0x3c,
2024  0x09, 0x6b ) );
2025  bigint_montgomery_ok ( BIGINT ( 0x2e, 0x32, 0x90, 0x69, 0x6e, 0xa8,
2026  0x47, 0x4c, 0xad, 0xe4, 0xe7, 0x4c,
2027  0x03, 0xcb, 0xe6, 0x55 ),
2028  BIGINT ( 0x1e, 0x43, 0xf9, 0xc2, 0x61, 0xdd,
2029  0xe8, 0xbf, 0xb8, 0xea, 0xe0, 0xdb,
2030  0xed, 0x66, 0x80, 0x1e, 0xe8, 0xf8,
2031  0xd1, 0x1d, 0xca, 0x8d, 0x45, 0xe9,
2032  0xc5, 0xeb, 0x77, 0x21, 0x34, 0xe0,
2033  0xf5, 0x5a ),
2034  BIGINT ( 0x03, 0x38, 0xfb, 0xb6, 0xf3, 0x80,
2035  0x91, 0xb2, 0x68, 0x2f, 0x81, 0x44,
2036  0xbf, 0x43, 0x0a, 0x4e ) );
2037  bigint_mod_exp_ok ( BIGINT ( 0xcd ),
2038  BIGINT ( 0xbb ),
2039  BIGINT ( 0x25 ),
2040  BIGINT ( 0xab ) );
2041  bigint_mod_exp_ok ( BIGINT ( 0xc4 ),
2042  BIGINT ( 0xe9 ),
2043  BIGINT ( 0x02, 0x4c ),
2044  BIGINT ( 0x7e ) );
2045  bigint_mod_exp_ok ( BIGINT ( 0xcb ),
2046  BIGINT ( 0xde ),
2047  BIGINT ( 0xbd, 0x73, 0xbf ),
2048  BIGINT ( 0x17 ) );
2049  bigint_mod_exp_ok ( BIGINT ( 0x17 ),
2050  BIGINT ( 0xb9 ),
2051  BIGINT ( 0x39, 0x68, 0xba, 0x7d ),
2052  BIGINT ( 0x17 ) );
2053  bigint_mod_exp_ok ( BIGINT ( 0x71, 0x4d, 0x02, 0xe9 ),
2054  BIGINT ( 0x00, 0x00, 0x00, 0x00 ),
2055  BIGINT ( 0x91, 0x7f, 0x4e, 0x3a, 0x5d, 0x5c ),
2056  BIGINT ( 0x00, 0x00, 0x00, 0x00 ) );
2057  bigint_mod_exp_ok ( BIGINT ( 0x2b, 0xf5, 0x07, 0xaf ),
2058  BIGINT ( 0x6e, 0xb5, 0xda, 0x5a ),
2059  BIGINT ( 0x00, 0x00, 0x00, 0x00, 0x00 ),
2060  BIGINT ( 0x00, 0x00, 0x00, 0x01 ) );
2061  bigint_mod_exp_ok ( BIGINT ( 0x2e ),
2062  BIGINT ( 0xb7 ),
2063  BIGINT ( 0x39, 0x07, 0x1b, 0x49, 0x5b, 0xea,
2064  0xf2, 0x61, 0x75, 0x94, 0x60, 0x86,
2065  0x73, 0xd0, 0xeb, 0x11, 0x08, 0x19,
2066  0x90, 0x19, 0xe0, 0xed, 0x2a ),
2067  BIGINT ( 0x19 ) );
2068  bigint_mod_exp_ok ( BIGINT ( 0x59 ),
2069  BIGINT ( 0xce ),
2070  BIGINT ( 0xdf, 0xbc, 0x0d, 0x0c, 0x09, 0xeb,
2071  0xf8, 0xcf, 0xdb, 0xb6, 0x00, 0xa3,
2072  0x9e, 0xc3, 0x6c, 0x8d, 0xf1, 0xc3,
2073  0x03, 0x36, 0xaa, 0xd4, 0x22, 0x7c,
2074  0x20, 0x7b, 0xa9, 0x9a, 0x01, 0xe4,
2075  0xf2, 0x50, 0x42, 0x29, 0x68, 0x7a,
2076  0xa6, 0x2c, 0xdf, 0xb6, 0x51, 0xa9,
2077  0x73, 0x10, 0x98, 0x37, 0x69, 0xb3,
2078  0x21, 0x49, 0x6d, 0xcc, 0x80, 0xfa,
2079  0x7e, 0x12, 0xe4, 0x9c, 0xc2, 0xbb,
2080  0xe3, 0xa3, 0x10, 0x3f, 0xba, 0x99,
2081  0x22, 0x79, 0x71, 0x39, 0x96, 0x7b,
2082  0x1a, 0x89, 0xdc, 0xda, 0x43, 0x52,
2083  0x50, 0x7b, 0xe3, 0x8c, 0xd3, 0xc0,
2084  0xf5, 0x7d, 0xfc, 0x80, 0x71, 0x6e,
2085  0xaf, 0x5c, 0xd0, 0x14, 0xc0, 0x60,
2086  0x24, 0xa8, 0x9a, 0x8a, 0x54, 0x4a,
2087  0x6f, 0x42, 0x7a, 0x14, 0x14, 0x25,
2088  0xd5, 0x22, 0x08, 0x8f, 0xd9, 0xdb,
2089  0xd4, 0x0f, 0x14, 0xf4, 0x3b, 0x26,
2090  0x0e, 0xb6, 0x72, 0xd7, 0x03, 0xd5,
2091  0xf0, 0x0e ),
2092  BIGINT ( 0xa9 ) );
2093  bigint_mod_exp_ok ( BIGINT ( 0x7f, 0x30 ),
2094  BIGINT ( 0x73, 0x74 ),
2095  BIGINT ( 0x75 ),
2096  BIGINT ( 0x4b, 0xe8 ) );
2097  bigint_mod_exp_ok ( BIGINT ( 0x04, 0x6c ),
2098  BIGINT ( 0x99, 0x04 ),
2099  BIGINT ( 0x33, 0xd2 ),
2100  BIGINT ( 0x86, 0x74 ) );
2101  bigint_mod_exp_ok ( BIGINT ( 0xca, 0x88 ),
2102  BIGINT ( 0xdc, 0x60 ),
2103  BIGINT ( 0x7e, 0x76, 0x79 ),
2104  BIGINT ( 0x42, 0x40 ) );
2105  bigint_mod_exp_ok ( BIGINT ( 0x68, 0x97 ),
2106  BIGINT ( 0x52, 0x8b ),
2107  BIGINT ( 0x4f, 0x7f, 0xe7, 0xda ),
2108  BIGINT ( 0x22, 0x77 ) );
2109  bigint_mod_exp_ok ( BIGINT ( 0xbd, 0x14 ),
2110  BIGINT ( 0x9e, 0xfc ),
2111  BIGINT ( 0x23, 0xf7, 0xd0, 0xa1, 0x9e, 0x9b,
2112  0x05, 0xd2, 0x44, 0x24, 0x4f, 0x3f,
2113  0x83, 0xcc, 0x49, 0x70, 0xa5, 0x0d,
2114  0xfc, 0xa7, 0x43, 0xf3, 0x3e ),
2115  BIGINT ( 0x1a, 0xc8 ) );
2116  bigint_mod_exp_ok ( BIGINT ( 0x46, 0x3e ),
2117  BIGINT ( 0xb8, 0xde ),
2118  BIGINT ( 0xa9, 0xc0, 0xdc, 0x45, 0x65, 0x0d,
2119  0xa5, 0x56, 0x70, 0x4c, 0xf1, 0xda,
2120  0xab, 0x64, 0xc2, 0x04, 0xf6, 0x32,
2121  0x20, 0x68, 0x31, 0x5f, 0x9a, 0x00,
2122  0x0f, 0x7b, 0x24, 0x33, 0xdf, 0xaf,
2123  0xfe, 0x03, 0x1e, 0x4a, 0xa1, 0xf8,
2124  0x45, 0x8d, 0x5a, 0x7d, 0x12, 0x58,
2125  0x00, 0x6d, 0xba, 0x79, 0x9f, 0xe1,
2126  0xa1, 0xfc, 0x1f, 0xb9, 0xf3, 0xa7,
2127  0x07, 0xf5, 0xfe, 0xd6, 0xa1, 0xba,
2128  0xda, 0x63, 0xef, 0x39, 0x8e, 0xb7,
2129  0x48, 0xa8, 0x81, 0x86, 0xb1, 0x22,
2130  0x14, 0x9f, 0x9e, 0xac, 0x69, 0xf7,
2131  0xae, 0x1f, 0xf2, 0x99, 0x41, 0xb7,
2132  0x37, 0xa7, 0xbc, 0x42, 0xf2, 0x45,
2133  0x43, 0xf2, 0x2a, 0xef, 0xc2, 0x83,
2134  0xd5, 0x32, 0x6e, 0xfa, 0x49, 0x1c,
2135  0x94, 0x9c, 0xc2, 0xc5, 0xad, 0x28,
2136  0x53, 0x1c, 0x11, 0xc4, 0x1c, 0x78,
2137  0x8f, 0x13, 0xdc, 0xb3, 0x2a, 0x63,
2138  0xfd, 0x1f, 0x89, 0x9b, 0x0c, 0x31,
2139  0x92, 0x73 ),
2140  BIGINT ( 0x7b, 0x8a ) );
2141  bigint_mod_exp_ok ( BIGINT ( 0xf3, 0xc3, 0xab ),
2142  BIGINT ( 0xd0, 0x7e, 0xd0 ),
2143  BIGINT ( 0xf6 ),
2144  BIGINT ( 0x1f, 0xb3, 0x09 ) );
2145  bigint_mod_exp_ok ( BIGINT ( 0x13, 0xec, 0xf6 ),
2146  BIGINT ( 0x87, 0x1a, 0x9a ),
2147  BIGINT ( 0x03, 0xf3 ),
2148  BIGINT ( 0x15, 0xe9, 0x8e ) );
2149  bigint_mod_exp_ok ( BIGINT ( 0x5a, 0x96, 0xe5 ),
2150  BIGINT ( 0x56, 0x4a, 0xd1 ),
2151  BIGINT ( 0x89, 0x62, 0x8e ),
2152  BIGINT ( 0x34, 0xb8, 0xaa ) );
2153  bigint_mod_exp_ok ( BIGINT ( 0x84, 0x7c, 0xbd ),
2154  BIGINT ( 0x3c, 0x80, 0x0a ),
2155  BIGINT ( 0x5e, 0x52, 0x9d, 0xba ),
2156  BIGINT ( 0x04, 0xcb, 0x4f ) );
2157  bigint_mod_exp_ok ( BIGINT ( 0x50, 0x01, 0x51 ),
2158  BIGINT ( 0x02, 0xe6, 0x96 ),
2159  BIGINT ( 0x34, 0x0c, 0x7e, 0xbf, 0x27, 0x23,
2160  0x46, 0x92, 0x1c, 0xca, 0x91, 0xab,
2161  0x50, 0x2c, 0x3a, 0x64, 0xc8, 0x4a,
2162  0x75, 0xd6, 0xe2, 0xde, 0x31 ),
2163  BIGINT ( 0x02, 0x16, 0x05 ) );
2164  bigint_mod_exp_ok ( BIGINT ( 0x5e, 0x47, 0xd8 ),
2165  BIGINT ( 0x26, 0xd1, 0xb6 ),
2166  BIGINT ( 0x49, 0x61, 0x84, 0x7a, 0xa9, 0xfb,
2167  0x93, 0x45, 0xe4, 0xfa, 0x53, 0x60,
2168  0x73, 0x98, 0x5a, 0x17, 0xe7, 0x77,
2169  0x2d, 0xcd, 0x97, 0xf4, 0xc0, 0x34,
2170  0x46, 0xfa, 0xbd, 0x21, 0xdf, 0xa5,
2171  0xa0, 0x12, 0x38, 0x7c, 0xbd, 0xd9,
2172  0xcd, 0xbc, 0xde, 0x29, 0xa5, 0x13,
2173  0xa8, 0xf0, 0xf6, 0x88, 0xc6, 0x31,
2174  0xed, 0x90, 0x19, 0x11, 0x7d, 0xe1,
2175  0x0e, 0x81, 0x98, 0x8e, 0x98, 0x86,
2176  0xde, 0x2a, 0x4c, 0xad, 0xff, 0x57,
2177  0x12, 0xbc, 0x4b, 0xaf, 0x21, 0xde,
2178  0xca, 0x3a, 0x25, 0xd7, 0x98, 0xe3,
2179  0x25, 0xbc, 0x17, 0x74, 0x0b, 0x9c,
2180  0x53, 0xe1, 0x1a, 0xec, 0x9a, 0x5a,
2181  0xdc, 0x68, 0xdf, 0xad, 0xd6, 0x71,
2182  0x6b, 0x5b, 0x8b, 0x85, 0xbb, 0xe5,
2183  0xd5, 0x14, 0x4c, 0x30, 0x27, 0x68,
2184  0xd1, 0xf7, 0x58, 0x34, 0x4c, 0xe1,
2185  0x71, 0xde, 0x7b, 0x8d, 0xa2, 0xe6,
2186  0x0a, 0x44, 0x22, 0x26, 0x5a, 0x70,
2187  0xbb, 0x68 ),
2188  BIGINT ( 0x18, 0x36, 0x96 ) );
2189  bigint_mod_exp_ok ( BIGINT ( 0xc7, 0x4a, 0xf0, 0x48 ),
2190  BIGINT ( 0x5d, 0x27, 0x07, 0x54 ),
2191  BIGINT ( 0x4a ),
2192  BIGINT ( 0x48, 0x68, 0x7b, 0xe0 ) );
2193  bigint_mod_exp_ok ( BIGINT ( 0xb4, 0x89, 0xc9, 0x5b ),
2194  BIGINT ( 0x7c, 0xd7, 0xc7, 0xff ),
2195  BIGINT ( 0xc6, 0x9c ),
2196  BIGINT ( 0x0b, 0x2d, 0xf8, 0xf7 ) );
2197  bigint_mod_exp_ok ( BIGINT ( 0xea, 0x72, 0x43, 0xfe ),
2198  BIGINT ( 0xfc, 0x57, 0x2d, 0x47 ),
2199  BIGINT ( 0x60, 0x01, 0x2c ),
2200  BIGINT ( 0x12, 0x01, 0xe3, 0xf5 ) );
2201  bigint_mod_exp_ok ( BIGINT ( 0x81, 0x7f, 0x27, 0x94 ),
2202  BIGINT ( 0x17, 0x21, 0x67, 0xab ),
2203  BIGINT ( 0x50, 0x19, 0x12, 0x52 ),
2204  BIGINT ( 0x05, 0x17, 0x6b, 0x13 ) );
2205  bigint_mod_exp_ok ( BIGINT ( 0x38, 0xab, 0xd4, 0xec ),
2206  BIGINT ( 0x0c, 0x2a, 0x56, 0x38 ),
2207  BIGINT ( 0x2f, 0x85, 0x85, 0x57, 0xf6, 0xde,
2208  0x24, 0xb4, 0x28, 0x3c, 0x5a, 0x3c,
2209  0x0b, 0x12, 0x85, 0x85, 0x85, 0x98,
2210  0x46, 0x5b, 0x9c, 0x52, 0x3a ),
2211  BIGINT ( 0x02, 0xe6, 0x6a, 0x70 ) );
2212  bigint_mod_exp_ok ( BIGINT ( 0xa6, 0x35, 0xc0, 0x6f ),
2213  BIGINT ( 0x23, 0xac, 0x78, 0x72 ),
2214  BIGINT ( 0x6a, 0x07, 0x80, 0xbf, 0x1b, 0xa5,
2215  0xf8, 0x0b, 0x90, 0x06, 0xa4, 0xa5,
2216  0x44, 0x13, 0xba, 0x4b, 0xb3, 0xce,
2217  0x9f, 0x55, 0x42, 0x56, 0xc3, 0x30,
2218  0x82, 0x85, 0x5a, 0x3b, 0xae, 0x88,
2219  0x92, 0x4e, 0x3c, 0x37, 0xf6, 0x80,
2220  0x4c, 0x03, 0x3c, 0x1e, 0x2c, 0x17,
2221  0xef, 0x9d, 0xd7, 0x6f, 0xdc, 0xbb,
2222  0x42, 0x42, 0xa1, 0x7f, 0x97, 0x66,
2223  0xcd, 0xc8, 0x8a, 0x7c, 0xc6, 0x70,
2224  0x61, 0x54, 0x82, 0xd0, 0xd0, 0x8b,
2225  0xd5, 0x4f, 0x57, 0x7b, 0x8e, 0xab,
2226  0xdc, 0xbf, 0x8e, 0x85, 0x94, 0x83,
2227  0x8a, 0xb3, 0x72, 0x69, 0x2d, 0x51,
2228  0xdd, 0x86, 0x1e, 0x58, 0xb8, 0x00,
2229  0xe2, 0x5e, 0xa7, 0xef, 0x6a, 0x6a,
2230  0xb0, 0x10, 0x3d, 0x53, 0xfe, 0x23,
2231  0x51, 0xc0, 0x51, 0xed, 0x1f, 0x02,
2232  0x4b, 0x73, 0x17, 0x59, 0xfa, 0xb9,
2233  0xa8, 0x05, 0xa7, 0x79, 0xc3, 0xc9,
2234  0x4c, 0x2d, 0x58, 0x59, 0x10, 0x99,
2235  0x71, 0xe6 ),
2236  BIGINT ( 0x01, 0x63, 0xd0, 0x07 ) );
2237  bigint_mod_exp_ok ( BIGINT ( 0xff, 0x2a, 0x37, 0x04, 0xd4, 0x08,
2238  0x9f, 0xf5, 0xac, 0x29, 0x7f, 0x4b,
2239  0x93, 0x86, 0x02, 0x26, 0xac, 0x29,
2240  0xa8, 0xf9, 0x77, 0x91, 0x20 ),
2241  BIGINT ( 0x2c, 0xb2, 0xe2, 0x1f, 0x4b, 0x97,
2242  0xaa, 0x3b, 0xd1, 0x36, 0xb0, 0x40,
2243  0x8b, 0x1c, 0x19, 0xa2, 0xea, 0xc8,
2244  0xc6, 0x4e, 0x2a, 0x66, 0x50 ),
2245  BIGINT ( 0x97 ),
2246  BIGINT ( 0x04, 0x22, 0x44, 0xe2, 0x14, 0x54,
2247  0x6c, 0x5a, 0xba, 0x1b, 0x39, 0xb7,
2248  0xaa, 0x06, 0xcf, 0x2b, 0xc8, 0x7e,
2249  0xc0, 0xe0, 0x70, 0xf2, 0x90 ) );
2250  bigint_mod_exp_ok ( BIGINT ( 0xcd, 0xf3, 0xf7, 0x50, 0x13, 0x39,
2251  0x13, 0x4a, 0x56, 0xc5, 0xb8, 0xa6,
2252  0x42, 0x2d, 0x40, 0x5e, 0x07, 0xf2,
2253  0x92, 0x2a, 0x51, 0x87, 0x20 ),
2254  BIGINT ( 0x93, 0x1a, 0x28, 0xbb, 0x69, 0x4f,
2255  0x31, 0x01, 0xe0, 0x88, 0x8a, 0x4c,
2256  0x4f, 0x9b, 0xda, 0xf6, 0x4e, 0xf3,
2257  0x11, 0xe7, 0x35, 0xa1, 0xfb ),
2258  BIGINT ( 0x66, 0x69 ),
2259  BIGINT ( 0x7a, 0x5a, 0x9b, 0x84, 0x72, 0x8f,
2260  0x57, 0x31, 0xb4, 0x34, 0x70, 0x18,
2261  0x77, 0xa6, 0x43, 0xa9, 0x51, 0x69,
2262  0x07, 0x3e, 0xf6, 0x68, 0x82 ) );
2263  bigint_mod_exp_ok ( BIGINT ( 0xdd, 0x4c, 0x85, 0xcb, 0x3f, 0x45,
2264  0x61, 0xe0, 0x58, 0x1e, 0xad, 0xd3,
2265  0x6b, 0xef, 0x82, 0x53, 0x4a, 0x16,
2266  0x1a, 0xf0, 0x09, 0x82, 0x74 ),
2267  BIGINT ( 0xd2, 0xa2, 0x73, 0x89, 0x0c, 0x56,
2268  0xe4, 0x31, 0xdf, 0x70, 0x3c, 0x40,
2269  0x0d, 0x36, 0xfc, 0x4a, 0xf3, 0xa2,
2270  0x8f, 0x9a, 0x9d, 0xaa, 0xb0 ),
2271  BIGINT ( 0xbc, 0xca, 0x45 ),
2272  BIGINT ( 0x9f, 0x5f, 0x7c, 0xac, 0x5e, 0xc7,
2273  0xf2, 0xc5, 0x72, 0x3d, 0xff, 0x29,
2274  0xd2, 0x25, 0xa9, 0x64, 0x5b, 0xbe,
2275  0x63, 0x63, 0xc6, 0x84, 0x20 ) );
2276  bigint_mod_exp_ok ( BIGINT ( 0xf8, 0xc9, 0xb9, 0x3d, 0xe1, 0xff,
2277  0xa6, 0x8e, 0xb0, 0xd2, 0xa9, 0xa9,
2278  0xc1, 0x5c, 0xc5, 0x94, 0x90, 0xb9,
2279  0xca, 0x2f, 0x1a, 0xbd, 0x21 ),
2280  BIGINT ( 0xa7, 0xf4, 0xb0, 0x3c, 0xf4, 0x2b,
2281  0x9d, 0x40, 0x5f, 0xfd, 0x2e, 0x28,
2282  0xa9, 0x23, 0x01, 0xaf, 0x0b, 0x73,
2283  0xaa, 0xcf, 0x14, 0xdc, 0xd8 ),
2284  BIGINT ( 0x31, 0xe2, 0xe8, 0xf0 ),
2285  BIGINT ( 0x53, 0x30, 0xc6, 0x10, 0x12, 0x7c,
2286  0xb3, 0x91, 0x15, 0x5f, 0x01, 0x62,
2287  0xec, 0x1f, 0x15, 0x61, 0x3b, 0x9a,
2288  0x76, 0x22, 0xf8, 0x31, 0xb1 ) );
2289  bigint_mod_exp_ok ( BIGINT ( 0xff, 0x8c, 0x04, 0x74, 0x3e, 0x93,
2290  0xfd, 0xce, 0xd5, 0x7f, 0xc5, 0x58,
2291  0xce, 0x00, 0x53, 0x44, 0x02, 0xf4,
2292  0xfd, 0x01, 0xc3, 0xb0, 0x3c ),
2293  BIGINT ( 0x2f, 0xbe, 0xb3, 0x2d, 0xd6, 0x59,
2294  0x69, 0x44, 0xc0, 0xd4, 0x27, 0x9c,
2295  0xff, 0x53, 0x9e, 0x66, 0x2c, 0x01,
2296  0x3a, 0x96, 0x5d, 0x75, 0xc1 ),
2297  BIGINT ( 0x47, 0x3e, 0xb2, 0x81, 0x51, 0x9a,
2298  0xdf, 0x75, 0xba, 0xa5, 0x19, 0xc1,
2299  0xc7, 0xcc, 0xae, 0x82, 0x9c, 0x3e,
2300  0xfd, 0x7f, 0xb0, 0xd7, 0x00 ),
2301  BIGINT ( 0x09, 0x9c, 0xd0, 0x49, 0x1d, 0x88,
2302  0xd8, 0x08, 0x45, 0x61, 0x71, 0xa1,
2303  0xb5, 0xab, 0xa9, 0x5b, 0xa8, 0xf1,
2304  0xc6, 0x53, 0x68, 0x8f, 0x3e ) );
2305  bigint_mod_exp_ok ( BIGINT ( 0xd8, 0x78, 0xad, 0x80, 0x81, 0xf1,
2306  0x84, 0x23, 0x82, 0x5d, 0x49, 0x46,
2307  0x75, 0xfd, 0xd1, 0x49, 0x53, 0x10,
2308  0x4d, 0x10, 0xab, 0x0f, 0xf0 ),
2309  BIGINT ( 0x78, 0x3d, 0x09, 0x1b, 0xea, 0xa4,
2310  0xb9, 0x13, 0xf8, 0xb5, 0xb5, 0x5e,
2311  0x69, 0xa4, 0xe1, 0xfd, 0x88, 0x58,
2312  0x26, 0xb3, 0x76, 0xa2, 0x38 ),
2313  BIGINT ( 0x3b, 0x12, 0xe0, 0x8e, 0xa2, 0x2f,
2314  0x2a, 0x2b, 0xb1, 0x78, 0xf9, 0xf6,
2315  0x93, 0x4d, 0x52, 0x82, 0x29, 0x2d,
2316  0xe4, 0x36, 0x92, 0x49, 0xc1, 0x25,
2317  0x6e, 0x26, 0xe6, 0x6e, 0xc2, 0x4d,
2318  0xea, 0x13, 0x86, 0x85, 0x71, 0x4d,
2319  0x85, 0x70, 0xf9, 0x2b, 0xa0, 0x0f,
2320  0x96, 0xe5, 0x63, 0x7a, 0xb4, 0x25,
2321  0x53, 0x1a, 0xd8, 0x30, 0x36, 0xba,
2322  0x6e, 0x2e, 0xce, 0x2d, 0x8f, 0x32,
2323  0xe9, 0xdc, 0x91, 0x9e, 0xd4, 0xf1,
2324  0x3b, 0x40, 0xc9, 0xf4, 0x97, 0x74,
2325  0x5e, 0x69, 0xcd, 0x34, 0x4a, 0x18,
2326  0x65, 0xe5, 0x07, 0xb5, 0x9e, 0x2a,
2327  0xc4, 0xeb, 0xb6, 0x96, 0x7b, 0x99,
2328  0x0c, 0xe4, 0xb3, 0x85, 0xff, 0x17,
2329  0x72, 0x5d, 0xf6, 0x30, 0xb4, 0xff,
2330  0x98, 0xe6, 0xf6, 0x31, 0x24, 0x82,
2331  0x91, 0xa6, 0x18, 0x6d, 0x0b, 0x84,
2332  0x6f, 0x5f, 0x64, 0xa3, 0xdf, 0x92,
2333  0x06, 0x16, 0xe3, 0x7c, 0x08, 0x61,
2334  0x77, 0xce ),
2335  BIGINT ( 0x17, 0xc9, 0xc5, 0x38, 0x4c, 0x15,
2336  0x0f, 0x4e, 0xc2, 0x90, 0x3b, 0x46,
2337  0x7b, 0x2f, 0x95, 0x82, 0xfe, 0x51,
2338  0x95, 0x2b, 0xff, 0xd5, 0x28 ) );
2339  bigint_mod_exp_ok ( BIGINT ( 0x69, 0xa3, 0x7e, 0x24, 0xdf, 0x9e,
2340  0x0b, 0x3e, 0x3f, 0x43, 0x06, 0x0e,
2341  0x1d, 0x57, 0x74, 0xe0, 0xa0, 0x5b,
2342  0x82, 0xca, 0xb0, 0x33, 0x8b, 0xe4,
2343  0x39, 0x27, 0x41, 0xd4, 0x2e, 0x30,
2344  0x3a, 0x0e, 0x62, 0x6f, 0xfa, 0xb4,
2345  0x02, 0x88, 0x70, 0x35, 0xa6, 0xea,
2346  0x7d, 0xb2, 0x87, 0xc3, 0xa5, 0x50,
2347  0x49, 0x38, 0xa4, 0x68, 0xa9, 0xe4,
2348  0xa6, 0xcc, 0xd7, 0x13, 0xb1, 0xd9,
2349  0x1c, 0x6a, 0x9a, 0xb8, 0x6c, 0x9b,
2350  0xff, 0xcd, 0x2c, 0xb3, 0xbd, 0xe2,
2351  0xfd, 0x1f, 0x08, 0xdd, 0xc6, 0xee,
2352  0x18, 0x0c, 0xa5, 0xcd, 0x09, 0x19,
2353  0x51, 0x51, 0xa5, 0x6f, 0x93, 0x1b,
2354  0x34, 0xfd, 0x8f, 0xd9, 0x87, 0xed,
2355  0x15, 0x7e, 0x36, 0x60, 0xdd, 0x1b,
2356  0xf4, 0xcc, 0xc4, 0x4c, 0x19, 0x2b,
2357  0xd6, 0x1e, 0xec, 0x51, 0xe9, 0x27,
2358  0xe9, 0xbd, 0x6a, 0x3f, 0x91, 0x45,
2359  0xc3, 0x6d, 0x40, 0x7e, 0x6c, 0x56,
2360  0x05, 0x5a ),
2361  BIGINT ( 0x5c, 0x96, 0x05, 0x81, 0x94, 0x45,
2362  0xcf, 0x47, 0x5f, 0x1b, 0xb0, 0xf9,
2363  0xef, 0x13, 0x8f, 0xcc, 0x71, 0xfd,
2364  0x50, 0xf1, 0xe7, 0x62, 0x6e, 0xfa,
2365  0x48, 0x66, 0x1c, 0xf7, 0xef, 0x09,
2366  0x12, 0xa2, 0xfd, 0x17, 0xb7, 0x6a,
2367  0x3b, 0xed, 0xf7, 0x86, 0xd2, 0xbe,
2368  0x95, 0x90, 0xc6, 0x00, 0x14, 0x8d,
2369  0xe3, 0x27, 0xbe, 0x03, 0x7c, 0x9e,
2370  0x6b, 0x51, 0x31, 0x8d, 0x18, 0xc4,
2371  0x16, 0xd2, 0x84, 0x63, 0x9b, 0xe9,
2372  0xa4, 0xf8, 0xff, 0x70, 0x4d, 0xeb,
2373  0x6f, 0x4a, 0xb7, 0x5b, 0x54, 0xf1,
2374  0xb5, 0xbe, 0x78, 0xb6, 0xfd, 0x8b,
2375  0xe1, 0x39, 0x62, 0x85, 0x9b, 0xde,
2376  0x30, 0xa8, 0xe4, 0x37, 0x52, 0x57,
2377  0x39, 0x79, 0xdb, 0x0b, 0x19, 0x6b,
2378  0xc9, 0x17, 0xfd, 0x8c, 0x2c, 0xaa,
2379  0xa4, 0xf1, 0x04, 0xd1, 0xd3, 0x2f,
2380  0xbb, 0x3a, 0x36, 0x82, 0x31, 0xa4,
2381  0x40, 0xd4, 0x87, 0x46, 0xe3, 0x6e,
2382  0xd0, 0x17 ),
2383  BIGINT ( 0x93 ),
2384  BIGINT ( 0x0d, 0x39, 0x92, 0x57, 0xaa, 0x6d,
2385  0xfc, 0x3b, 0x10, 0x18, 0x6d, 0x59,
2386  0xbe, 0x31, 0x8f, 0xee, 0xf9, 0x82,
2387  0x84, 0xe0, 0xdf, 0xa5, 0x00, 0x28,
2388  0xd1, 0x64, 0x6b, 0x4b, 0x43, 0x3b,
2389  0x76, 0x3e, 0x6b, 0xc4, 0xe4, 0xf5,
2390  0x0b, 0x59, 0x5a, 0xe4, 0x53, 0x5e,
2391  0x02, 0xd4, 0xde, 0x72, 0xd3, 0xa3,
2392  0x58, 0x66, 0xa7, 0xdd, 0x2b, 0x0b,
2393  0xa4, 0x83, 0xd0, 0xd9, 0xef, 0x29,
2394  0x3d, 0x2f, 0x97, 0xff, 0x9a, 0xc7,
2395  0xf6, 0x8a, 0x8d, 0x59, 0xef, 0x87,
2396  0xd1, 0xe6, 0xba, 0x4d, 0x99, 0xd9,
2397  0x5f, 0x5e, 0x7a, 0x7e, 0x67, 0x22,
2398  0x5b, 0x77, 0x83, 0xa2, 0x02, 0xfd,
2399  0xb2, 0xe4, 0xf6, 0x20, 0x4c, 0x12,
2400  0x20, 0xa7, 0xda, 0x5b, 0x3b, 0x8c,
2401  0xa2, 0xca, 0xda, 0x20, 0xaa, 0x27,
2402  0xe6, 0x54, 0x3e, 0xa8, 0x6f, 0x64,
2403  0x9d, 0xa7, 0x0d, 0x57, 0x1b, 0x21,
2404  0xff, 0xd2, 0xe2, 0xb2, 0x0a, 0x4f,
2405  0xb7, 0x0e ) );
2406  bigint_mod_exp_ok ( BIGINT ( 0x06, 0xcf, 0x54, 0xf2, 0x0d, 0x62,
2407  0x33, 0xdd, 0xe7, 0x4d, 0x7f, 0x2f,
2408  0x8e, 0x52, 0x73, 0xf4, 0x73, 0x68,
2409  0x4b, 0x13, 0x6e, 0x58, 0x6b, 0x4a,
2410  0xb8, 0x4c, 0xef, 0x73, 0xfe, 0x5f,
2411  0xf6, 0xd0, 0xbb, 0x82, 0x17, 0x3f,
2412  0x9d, 0x91, 0xf8, 0xa3, 0xb8, 0x79,
2413  0xef, 0x41, 0x38, 0xc1, 0xef, 0xc9,
2414  0xc6, 0xcf, 0x2a, 0xc3, 0xaa, 0x75,
2415  0x17, 0xda, 0xbc, 0x76, 0x29, 0x61,
2416  0x6d, 0x05, 0x79, 0x0b, 0x44, 0xb1,
2417  0x54, 0x75, 0xb7, 0xd9, 0xf6, 0xa8,
2418  0xbd, 0xf7, 0x85, 0xe0, 0xe7, 0x90,
2419  0x62, 0xce, 0x79, 0xfb, 0xc5, 0x23,
2420  0xa5, 0x09, 0xc0, 0xc4, 0x4d, 0xe7,
2421  0x9c, 0x49, 0x8f, 0x82, 0xf1, 0x31,
2422  0x34, 0x85, 0xdd, 0x3b, 0xbe, 0xe9,
2423  0x93, 0x19, 0x03, 0x75, 0x3f, 0xc4,
2424  0xa4, 0x0f, 0x52, 0x53, 0xc1, 0xcd,
2425  0x08, 0xb0, 0x05, 0x0c, 0xa2, 0x0c,
2426  0x3a, 0x72, 0xb2, 0x3c, 0xdb, 0x4f,
2427  0xac, 0xc6 ),
2428  BIGINT ( 0xe4, 0x40, 0xd8, 0x30, 0x00, 0xcf,
2429  0x4c, 0xfd, 0xda, 0xae, 0x90, 0xd3,
2430  0x5b, 0xc7, 0x20, 0xcc, 0x2b, 0xe2,
2431  0x0a, 0x39, 0x1e, 0xde, 0xef, 0x98,
2432  0x16, 0x3b, 0x9d, 0x36, 0x63, 0x0d,
2433  0x46, 0xed, 0x23, 0x6e, 0x38, 0xa8,
2434  0x15, 0xb5, 0xb1, 0xaf, 0x47, 0xb1,
2435  0xec, 0xaa, 0x8b, 0x57, 0xd6, 0xca,
2436  0x39, 0x2f, 0x62, 0xbd, 0xd5, 0xf8,
2437  0x98, 0x98, 0x5d, 0xfe, 0x14, 0xd6,
2438  0xdc, 0xe5, 0x98, 0x60, 0x5b, 0x16,
2439  0x92, 0xcb, 0xed, 0xb6, 0x9c, 0x5c,
2440  0x82, 0x40, 0x6b, 0xaa, 0x48, 0x7a,
2441  0xd4, 0xfe, 0xa3, 0xe7, 0x30, 0xf1,
2442  0x7c, 0xfb, 0x94, 0x2e, 0xeb, 0xb6,
2443  0x71, 0xe4, 0x33, 0x63, 0xc3, 0xb0,
2444  0x94, 0x6d, 0xee, 0xa5, 0x15, 0x3f,
2445  0x28, 0xf1, 0xfa, 0xdc, 0xf2, 0x13,
2446  0x0f, 0xc7, 0xd9, 0xe0, 0xbf, 0x1b,
2447  0x49, 0xee, 0x21, 0x8e, 0x26, 0xc9,
2448  0x28, 0x21, 0x86, 0x1d, 0x46, 0x33,
2449  0xd4, 0x69 ),
2450  BIGINT ( 0xd9, 0x87 ),
2451  BIGINT ( 0xdf, 0xff, 0xcc, 0xb7, 0xfe, 0x19,
2452  0x02, 0x92, 0x9d, 0xab, 0x33, 0xd2,
2453  0x21, 0xbc, 0xd3, 0xc4, 0x31, 0xad,
2454  0x4b, 0xb3, 0x16, 0x50, 0x96, 0xd9,
2455  0xdc, 0x88, 0x74, 0x60, 0xde, 0xdf,
2456  0xb7, 0x83, 0xdb, 0x22, 0xef, 0xcb,
2457  0xcb, 0xdb, 0x4c, 0xfb, 0x94, 0x4c,
2458  0x3f, 0xf5, 0xf5, 0x99, 0x85, 0x21,
2459  0x1a, 0x2b, 0xec, 0x90, 0x2d, 0xb4,
2460  0x20, 0x3c, 0x27, 0x9f, 0xe5, 0xb1,
2461  0x5c, 0x92, 0xfa, 0xb0, 0xa9, 0x8e,
2462  0x2c, 0x21, 0x8e, 0x8d, 0xe5, 0x55,
2463  0x84, 0x02, 0xa5, 0x15, 0x5c, 0x53,
2464  0x1f, 0x40, 0x81, 0x0a, 0x10, 0xde,
2465  0x21, 0x41, 0xa9, 0x97, 0xf8, 0x6f,
2466  0xbf, 0x42, 0x58, 0x9e, 0xc6, 0xdd,
2467  0x10, 0x33, 0x3f, 0xad, 0xe6, 0x8e,
2468  0x57, 0x27, 0x37, 0x20, 0xa4, 0x86,
2469  0xef, 0x39, 0x7b, 0x6f, 0x78, 0x77,
2470  0xab, 0xa0, 0x62, 0xe1, 0xfd, 0x9c,
2471  0xbe, 0xfa, 0x98, 0x2e, 0x29, 0xe3,
2472  0xeb, 0x52 ) );
2473  bigint_mod_exp_ok ( BIGINT ( 0x00, 0x91, 0xb3, 0x87, 0xe6, 0x01,
2474  0x57, 0xe9, 0x68, 0xa4, 0xf4, 0x9b,
2475  0xea, 0x6a, 0x8a, 0x9e, 0x1a, 0x8b,
2476  0xd3, 0x85, 0x9d, 0xba, 0x85, 0xab,
2477  0xd8, 0xcd, 0x25, 0x56, 0x8e, 0x85,
2478  0x8a, 0x8e, 0x48, 0x9e, 0xb4, 0x90,
2479  0xc8, 0x2e, 0x07, 0x78, 0x80, 0x49,
2480  0xa0, 0xb7, 0x95, 0x6a, 0xd8, 0xad,
2481  0xb5, 0xda, 0x5d, 0xe6, 0x11, 0x87,
2482  0xb8, 0x33, 0x8f, 0xa8, 0x6f, 0x4e,
2483  0xc6, 0xc3, 0x0d, 0xf5, 0xa9, 0x4e,
2484  0xb2, 0x42, 0x53, 0x81, 0xcd, 0x33,
2485  0x83, 0x49, 0xab, 0x0d, 0x0e, 0xf5,
2486  0x2c, 0xcd, 0x84, 0x58, 0xf3, 0x30,
2487  0xa3, 0x6e, 0x3c, 0x3a, 0xc6, 0x77,
2488  0x43, 0xb0, 0xe7, 0x4b, 0x66, 0x30,
2489  0xe9, 0x48, 0x0b, 0x0d, 0x86, 0x3f,
2490  0xd8, 0xe2, 0xb5, 0x88, 0xc1, 0x44,
2491  0xb2, 0x6b, 0xb0, 0x7a, 0x35, 0x3b,
2492  0x56, 0x83, 0xb1, 0xac, 0x9e, 0xeb,
2493  0x9b, 0x08, 0x43, 0xac, 0x0a, 0x3a,
2494  0x31, 0x69 ),
2495  BIGINT ( 0x96, 0x6f, 0xb0, 0xa7, 0x02, 0xb5,
2496  0xd9, 0x19, 0xbe, 0x4b, 0x27, 0x65,
2497  0x5b, 0x96, 0xd4, 0x0b, 0x49, 0x70,
2498  0xf0, 0x09, 0x8e, 0xf2, 0x04, 0x85,
2499  0x93, 0xe9, 0x2e, 0x09, 0x31, 0x76,
2500  0x8b, 0xbb, 0xe9, 0xe1, 0x2b, 0x4f,
2501  0xed, 0x83, 0xa6, 0x87, 0xa3, 0x07,
2502  0x0a, 0x3d, 0x1c, 0x65, 0x14, 0x5a,
2503  0xd5, 0xc0, 0x5d, 0x3c, 0x31, 0x9a,
2504  0x83, 0xad, 0xca, 0x6a, 0x93, 0x0d,
2505  0x1a, 0x67, 0x4e, 0x68, 0x06, 0x64,
2506  0x53, 0x2e, 0x15, 0xd9, 0xdd, 0x5e,
2507  0xcb, 0xb7, 0x2e, 0xef, 0xd3, 0xbb,
2508  0x5f, 0xaf, 0xef, 0x9e, 0xf2, 0x7b,
2509  0x69, 0x15, 0xb0, 0x18, 0x6c, 0x67,
2510  0x10, 0xda, 0x33, 0x07, 0x48, 0x97,
2511  0x31, 0xb3, 0x3d, 0x3d, 0xc9, 0x2e,
2512  0x0b, 0x68, 0x91, 0x3f, 0x6a, 0x3b,
2513  0x1a, 0xdf, 0xa8, 0x69, 0x46, 0x1c,
2514  0xb2, 0x69, 0x08, 0x0b, 0x02, 0x1b,
2515  0x03, 0x64, 0xae, 0xb6, 0x2d, 0xc6,
2516  0xc4, 0x0a ),
2517  BIGINT ( 0x6d, 0x3f, 0xdd ),
2518  BIGINT ( 0x40, 0x6e, 0x9d, 0x3e, 0xeb, 0xa4,
2519  0xb1, 0x8d, 0xb7, 0xb4, 0x0f, 0x5b,
2520  0x12, 0xad, 0x27, 0x9e, 0xbd, 0xe7,
2521  0xe5, 0x9d, 0xec, 0xb4, 0xac, 0x23,
2522  0x5f, 0xa9, 0xec, 0x9c, 0xd1, 0x6a,
2523  0xbe, 0x99, 0xba, 0xb3, 0x66, 0x0e,
2524  0x17, 0xaa, 0x13, 0xa2, 0x2e, 0x01,
2525  0x28, 0xb1, 0x6c, 0xba, 0xad, 0x68,
2526  0x48, 0xf0, 0xf3, 0x4c, 0x08, 0x9f,
2527  0xd1, 0x9c, 0xb7, 0x75, 0xc5, 0xb6,
2528  0x5a, 0x05, 0xb0, 0x14, 0xd4, 0x61,
2529  0xea, 0x18, 0x9f, 0xe6, 0xe5, 0xe3,
2530  0xd4, 0xff, 0x35, 0x43, 0x0b, 0xb8,
2531  0xf6, 0xe9, 0x19, 0x7a, 0x88, 0xa7,
2532  0x4d, 0x01, 0x92, 0x05, 0xd2, 0x6e,
2533  0xa3, 0xc1, 0xb6, 0x66, 0x75, 0xb1,
2534  0x00, 0x0d, 0x42, 0x37, 0xcc, 0xca,
2535  0xc0, 0x8d, 0xc8, 0x7e, 0x5c, 0xc9,
2536  0x53, 0x81, 0x2f, 0xc4, 0x61, 0xb6,
2537  0x96, 0x3b, 0xa5, 0x04, 0x14, 0x1b,
2538  0xa7, 0x77, 0xa1, 0xbc, 0x73, 0x1d,
2539  0xad, 0xed ) );
2540  bigint_mod_exp_ok ( BIGINT ( 0x45, 0xfb, 0xf3, 0xdc, 0x31, 0xe5,
2541  0x56, 0x7a, 0xee, 0x15, 0xfb, 0x16,
2542  0xee, 0x6e, 0x90, 0x3e, 0xa3, 0x89,
2543  0xc2, 0x6d, 0x9b, 0x06, 0x65, 0xd0,
2544  0xcd, 0xa2, 0xcc, 0x01, 0x60, 0x0d,
2545  0xd1, 0xdd, 0x68, 0x14, 0xc2, 0xcd,
2546  0xd8, 0x79, 0x75, 0xad, 0x0a, 0x9f,
2547  0x39, 0x5f, 0x52, 0x4b, 0x58, 0x31,
2548  0x48, 0xbb, 0x2a, 0xcc, 0xe0, 0x42,
2549  0x18, 0x32, 0xdc, 0x63, 0x14, 0x11,
2550  0x4e, 0xab, 0x96, 0x29, 0xc5, 0x06,
2551  0x79, 0xe5, 0x06, 0xf7, 0x59, 0xdb,
2552  0x1e, 0x51, 0xfd, 0xc4, 0x48, 0x3a,
2553  0x4c, 0x7f, 0xd0, 0xe2, 0x36, 0x86,
2554  0xc1, 0x8b, 0xc5, 0x86, 0x52, 0xe0,
2555  0xdb, 0x92, 0x5f, 0x0e, 0x19, 0xb1,
2556  0xa3, 0x23, 0xdd, 0xf0, 0x78, 0xcc,
2557  0x81, 0x3f, 0x4a, 0xe6, 0xb0, 0x32,
2558  0xd1, 0x5c, 0x5e, 0x3a, 0xb0, 0xd8,
2559  0xe2, 0x04, 0xc0, 0x30, 0x85, 0x1d,
2560  0x5e, 0x28, 0xee, 0xd9, 0xb3, 0x83,
2561  0x9f, 0xe2 ),
2562  BIGINT ( 0xb3, 0x2c, 0x2e, 0xc5, 0xba, 0xf8,
2563  0x41, 0x98, 0x79, 0x7e, 0xaa, 0x0c,
2564  0x2a, 0x8f, 0xd9, 0x56, 0x55, 0xaa,
2565  0x74, 0x60, 0x74, 0xd1, 0x49, 0x2c,
2566  0x6f, 0x0a, 0x4e, 0xf8, 0x3f, 0x1b,
2567  0x73, 0x4c, 0xe0, 0x17, 0x37, 0x06,
2568  0x76, 0x73, 0xd5, 0x2d, 0x4d, 0x3f,
2569  0xb0, 0x15, 0x7e, 0x98, 0xd0, 0xdf,
2570  0xf0, 0x33, 0x78, 0xe2, 0xe6, 0xec,
2571  0x21, 0x22, 0xad, 0xd5, 0xab, 0x2d,
2572  0x0d, 0x59, 0x95, 0x05, 0x34, 0x1f,
2573  0x51, 0xf5, 0xec, 0x93, 0x05, 0x15,
2574  0x37, 0xcf, 0x93, 0x03, 0xd7, 0xf6,
2575  0x35, 0x23, 0x8f, 0x33, 0xf6, 0xba,
2576  0x42, 0xc8, 0x52, 0x94, 0xd3, 0x33,
2577  0x3e, 0x39, 0x01, 0xd1, 0x55, 0x3f,
2578  0x48, 0x84, 0xe9, 0xbc, 0x0b, 0x0f,
2579  0xc9, 0x69, 0x41, 0x2c, 0x5f, 0x34,
2580  0xd0, 0xe6, 0x15, 0x50, 0x06, 0x64,
2581  0x5b, 0x8b, 0x71, 0x22, 0xb3, 0x3e,
2582  0x09, 0x9c, 0x76, 0x13, 0x9b, 0x29,
2583  0x57, 0x94 ),
2584  BIGINT ( 0xca, 0x94, 0xf7, 0xca ),
2585  BIGINT ( 0x83, 0x68, 0xb9, 0xe7, 0x91, 0xf3,
2586  0x3b, 0x5a, 0x0b, 0xb6, 0x1e, 0x2f,
2587  0x3f, 0x5f, 0xdc, 0x96, 0x5b, 0x7f,
2588  0x8d, 0xc5, 0x8e, 0xda, 0x6e, 0x21,
2589  0xe3, 0x20, 0xea, 0x37, 0x39, 0x3b,
2590  0xb4, 0xd7, 0xf6, 0xba, 0x61, 0xfe,
2591  0xdc, 0x7e, 0x82, 0x9a, 0x38, 0x7b,
2592  0xd5, 0xb1, 0x11, 0x98, 0xc4, 0x88,
2593  0x0b, 0x01, 0x7d, 0x81, 0xc9, 0x64,
2594  0x23, 0xc3, 0x3e, 0xf3, 0x67, 0x95,
2595  0x78, 0xca, 0xda, 0x52, 0xaf, 0x72,
2596  0x25, 0xd9, 0xf0, 0x27, 0xd3, 0x1c,
2597  0xfb, 0xad, 0xa1, 0xa7, 0x06, 0x2f,
2598  0xaa, 0x2f, 0x86, 0x5c, 0x8b, 0x30,
2599  0xe1, 0xda, 0x5a, 0x36, 0xf9, 0xfd,
2600  0xbf, 0xfe, 0x0d, 0x03, 0xf8, 0x9c,
2601  0x6b, 0x9b, 0xe5, 0x70, 0x6d, 0x75,
2602  0xd7, 0x54, 0x28, 0x43, 0x34, 0x69,
2603  0x98, 0x11, 0x29, 0xee, 0x50, 0x06,
2604  0xa4, 0xc4, 0x11, 0x6d, 0x60, 0x8c,
2605  0xcd, 0xd1, 0x88, 0xe9, 0x6b, 0xbb,
2606  0xc1, 0xd4 ) );
2607  bigint_mod_exp_ok ( BIGINT ( 0xa1, 0x01, 0x7e, 0xb4, 0x0e, 0x66,
2608  0xa5, 0x07, 0x8b, 0x10, 0x84, 0x0d,
2609  0x30, 0x0a, 0xa4, 0x2d, 0x10, 0x2c,
2610  0xd4, 0x9a, 0x27, 0xf1, 0x02, 0x8c,
2611  0x38, 0x18, 0x7f, 0x7f, 0x95, 0x65,
2612  0xf1, 0xa9, 0x3b, 0x7d, 0x1f, 0x4f,
2613  0x88, 0xb0, 0x65, 0x62, 0x63, 0x63,
2614  0xaa, 0x82, 0xfc, 0x83, 0x3a, 0x3a,
2615  0x46, 0x59, 0x6a, 0x89, 0xec, 0xa9,
2616  0xb0, 0x4c, 0x5e, 0xbe, 0x46, 0x98,
2617  0xd0, 0xd4, 0xb7, 0xe3, 0x1b, 0x30,
2618  0x0b, 0xfb, 0xbb, 0x4f, 0x0b, 0xd3,
2619  0xe4, 0xa0, 0x80, 0x54, 0xcb, 0x52,
2620  0x0a, 0xe8, 0x03, 0x75, 0x8e, 0x96,
2621  0xa4, 0x21, 0xaa, 0xbd, 0x7a, 0xfd,
2622  0xfa, 0xf8, 0xaf, 0x42, 0xf6, 0x61,
2623  0xd2, 0x93, 0xce, 0x66, 0x67, 0xe9,
2624  0x02, 0xda, 0x81, 0x0b, 0xb0, 0x1e,
2625  0x9e, 0x27, 0x57, 0x98, 0x18, 0x88,
2626  0x35, 0x49, 0xc0, 0x88, 0x88, 0x59,
2627  0xae, 0x2f, 0x66, 0x59, 0x31, 0x87,
2628  0x88, 0xda ),
2629  BIGINT ( 0xfe, 0x21, 0x7c, 0xf4, 0xbe, 0xae,
2630  0x65, 0xda, 0x89, 0xd2, 0x26, 0xd6,
2631  0x9c, 0x65, 0xc6, 0xb6, 0xb4, 0x0a,
2632  0x84, 0x11, 0xe1, 0xe8, 0xba, 0xd8,
2633  0x16, 0xcf, 0x60, 0x6c, 0x83, 0xa5,
2634  0x4a, 0xbf, 0xa2, 0x24, 0x0b, 0x66,
2635  0xda, 0xe2, 0x4e, 0x2d, 0xe5, 0x9e,
2636  0xbf, 0xad, 0x5c, 0xa3, 0x1e, 0x5c,
2637  0xbd, 0xe2, 0x5b, 0x46, 0xcf, 0xcc,
2638  0xd5, 0xc9, 0x13, 0x95, 0xc3, 0xdb,
2639  0x64, 0xbf, 0xeb, 0x31, 0xa9, 0x8a,
2640  0x3b, 0xd2, 0x5d, 0x3b, 0x2e, 0xdc,
2641  0x0c, 0xca, 0xab, 0xde, 0x92, 0xae,
2642  0x45, 0x35, 0x96, 0xb0, 0xb7, 0xb9,
2643  0xe6, 0xfe, 0x28, 0x0d, 0x10, 0x72,
2644  0x53, 0x8e, 0x21, 0xc0, 0x33, 0x79,
2645  0x01, 0x43, 0x8d, 0x77, 0xc4, 0xaa,
2646  0xcf, 0x7f, 0xc3, 0xd1, 0xf5, 0xfd,
2647  0x79, 0x81, 0xf6, 0x2e, 0xb7, 0xeb,
2648  0x55, 0x5f, 0x74, 0xf0, 0x3a, 0xb9,
2649  0x57, 0x07, 0x09, 0x97, 0xa5, 0x4c,
2650  0x4a, 0x85 ),
2651  BIGINT ( 0xd9, 0xb7, 0xb2, 0xd6, 0xeb, 0xf3,
2652  0x66, 0xbe, 0x15, 0x64, 0xad, 0x2e,
2653  0x9e, 0xc6, 0xaf, 0x5e, 0xaf, 0x40,
2654  0x1e, 0x90, 0x82, 0x2f, 0x98 ),
2655  BIGINT ( 0x12, 0x48, 0x31, 0x7f, 0x09, 0xbb,
2656  0x8f, 0xd9, 0x02, 0x7e, 0x4a, 0xd0,
2657  0x2f, 0x42, 0x7c, 0x17, 0x6e, 0x83,
2658  0x74, 0x21, 0x95, 0x47, 0x7d, 0x93,
2659  0x4a, 0xce, 0x34, 0x7c, 0xde, 0xc7,
2660  0x8f, 0xf6, 0x28, 0x97, 0xba, 0x81,
2661  0x9b, 0xcc, 0x54, 0x14, 0x7f, 0xd3,
2662  0x93, 0x66, 0x41, 0x8c, 0x0e, 0x47,
2663  0xee, 0xc5, 0x5e, 0xd6, 0x5f, 0x01,
2664  0x62, 0x97, 0xf1, 0x2b, 0xee, 0x60,
2665  0x5e, 0x82, 0x2c, 0x7b, 0x0a, 0xf2,
2666  0xc3, 0x23, 0xbf, 0xb9, 0x83, 0xf7,
2667  0x97, 0xf5, 0xca, 0x58, 0xd7, 0xf0,
2668  0x87, 0x7b, 0xcb, 0x87, 0x69, 0x42,
2669  0xbc, 0x05, 0xc4, 0xad, 0xbd, 0x82,
2670  0xcf, 0x44, 0x16, 0x4f, 0x46, 0xe0,
2671  0xde, 0x2f, 0xfa, 0x77, 0xec, 0xa4,
2672  0x23, 0x7d, 0x47, 0x3e, 0x94, 0x19,
2673  0x8b, 0xb8, 0x84, 0x81, 0x80, 0x6c,
2674  0x1e, 0x31, 0xa3, 0x6d, 0x14, 0x94,
2675  0x57, 0x28, 0x99, 0x08, 0x0a, 0xa7,
2676  0x98, 0x4b ) );
2677  bigint_mod_exp_ok ( BIGINT ( 0xda, 0x52, 0xfd, 0x44, 0x5d, 0x11,
2678  0x60, 0x6c, 0xec, 0x87, 0xbf, 0x19,
2679  0xb8, 0x46, 0xaa, 0x41, 0xfc, 0x10,
2680  0xae, 0x47, 0xd6, 0x72, 0x42, 0x57,
2681  0xc3, 0x05, 0xca, 0xe3, 0x59, 0x94,
2682  0x82, 0x7c, 0xa1, 0xe0, 0xd2, 0x6b,
2683  0x77, 0x71, 0x42, 0xa1, 0xf7, 0x84,
2684  0xae, 0xf4, 0x6f, 0x44, 0x0d, 0x88,
2685  0xa2, 0xc5, 0x45, 0x9b, 0x49, 0x36,
2686  0xd4, 0x20, 0x3a, 0x7c, 0x92, 0xdb,
2687  0x65, 0xd9, 0x20, 0xd6, 0x71, 0x22,
2688  0x90, 0x70, 0xbf, 0xf3, 0x17, 0xe8,
2689  0x2c, 0x10, 0xe9, 0x4c, 0x02, 0x69,
2690  0x37, 0xa2, 0x91, 0x04, 0x46, 0x11,
2691  0xdc, 0xab, 0x5b, 0x1e, 0x3e, 0x31,
2692  0xd8, 0x69, 0xf8, 0x48, 0x84, 0x1f,
2693  0x56, 0x46, 0xf1, 0xc0, 0x14, 0x3f,
2694  0xcc, 0x5d, 0xe2, 0xf7, 0x8b, 0xa4,
2695  0x9e, 0x94, 0x32, 0xaa, 0x3c, 0x5e,
2696  0x21, 0x70, 0x00, 0x24, 0x2a, 0x1b,
2697  0xec, 0x25, 0xb1, 0xb6, 0x83, 0x36,
2698  0x5a, 0x95 ),
2699  BIGINT ( 0x5e, 0xdc, 0x71, 0x1f, 0x5b, 0x55,
2700  0xaa, 0xda, 0x56, 0xf5, 0x93, 0x9b,
2701  0xe8, 0xfc, 0x6a, 0x80, 0xe1, 0xe3,
2702  0x93, 0xe4, 0xc0, 0x58, 0x6f, 0x22,
2703  0xce, 0x9d, 0x6f, 0x84, 0x4c, 0xd4,
2704  0x12, 0x44, 0x57, 0x25, 0xca, 0xe5,
2705  0x2b, 0x7c, 0x35, 0x88, 0xc7, 0x38,
2706  0x25, 0x20, 0x9b, 0x57, 0xf2, 0xf2,
2707  0x6c, 0x28, 0x47, 0x9c, 0x3f, 0x91,
2708  0x1e, 0x3f, 0xe9, 0xeb, 0x50, 0xd6,
2709  0xa7, 0x22, 0x88, 0x6c, 0x71, 0xe5,
2710  0x62, 0x2a, 0xb7, 0xce, 0xbe, 0xf7,
2711  0x1a, 0x8c, 0x52, 0xa6, 0xff, 0xb8,
2712  0x34, 0x83, 0x7e, 0x04, 0xa8, 0x9c,
2713  0xa8, 0xa7, 0xd1, 0x05, 0x8e, 0x13,
2714  0x03, 0xe0, 0x49, 0xd8, 0x4a, 0xc4,
2715  0x4d, 0x38, 0x21, 0x5b, 0x62, 0xc2,
2716  0x38, 0x23, 0x7c, 0x9e, 0xf1, 0xe9,
2717  0xb6, 0x9a, 0x75, 0x42, 0x14, 0x99,
2718  0x63, 0x36, 0x13, 0x4c, 0x2d, 0x3a,
2719  0x77, 0xd4, 0x74, 0xb7, 0x30, 0xb2,
2720  0x00, 0x0f ),
2721  BIGINT ( 0xe3, 0xe5, 0x3b, 0xb5, 0x92, 0x5a,
2722  0xc6, 0xfa, 0x8f, 0xe8, 0x00, 0xb9,
2723  0x5c, 0xa0, 0xb6, 0x3e, 0x5e, 0x14,
2724  0x12, 0xa9, 0xdd, 0x2a, 0x3d, 0x4d,
2725  0xa3, 0x91, 0x6a, 0x56, 0x99, 0xc2,
2726  0x6c, 0x8e, 0xda, 0xb0, 0x5a, 0x2a,
2727  0x37, 0x55, 0x8b, 0xd3, 0x9b, 0xb6,
2728  0x1d, 0x49, 0x7d, 0x81, 0x76, 0x1c,
2729  0x2e, 0xb9, 0x92, 0x6d, 0xfa, 0x54,
2730  0x53, 0xfc, 0x74, 0x9b, 0x6b, 0x63,
2731  0x95, 0x1a, 0x89, 0xcc, 0xbd, 0x36,
2732  0xc5, 0x31, 0x7f, 0xf5, 0x31, 0x69,
2733  0x40, 0xd5, 0x7b, 0x94, 0x5d, 0xa9,
2734  0xd1, 0x34, 0x95, 0xa1, 0x8b, 0xa5,
2735  0xb5, 0x83, 0xda, 0xb5, 0x9d, 0x5b,
2736  0x74, 0x41, 0xad, 0x81, 0x45, 0x40,
2737  0x9b, 0xc3, 0xe8, 0xfe, 0x47, 0xdc,
2738  0xb0, 0xc3, 0x34, 0x5d, 0xf6, 0x3c,
2739  0x1d, 0x07, 0x76, 0xd9, 0x25, 0xca,
2740  0xa2, 0x39, 0x6c, 0xa8, 0xae, 0x30,
2741  0x4a, 0xde, 0xfb, 0xeb, 0x19, 0x80,
2742  0x5e, 0x49 ),
2743  BIGINT ( 0x4b, 0x0e, 0x74, 0xb8, 0xa7, 0x92,
2744  0x74, 0xd9, 0x50, 0xf6, 0x1b, 0x67,
2745  0x76, 0x76, 0x56, 0x6c, 0x09, 0x9c,
2746  0x01, 0xda, 0xaf, 0xa3, 0xca, 0xb2,
2747  0x12, 0x85, 0x52, 0x24, 0xe9, 0x7e,
2748  0x2b, 0xf2, 0x6e, 0xe9, 0x1a, 0x10,
2749  0x5d, 0xa0, 0x25, 0x46, 0x8f, 0x2a,
2750  0x95, 0x62, 0x50, 0xb6, 0x66, 0x43,
2751  0x37, 0x8b, 0xcb, 0x05, 0xf8, 0x61,
2752  0x59, 0xf9, 0xdd, 0xd2, 0x68, 0x72,
2753  0xfa, 0x88, 0x13, 0x36, 0xd8, 0x24,
2754  0x73, 0xec, 0x47, 0x44, 0xdd, 0x45,
2755  0x8a, 0x59, 0xd2, 0xbd, 0x43, 0xe3,
2756  0x05, 0x16, 0xd5, 0x9b, 0x1c, 0x8a,
2757  0x4b, 0x07, 0xda, 0x58, 0x0d, 0x4a,
2758  0x4e, 0xe7, 0x15, 0xfc, 0xbd, 0x95,
2759  0xf7, 0x18, 0xa5, 0xa7, 0x93, 0xff,
2760  0xf8, 0x1f, 0xd4, 0x6b, 0x07, 0xc6,
2761  0x5d, 0x90, 0x73, 0x57, 0x57, 0x37,
2762  0xfa, 0x83, 0xd4, 0x7c, 0xe9, 0x77,
2763  0x46, 0x91, 0x3a, 0x50, 0x0d, 0x6a,
2764  0x25, 0xd0 ) );
2765  bigint_mod_exp_ok ( BIGINT ( 0x5b, 0x80, 0xc5, 0x03, 0xb3, 0x1e,
2766  0x46, 0x9b, 0xa3, 0x0a, 0x70, 0x43,
2767  0x51, 0x2a, 0x4a, 0x44, 0xcb, 0x87,
2768  0x3e, 0x00, 0x2a, 0x48, 0x46, 0xf5,
2769  0xb3, 0xb9, 0x73, 0xa7, 0x77, 0xfc,
2770  0x2a, 0x1d ),
2771  BIGINT ( 0x5e, 0x8c, 0x80, 0x03, 0xe7, 0xb0,
2772  0x45, 0x23, 0x8f, 0xe0, 0x77, 0x02,
2773  0xc0, 0x7e, 0xfb, 0xc4, 0xbe, 0x7b,
2774  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2775  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2776  0x00, 0x00 ),
2777  BIGINT ( 0x71, 0xd9, 0x38, 0xb6 ),
2778  BIGINT ( 0x52, 0xfc, 0x73, 0x55, 0x2f, 0x86,
2779  0x0f, 0xde, 0x04, 0xbc, 0x6d, 0xb8,
2780  0xfd, 0x48, 0xf8, 0x8c, 0x91, 0x1c,
2781  0xa0, 0x8a, 0x70, 0xa8, 0xc6, 0x20,
2782  0x0a, 0x0d, 0x3b, 0x2a, 0x92, 0x65,
2783  0x9c, 0x59 ) );
2784 }
#define BIGINT(...)
Define inline big integer.
Definition: bigint_test.c:41
#define bigint_is_zero_ok(value, expected)
Definition: bigint_test.c:450
#define bigint_is_geq_ok(value, reference, expected)
Definition: bigint_test.c:486
#define bigint_mod_invert_ok(invertend, expected)
Definition: bigint_test.c:722
#define bigint_add_ok(addend, value, expected, overflow)
Definition: bigint_test.c:286
#define bigint_subtract_ok(subtrahend, value, expected, underflow)
Definition: bigint_test.c:335
#define bigint_reduce_ok(modulus, expected)
Definition: bigint_test.c:683
#define bigint_shr_ok(value, expected, bit)
Definition: bigint_test.c:419
#define bigint_max_set_bit_ok(value, expected)
Definition: bigint_test.c:547
#define bigint_bit_is_set_ok(value, bit, expected)
Definition: bigint_test.c:519
#define bigint_multiply_ok(multiplicand, multiplier, expected)
Definition: bigint_test.c:639
#define bigint_swap_ok(first, second)
Definition: bigint_test.c:591
#define bigint_mod_exp_ok(base, modulus, exponent, expected)
Definition: bigint_test.c:821
#define bigint_shl_ok(value, expected, bit)
Definition: bigint_test.c:381
#define bigint_montgomery_ok(modulus, mont, expected)
Definition: bigint_test.c:765

References BIGINT, bigint_add_ok, bigint_bit_is_set_ok, bigint_is_geq_ok, bigint_is_zero_ok, bigint_max_set_bit_ok, bigint_mod_exp_ok, bigint_mod_invert_ok, bigint_montgomery_ok, bigint_multiply_ok, bigint_reduce_ok, bigint_shl_ok, bigint_shr_ok, bigint_subtract_ok, and bigint_swap_ok.

Variable Documentation

◆ __self_test

struct self_test bigint_test __self_test
Initial value:
= {
.name = "bigint",
}
static void bigint_test_exec(void)
Perform big integer self-tests.
Definition: bigint_test.c:842

Big integer self-test.

Definition at line 2787 of file bigint_test.c.