5 #ifndef BITCOIN_CRYPTO_MUHASH_H 6 #define BITCOIN_CRYPTO_MUHASH_H 8 #if defined(HAVE_CONFIG_H) 29 static constexpr
int LIMBS = 48;
34 static constexpr
int LIMBS = 96;
35 static constexpr
int LIMB_SIZE = 32;
40 static_assert(LIMB_SIZE * LIMBS == 3072,
"Num3072 isn't 3072 bits");
41 static_assert(
sizeof(double_limb_t) ==
sizeof(limb_t) * 2,
"bad size for double_limb_t");
42 static_assert(
sizeof(limb_t) * 8 == LIMB_SIZE,
"LIMB_SIZE is incorrect");
45 static_assert(
sizeof(limb_t) == 4 ||
sizeof(limb_t) == 8,
"bad size for limb_t");
56 for (
auto& limb : obj.limbs) {
94 static constexpr
size_t BYTE_SIZE = 384;
121 void Finalize(
uint256& out) noexcept;
130 #endif // BITCOIN_CRYPTO_MUHASH_H
bool IsOverflow() const
Indicates wether d is larger than the modulus.
SERIALIZE_METHODS(Num3072, obj)
void Divide(const Num3072 &a)
static constexpr int LIMB_SIZE
static constexpr int LIMBS
SERIALIZE_METHODS(MuHash3072, obj)
void Multiply(const Num3072 &a)
Num3072 GetInverse() const
A class representing MuHash sets.
A Span is an object that can refer to a contiguous sequence of objects.