33 return { Permutation::permutation(
inputs) };
39 ctx.
offset =
static_cast<size_t>(hash_index);
46 ctx.
offset =
static_cast<size_t>(hash_index);
53 ctx.
offset =
static_cast<size_t>(hash_index);
70 BB_ASSERT(length == plaintext.size(),
"AesEncrypt: length must equal plaintext.size()");
71 BB_ASSERT(length % 16 == 0,
"AesEncrypt: length must be a multiple of 16");
74 std::vector<uint8_t> result = plaintext;
75 result.resize(length);
84 BB_ASSERT(length == ciphertext.size(),
"AesDecrypt: length must equal ciphertext.size()");
85 BB_ASSERT(length % 16 == 0,
"AesDecrypt: length must be a multiple of 16");
88 std::vector<uint8_t> result = ciphertext;
89 result.resize(length);
#define BB_ASSERT(expression,...)
Cryptographic primitives command definitions for the Barretenberg RPC API.
static FF hash(const std::vector< FF > &input)
Hashes a vector of field elements.
Applies the Poseidon2 permutation function from https://eprint.iacr.org/2023/323.
static AffineElement commit_native(const std::vector< Fq > &inputs, GeneratorContext context={})
Given a vector of fields, generate a pedersen commitment using the indexed generators.
static Fq hash_buffer(const std::vector< uint8_t > &input, GeneratorContext context={})
Given an arbitrary length of bytes, convert them to fields and hash the result using the default gene...
static Fq hash(const std::vector< Fq > &inputs, GeneratorContext context={})
Given a vector of fields, generate a pedersen hash using generators from context.
const std::vector< MemoryValue > data
stdlib::Poseidon2Permutation< Builder > Permutation
void aes128_decrypt_buffer_cbc(uint8_t *buffer, uint8_t *iv, const uint8_t *key, const size_t length)
std::array< uint8_t, BLAKE2S_OUTBYTES > blake2s(std::vector< uint8_t > const &input)
void aes128_encrypt_buffer_cbc(uint8_t *buffer, uint8_t *iv, const uint8_t *key, const size_t length)
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Response execute(BBApiRequest &request) &&
Response execute(BBApiRequest &request) &&
Response execute(BBApiRequest &request) &&
Response execute(BBApiRequest &request) &&
Response execute(BBApiRequest &request) &&
Response execute(BBApiRequest &request) &&
Response execute(BBApiRequest &request) &&
Response execute(BBApiRequest &request) &&
Response execute(BBApiRequest &request) &&
static field serialize_from_buffer(const uint8_t *buffer)