30 std::span<const unsigned char>
slot;
34class ScalarSignature {
40 [[nodiscard]] std::array<unsigned char, 32>
serialize()
const {
return scalar_.to_bytes_be(); }
63 const ConflictContext& context, std::span<const unsigned char> canonical_body,
74 const ConflictContext& context, std::span<const unsigned char> canonical_body,
91 const ConflictContext& context,
92 std::span<const unsigned char> first_body,
const ScalarSignature& first_signature,
93 std::span<const unsigned char> second_body,
const ScalarSignature& second_signature,
Field element modulo the backend scalar field used by this implementation.
Canonical 32-byte scalar response; carries no nonce or proof.
static Result< ScalarSignature > deserialize(std::span< const unsigned char > bytes)
Parse exactly 32 big-endian bytes below the group order, including zero.
std::array< unsigned char, 32 > serialize() const
Return the complete scalar-only wire representation.
Result< std::array< unsigned char, 33 > > reconstruct_nonce(const ConflictContext &context, std::span< const unsigned char > canonical_body, const ScalarSignature &signature, purify_secp_context *secp_context)
Reconstruct the full nonce point as sigma*G - e*Q, rejecting infinity.
Result< std::array< unsigned char, 32 > > nonce_evaluation_input(const ConflictContext &context, purify_secp_context *secp_context)
Derive the candidate deterministic Purify input from the registered slot.
Result< FieldElement > signature_challenge(const ConflictContext &context, std::span< const unsigned char > canonical_body, purify_secp_context *secp_context)
Compute the versioned Q/U/T/body challenge, without a nonce point.
Result< std::array< unsigned char, 32 > > recover_same_slot_key(const ConflictContext &context, std::span< const unsigned char > first_body, const ScalarSignature &first_signature, std::span< const unsigned char > second_body, const ScalarSignature &second_signature, purify_secp_context *secp_context)
Recover the exact signing scalar exposed by two same-slot responses.
Expected< T, Error > Result
Expected-returning convenience alias for Purify value-producing APIs.
Fixed-width integer and field arithmetic helpers used throughout Purify.
Public context shared by conflicting statements in one slashable slot.
std::array< unsigned char, 32 > host_commitment
std::span< const unsigned char > slot
std::array< unsigned char, 32 > signing_key