Big number interface. More...
#include <stddef.h>
#include <stdint.h>
#include "epid/common/errors.h"
#include "epid/common/types.h"
Typedefs | |
typedef struct BigNum | BigNum |
Internal representation of large numbers. | |
Functions | |
EpidStatus | NewBigNum (size_t data_size_bytes, BigNum **bignum) |
Constructs a new BigNum. More... | |
void | DeleteBigNum (BigNum **bignum) |
Deletes a previously allocated BigNum. More... | |
EpidStatus | ReadBigNum (void const *bn_str, size_t strlen, BigNum *bn) |
Deserializes a BigNum from a string. More... | |
EpidStatus | WriteBigNum (BigNum const *bn, size_t strlen, void const *bn_str) |
Serializes a BigNum to a string. More... | |
EpidStatus | BigNumAdd (BigNum const *a, BigNum const *b, BigNum *r) |
Adds two BigNum values. More... | |
EpidStatus | BigNumSub (BigNum const *a, BigNum const *b, BigNum *r) |
Subtracts two BigNum values. More... | |
EpidStatus | BigNumMul (BigNum const *a, BigNum const *b, BigNum *r) |
Multiplies two BigNum values. More... | |
EpidStatus | BigNumMod (BigNum const *a, BigNum const *b, BigNum *r) |
Computes modular reduction for BigNum value by specified modulus. More... | |
Big number interface.