purify
C++ Purify implementation with native circuit and BPP support
Loading...
Searching...
No Matches
accountable.hpp File Reference

Experimental public transcripts for scalar-only accountable signatures.

#include <array>
#include <span>
#include "purify/numeric.hpp"

Go to the source code of this file.

Data Structures

struct  purify::accountable::ConflictContext
 Public context shared by conflicting statements in one slashable slot. More...
class  purify::accountable::ScalarSignature
 Canonical 32-byte scalar response; carries no nonce or proof. More...

Namespaces

namespace  purify
namespace  purify::accountable

Functions

Result< std::array< unsigned char, 32 > > purify::accountable::nonce_evaluation_input (const ConflictContext &context, purify_secp_context *secp_context)
 Derive the candidate deterministic Purify input from the registered slot.
Result< FieldElement > purify::accountable::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, 33 > > purify::accountable::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 > > purify::accountable::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.