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

void bb::crypto::secure_erase_bytes (void *ptr, size_t size)
 
template<typename T , size_t N>
void bb::crypto::secure_erase (std::array< T, N > &buffer)
 
template<typename T >
void bb::crypto::secure_erase (std::vector< T > &buffer)
 
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, see https://datatracker.ietf.org/doc/html/rfc2104.
 
template<typename Hash , typename Fr , typename MessageContainer , typename KeyContainer >
requires (Hash::OUTPUT_SIZE == 32)
Fr bb::crypto::deterministic_nonce_rfc6979 (const MessageContainer &message, const KeyContainer &key)
 Deterministic nonce derivation according to RFC6979 specification (https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf, A.3.3)