This repository is a C implementation of a software-based Big Unsigned Integer Library. The specific interface can be found below. Numbers are represented as pointers to 32-bit unsigned integers. We use a base of 2^32 for each digit. Below is an example of such a number in C
uint32_t x[] = { 0x12345678, 0x12345678 } = 1,311,768,465,173,141,112
The following contains a list of all the Big Integer methods included in big-uint.h
.
- big_uint_equals
- big_uint_cmp
- big_uint_max
- big_uint_min
- big_uint_cpy
- big_uint_swap
- big_uint_sprint
- big_uint_print
- big_uint_shl
- big_uint_shl2
- big_uint_shr
- big_uint_shr2
- big_uint_or
- big_uint_and
- big_uint_xor
- big_uint_add
- big_uint_sub
- big_uint_mult
- big_uint_div
- big_uint_gcd
- big_uint_gcd_extended
Additionally, we have added the following modular arithmetic functions in mod.h
:
- mod_init
- mod_big_uint
- mod_add
- mod_sub
- mod_mult
- mod_exp