Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
hmac.hpp File Reference
#include "barretenberg/common/serialize.hpp"
#include "barretenberg/numeric/uintx/uintx.hpp"
#include <algorithm>
#include <array>
#include <cstdint>
#include <string>
#include <vector>

Go to the source code of this file.

Namespaces

namespace  bb
 Entry point for Barretenberg command-line interface.
 
namespace  bb::crypto
 

Functions

template<typename Hash , typename MessageContainer , typename KeyContainer >
std::array< uint8_t, Hash::OUTPUT_SIZE > bb::crypto::hmac (const MessageContainer &message, const KeyContainer &key)
 Compute an HMAC given a secret key and a message.
 
template<typename Hash , typename Fr , typename MessageContainer , typename KeyContainer >
requires (Hash::OUTPUT_SIZE == 32)
Fr bb::crypto::get_unbiased_field_from_hmac (const MessageContainer &message, const KeyContainer &key)
 Takes a size-HASH_OUTPUT buffer from HMAC and converts into a field element.