Bitcoin ABC 0.30.3
P2P Digital Currency
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | List of all members
Num3072 Class Reference

#include <muhash.h>

Public Types

typedef uint64_t double_limb_t
 
typedef uint32_t limb_t
 

Public Member Functions

void Multiply (const Num3072 &a)
 
void Divide (const Num3072 &a)
 
void SetToOne ()
 
void Square ()
 
void ToBytes (uint8_t(&out)[BYTE_SIZE])
 
 Num3072 ()
 
 Num3072 (const uint8_t(&data)[BYTE_SIZE])
 
 SERIALIZE_METHODS (Num3072, obj)
 

Public Attributes

limb_t limbs [LIMBS]
 

Static Public Attributes

static constexpr size_t BYTE_SIZE = 384
 
static constexpr int LIMBS = 96
 
static constexpr int LIMB_SIZE = 32
 

Private Member Functions

void FullReduce ()
 
bool IsOverflow () const
 Indicates whether d is larger than the modulus. More...
 
Num3072 GetInverse () const
 

Detailed Description

Definition at line 18 of file muhash.h.

Member Typedef Documentation

◆ double_limb_t

typedef uint64_t Num3072::double_limb_t

Definition at line 33 of file muhash.h.

◆ limb_t

typedef uint32_t Num3072::limb_t

Definition at line 34 of file muhash.h.

Constructor & Destructor Documentation

◆ Num3072() [1/2]

Num3072::Num3072 ( )
inline

Definition at line 56 of file muhash.h.

Here is the call graph for this function:

◆ Num3072() [2/2]

Num3072::Num3072 ( const uint8_t(&)  data[BYTE_SIZE])

Definition at line 318 of file muhash.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ Divide()

void Num3072::Divide ( const Num3072 a)

Definition at line 298 of file muhash.cpp.

Here is the call graph for this function:

◆ FullReduce()

void Num3072::FullReduce ( )
private

Definition at line 142 of file muhash.cpp.

Here is the caller graph for this function:

◆ GetInverse()

Num3072 Num3072::GetInverse ( ) const
private

Definition at line 150 of file muhash.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsOverflow()

bool Num3072::IsOverflow ( ) const
private

Indicates whether d is larger than the modulus.

Definition at line 130 of file muhash.cpp.

Here is the caller graph for this function:

◆ Multiply()

void Num3072::Multiply ( const Num3072 a)

Perform up to two more reductions if the internal state has already overflown the MAX of Num3072 or if it is larger than the modulus or if both are the case.

Definition at line 190 of file muhash.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SERIALIZE_METHODS()

Num3072::SERIALIZE_METHODS ( Num3072  ,
obj   
)
inline

Definition at line 59 of file muhash.h.

◆ SetToOne()

void Num3072::SetToOne ( )

Definition at line 291 of file muhash.cpp.

Here is the caller graph for this function:

◆ Square()

void Num3072::Square ( )

Perform up to two more reductions if the internal state has already overflown the MAX of Num3072 or if it is larger than the modulus or if both are the case.

Definition at line 237 of file muhash.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ToBytes()

void Num3072::ToBytes ( uint8_t(&)  out[BYTE_SIZE])

Definition at line 328 of file muhash.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ BYTE_SIZE

constexpr size_t Num3072::BYTE_SIZE = 384
staticconstexpr

Definition at line 25 of file muhash.h.

◆ LIMB_SIZE

constexpr int Num3072::LIMB_SIZE = 32
staticconstexpr

Definition at line 36 of file muhash.h.

◆ LIMBS

constexpr int Num3072::LIMBS = 96
staticconstexpr

Definition at line 35 of file muhash.h.

◆ limbs

limb_t Num3072::limbs[LIMBS]

Definition at line 38 of file muhash.h.


The documentation for this class was generated from the following files: