miasm
Reverse engineering framework
bn.c File Reference
#include <stdio.h>
#include <stdbool.h>
#include <inttypes.h>
#include <assert.h>
#include "bn.h"
Include dependency graph for bn.c:

Functions

bn_t bignum_init (void)
 
bn_t bignum_from_int (DTYPE_TMP i)
 
bn_t bignum_from_uint64 (uint64_t i)
 
int bignum_to_int (bn_t n)
 
uint64_t bignum_to_uint64 (bn_t n)
 
bn_t bignum_from_string (char *str, int nbytes)
 
void bignum_to_string (bn_t n, char *str, int nbytes)
 
bn_t bignum_dec (bn_t n)
 
bn_t bignum_inc (bn_t n)
 
bn_t bignum_add (bn_t a, bn_t b)
 
bn_t bignum_sub (bn_t a, bn_t b)
 
bn_t bignum_mul (bn_t a, bn_t b)
 
bn_t bignum_udiv (bn_t a, bn_t b)
 
bn_t bignum_lshift (bn_t a, int nbits)
 
bn_t bignum_rshift (bn_t a, int nbits)
 
bn_t bignum_a_rshift (bn_t a, int size, int nbits)
 
bn_t bignum_not (bn_t a)
 
bn_t bignum_umod (bn_t a, bn_t b)
 
bn_t bignum_and (bn_t a, bn_t b)
 
bn_t bignum_or (bn_t a, bn_t b)
 
bn_t bignum_xor (bn_t a, bn_t b)
 
int bignum_cmp (bn_t a, bn_t b)
 
int bignum_cmp_signed (bn_t a, bn_t b)
 
int bignum_cmp_unsigned (bn_t a, bn_t b)
 
int bignum_is_equal (bn_t a, bn_t b)
 
int bignum_is_inf_unsigned (bn_t a, bn_t b)
 
int bignum_is_inf_equal_unsigned (bn_t a, bn_t b)
 
int bignum_is_inf_signed (bn_t a, bn_t b)
 
int bignum_is_inf_equal_signed (bn_t a, bn_t b)
 
int bignum_is_zero (bn_t n)
 
bn_t bignum_assign (bn_t src)
 
bn_t bignum_mask (bn_t src, int bits)
 
bn_t bignum_rol (bn_t a, int size, int nbits)
 
bn_t bignum_ror (bn_t a, int size, int nbits)
 
int bignum_getbit (bn_t a, int pos)
 
int bignum_cntleadzeros (bn_t n, int size)
 
int bignum_cnttrailzeros (bn_t n, int size)
 
bn_t bignum_sdiv (bn_t a, bn_t b, int size)
 
bn_t bignum_smod (bn_t a, bn_t b, int size)
 

Function Documentation

◆ bignum_a_rshift()

bn_t bignum_a_rshift ( bn_t  a,
int  size,
int  nbits 
)
Here is the call graph for this function:

◆ bignum_add()

bn_t bignum_add ( bn_t  a,
bn_t  b 
)

◆ bignum_and()

bn_t bignum_and ( bn_t  a,
bn_t  b 
)
Here is the caller graph for this function:

◆ bignum_assign()

bn_t bignum_assign ( bn_t  src)
Here is the caller graph for this function:

◆ bignum_cmp()

int bignum_cmp ( bn_t  a,
bn_t  b 
)
Here is the caller graph for this function:

◆ bignum_cmp_signed()

int bignum_cmp_signed ( bn_t  a,
bn_t  b 
)
Here is the caller graph for this function:

◆ bignum_cmp_unsigned()

int bignum_cmp_unsigned ( bn_t  a,
bn_t  b 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ bignum_cntleadzeros()

int bignum_cntleadzeros ( bn_t  n,
int  size 
)
Here is the call graph for this function:

◆ bignum_cnttrailzeros()

int bignum_cnttrailzeros ( bn_t  n,
int  size 
)
Here is the call graph for this function:

◆ bignum_dec()

bn_t bignum_dec ( bn_t  n)
Here is the caller graph for this function:

◆ bignum_from_int()

bn_t bignum_from_int ( DTYPE_TMP  i)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ bignum_from_string()

bn_t bignum_from_string ( char *  str,
int  nbytes 
)
Here is the call graph for this function:

◆ bignum_from_uint64()

bn_t bignum_from_uint64 ( uint64_t  i)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ bignum_getbit()

int bignum_getbit ( bn_t  a,
int  pos 
)
Here is the caller graph for this function:

◆ bignum_inc()

bn_t bignum_inc ( bn_t  n)

◆ bignum_init()

bn_t bignum_init ( void  )
Here is the caller graph for this function:

◆ bignum_is_equal()

int bignum_is_equal ( bn_t  a,
bn_t  b 
)
Here is the call graph for this function:

◆ bignum_is_inf_equal_signed()

int bignum_is_inf_equal_signed ( bn_t  a,
bn_t  b 
)
Here is the call graph for this function:

◆ bignum_is_inf_equal_unsigned()

int bignum_is_inf_equal_unsigned ( bn_t  a,
bn_t  b 
)
Here is the call graph for this function:

◆ bignum_is_inf_signed()

int bignum_is_inf_signed ( bn_t  a,
bn_t  b 
)
Here is the call graph for this function:

◆ bignum_is_inf_unsigned()

int bignum_is_inf_unsigned ( bn_t  a,
bn_t  b 
)
Here is the call graph for this function:

◆ bignum_is_zero()

int bignum_is_zero ( bn_t  n)
Here is the caller graph for this function:

◆ bignum_lshift()

bn_t bignum_lshift ( bn_t  a,
int  nbits 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ bignum_mask()

bn_t bignum_mask ( bn_t  src,
int  bits 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ bignum_mul()

bn_t bignum_mul ( bn_t  a,
bn_t  b 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ bignum_not()

bn_t bignum_not ( bn_t  a)

◆ bignum_or()

bn_t bignum_or ( bn_t  a,
bn_t  b 
)
Here is the caller graph for this function:

◆ bignum_rol()

bn_t bignum_rol ( bn_t  a,
int  size,
int  nbits 
)
Here is the call graph for this function:

◆ bignum_ror()

bn_t bignum_ror ( bn_t  a,
int  size,
int  nbits 
)
Here is the call graph for this function:

◆ bignum_rshift()

bn_t bignum_rshift ( bn_t  a,
int  nbits 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ bignum_sdiv()

bn_t bignum_sdiv ( bn_t  a,
bn_t  b,
int  size 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ bignum_smod()

bn_t bignum_smod ( bn_t  a,
bn_t  b,
int  size 
)
Here is the call graph for this function:

◆ bignum_sub()

bn_t bignum_sub ( bn_t  a,
bn_t  b 
)
Here is the caller graph for this function:

◆ bignum_to_int()

int bignum_to_int ( bn_t  n)
Here is the call graph for this function:

◆ bignum_to_string()

void bignum_to_string ( bn_t  n,
char *  str,
int  nbytes 
)
Here is the call graph for this function:

◆ bignum_to_uint64()

uint64_t bignum_to_uint64 ( bn_t  n)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ bignum_udiv()

bn_t bignum_udiv ( bn_t  a,
bn_t  b 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ bignum_umod()

bn_t bignum_umod ( bn_t  a,
bn_t  b 
)
Here is the call graph for this function:

◆ bignum_xor()

bn_t bignum_xor ( bn_t  a,
bn_t  b 
)
Here is the caller graph for this function: