Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bbapi_schnorr.hpp
Go to the documentation of this file.
1#pragma once
14#include <array>
15#include <cstdint>
16#include <vector>
17
18namespace bb::bbapi {
19
25 static constexpr const char MSGPACK_SCHEMA_NAME[] = "SchnorrComputePublicKey";
26
27 struct Response {
28 static constexpr const char MSGPACK_SCHEMA_NAME[] = "SchnorrComputePublicKeyResponse";
31 bool operator==(const Response&) const = default;
32 };
33
35 Response execute(BBApiRequest& request) &&;
37 bool operator==(const SchnorrComputePublicKey&) const = default;
38};
39
45 static constexpr const char MSGPACK_SCHEMA_NAME[] = "SchnorrConstructSignature";
46
47 struct Response {
48 static constexpr const char MSGPACK_SCHEMA_NAME[] = "SchnorrConstructSignatureResponse";
49 std::array<uint8_t, 32> s;
50 std::array<uint8_t, 32> e;
52 bool operator==(const Response&) const = default;
53 };
54
55 std::vector<uint8_t> message; // Variable length
57 Response execute(BBApiRequest& request) &&;
59 bool operator==(const SchnorrConstructSignature&) const = default;
60};
61
67 static constexpr const char MSGPACK_SCHEMA_NAME[] = "SchnorrVerifySignature";
68
69 struct Response {
70 static constexpr const char MSGPACK_SCHEMA_NAME[] = "SchnorrVerifySignatureResponse";
73 bool operator==(const Response&) const = default;
74 };
75
76 std::vector<uint8_t> message;
78 std::array<uint8_t, 32> s;
79 std::array<uint8_t, 32> e;
80 Response execute(BBApiRequest& request) &&;
82 bool operator==(const SchnorrVerifySignature&) const = default;
83};
84
85} // namespace bb::bbapi
Shared type definitions for the Barretenberg RPC API.
bool operator==(const Response &) const =default
static constexpr const char MSGPACK_SCHEMA_NAME[]
Compute Schnorr public key from private key.
Response execute(BBApiRequest &request) &&
static constexpr const char MSGPACK_SCHEMA_NAME[]
bool operator==(const SchnorrComputePublicKey &) const =default
static constexpr const char MSGPACK_SCHEMA_NAME[]
bool operator==(const Response &) const =default
Construct a Schnorr signature.
bool operator==(const SchnorrConstructSignature &) const =default
MSGPACK_FIELDS(message, private_key)
Response execute(BBApiRequest &request) &&
static constexpr const char MSGPACK_SCHEMA_NAME[]
bool operator==(const Response &) const =default
static constexpr const char MSGPACK_SCHEMA_NAME[]
Verify a Schnorr signature.
std::array< uint8_t, 32 > e
MSGPACK_FIELDS(message, public_key, s, e)
Response execute(BBApiRequest &request) &&
std::array< uint8_t, 32 > s
static constexpr const char MSGPACK_SCHEMA_NAME[]
grumpkin::g1::affine_element public_key
bool operator==(const SchnorrVerifySignature &) const =default