#include <stdint.h>
#include <assert.h>
Go to the source code of this file.
|
_MIASM_EXPORT bn_t | bignum_init (void) |
|
_MIASM_EXPORT bn_t | bignum_from_int (DTYPE_TMP i) |
|
_MIASM_EXPORT bn_t | bignum_from_uint64 (uint64_t i) |
|
_MIASM_EXPORT int | bignum_to_int (bn_t n) |
|
_MIASM_EXPORT uint64_t | bignum_to_uint64 (bn_t n) |
|
_MIASM_EXPORT bn_t | bignum_from_string (char *str, int nbytes) |
|
_MIASM_EXPORT void | bignum_to_string (bn_t n, char *str, int maxsize) |
|
_MIASM_EXPORT bn_t | bignum_add (bn_t a, bn_t b) |
|
_MIASM_EXPORT bn_t | bignum_sub (bn_t a, bn_t b) |
|
_MIASM_EXPORT bn_t | bignum_mul (bn_t a, bn_t b) |
|
_MIASM_EXPORT bn_t | bignum_udiv (bn_t a, bn_t b) |
|
_MIASM_EXPORT bn_t | bignum_umod (bn_t a, bn_t b) |
|
_MIASM_EXPORT bn_t | bignum_sdiv (bn_t a, bn_t b, int size) |
|
_MIASM_EXPORT bn_t | bignum_smod (bn_t a, bn_t b, int size) |
|
_MIASM_EXPORT bn_t | bignum_and (bn_t a, bn_t b) |
|
_MIASM_EXPORT bn_t | bignum_or (bn_t a, bn_t b) |
|
_MIASM_EXPORT bn_t | bignum_xor (bn_t a, bn_t b) |
|
_MIASM_EXPORT bn_t | bignum_lshift (bn_t a, int nbits) |
|
_MIASM_EXPORT bn_t | bignum_rshift (bn_t a, int nbits) |
|
_MIASM_EXPORT bn_t | bignum_a_rshift (bn_t a, int size, int nbits) |
|
_MIASM_EXPORT bn_t | bignum_not (bn_t a) |
|
_MIASM_EXPORT int | bignum_cmp (bn_t a, bn_t b) |
|
_MIASM_EXPORT int | bignum_is_equal (bn_t a, bn_t b) |
|
_MIASM_EXPORT int | bignum_is_inf_unsigned (bn_t a, bn_t b) |
|
_MIASM_EXPORT int | bignum_is_inf_equal_unsigned (bn_t a, bn_t b) |
|
_MIASM_EXPORT int | bignum_is_inf_signed (bn_t a, bn_t b) |
|
_MIASM_EXPORT int | bignum_is_inf_equal_signed (bn_t a, bn_t b) |
|
_MIASM_EXPORT int | bignum_is_zero (bn_t n) |
|
_MIASM_EXPORT bn_t | bignum_inc (bn_t n) |
|
_MIASM_EXPORT bn_t | bignum_dec (bn_t n) |
|
_MIASM_EXPORT int | bignum_cntleadzeros (bn_t n, int size) |
|
_MIASM_EXPORT int | bignum_cnttrailzeros (bn_t n, int size) |
|
_MIASM_EXPORT bn_t | bignum_assign (bn_t src) |
|
_MIASM_EXPORT bn_t | bignum_mask (bn_t src, int bits) |
|
_MIASM_EXPORT bn_t | bignum_rol (bn_t a, int size, int nbits) |
|
_MIASM_EXPORT bn_t | bignum_ror (bn_t a, int size, int nbits) |
|
_MIASM_EXPORT int | bignum_getbit (bn_t a, int pos) |
|
◆ _MIASM_EXPORT
◆ BN_ARRAY_SIZE
◆ BN_BIT_SIZE
◆ BN_BYTE_SIZE
◆ DTYPE
◆ DTYPE_MSB
◆ DTYPE_SIGNED
#define DTYPE_SIGNED int32_t |
◆ DTYPE_TMP
#define DTYPE_TMP uint64_t |
◆ MAX_VAL
◆ require
#define require |
( |
|
p, |
|
|
|
msg |
|
) |
| assert(p && #msg) |
◆ SPRINTF_FORMAT_STR
#define SPRINTF_FORMAT_STR "%.08x" |
◆ SSCANF_FORMAT_STR
#define SSCANF_FORMAT_STR "%8x" |
◆ WORD_SIZE
◆ bn_t
◆ anonymous enum
Enumerator |
---|
SMALLER | |
EQUAL | |
LARGER | |
◆ bignum_a_rshift()
◆ bignum_add()
◆ bignum_and()
◆ bignum_assign()
◆ bignum_cmp()
◆ bignum_cntleadzeros()
◆ bignum_cnttrailzeros()
◆ bignum_dec()
◆ bignum_from_int()
◆ bignum_from_string()
◆ bignum_from_uint64()
◆ bignum_getbit()
◆ bignum_inc()
◆ bignum_init()
◆ bignum_is_equal()
◆ bignum_is_inf_equal_signed()
◆ bignum_is_inf_equal_unsigned()
◆ bignum_is_inf_signed()
◆ bignum_is_inf_unsigned()
◆ bignum_is_zero()
◆ bignum_lshift()
◆ bignum_mask()
◆ bignum_mul()
◆ bignum_not()
◆ bignum_or()
◆ bignum_rol()
◆ bignum_ror()
◆ bignum_rshift()
◆ bignum_sdiv()
◆ bignum_smod()
◆ bignum_sub()
◆ bignum_to_int()
◆ bignum_to_string()
◆ bignum_to_uint64()
◆ bignum_udiv()
◆ bignum_umod()
◆ bignum_xor()