5#ifndef BITCOIN_CRYPTO_MUHASH_H
6#define BITCOIN_CRYPTO_MUHASH_H
8#if defined(HAVE_CONFIG_H)
9#include <config/bitcoin-config.h>
30 static constexpr int LIMBS = 48;
35 static constexpr int LIMBS = 96;
41 static_assert(
LIMB_SIZE *
LIMBS == 3072,
"Num3072 isn't 3072 bits");
43 "bad size for double_limb_t");
44 static_assert(
sizeof(
limb_t) * 8 ==
LIMB_SIZE,
"LIMB_SIZE is incorrect");
47 static_assert(
sizeof(
limb_t) == 4 ||
sizeof(
limb_t) == 8,
48 "bad size for limb_t");
60 for (
auto &limb : obj.limbs) {
A class representing MuHash sets.
Num3072 ToNum3072(Span< const uint8_t > in)
SERIALIZE_METHODS(MuHash3072, obj)
MuHash3072 & Remove(Span< const uint8_t > in) noexcept
void Finalize(uint256 &out) noexcept
MuHash3072 & operator/=(const MuHash3072 &div) noexcept
MuHash3072 & Insert(Span< const uint8_t > in) noexcept
MuHash3072 & operator*=(const MuHash3072 &mul) noexcept
Num3072 GetInverse() const
static constexpr int LIMBS
static constexpr size_t BYTE_SIZE
bool IsOverflow() const
Indicates whether d is larger than the modulus.
void ToBytes(uint8_t(&out)[BYTE_SIZE])
static constexpr int LIMB_SIZE
void Divide(const Num3072 &a)
SERIALIZE_METHODS(Num3072, obj)
void Multiply(const Num3072 &a)