Num3072

A 3072-bit number in the MuHash prime field, stored as an array of limbs.

Synopsis

Declared in <crypto/muhash.h>

class Num3072;

Description

Num3072 holds the running numerator or denominator of a MuHash3072 set and provides the modular multiply, divide, and inverse operations used to combine set elements.

Type Aliases

NameDescription
double_limb_t Unsigned integer type twice as wide as a limb, used for carries.
limb_t Unsigned integer type of a single limb.
signed_double_limb_t Signed integer type twice as wide as a limb, used for carries.
signed_limb_t Signed integer type of a single limb.

Member Functions

NameDescription
Num3072 [constructor]Constructors
Divide Divide this number by another, modulo the MuHash prime.
Multiply Multiply this number by another, modulo the MuHash prime.
SetToOne Set this number to the multiplicative identity (one).
ToBytes Serialize this number into a fixed-size byte buffer.

Data Members

NameDescription
limbs The limbs holding the little-endian representation of the number.

Static Data Members

NameDescription
BYTE_SIZE Size of the serialized number in bytes (3072 bits).
LIMBS Number of unsigned limbs making up the 3072-bit number.
LIMB_SIZE Bit width of a single unsigned limb.
SIGNED_LIMBS Number of signed limbs used by the intermediate representation.
SIGNED_LIMB_SIZE Bit width of a single signed limb.