|
purify
C++ Purify implementation with native circuit and BPP support
|
#include <legacy.hpp>
Public Member Functions | |
| KeyPair (const KeyPair &)=delete | |
| KeyPair & | operator= (const KeyPair &)=delete |
| KeyPair (KeyPair &&other) noexcept=default | |
| KeyPair & | operator= (KeyPair &&other) noexcept=default |
| ~KeyPair ()=default | |
| const PublicKey & | public_key () const noexcept |
| Returns the public key bundle associated with this signer. | |
| Result< PreparedNonce > | prepare_message_nonce (std::span< const unsigned char > message, purify_secp_context *secp_context) const |
| Deterministically prepares a message-bound nonce. | |
| Result< PreparedNonceWithProof > | prepare_message_nonce_with_proof (std::span< const unsigned char > message, purify_secp_context *secp_context) const |
| Deterministically prepares a message-bound nonce together with its proof. | |
| Result< PreparedNonceWithProof > | prepare_message_nonce_with_proof (const MessageProofCache &cache, purify_secp_context *secp_context) const |
| Prepares a message-bound nonce proof using a reusable message cache. | |
| Result< PreparedNonce > | prepare_topic_nonce (std::span< const unsigned char > topic, purify_secp_context *secp_context) const |
| Deterministically prepares a topic-bound nonce. | |
| Result< PreparedNonceWithProof > | prepare_topic_nonce_with_proof (std::span< const unsigned char > topic, purify_secp_context *secp_context) const |
| Deterministically prepares a topic-bound nonce together with its proof. | |
| Result< PreparedNonceWithProof > | prepare_topic_nonce_with_proof (const TopicProofCache &cache, purify_secp_context *secp_context) const |
| Prepares a topic-bound nonce proof using a reusable topic cache. | |
| Result< Signature > | sign_message (std::span< const unsigned char > message, purify_secp_context *secp_context) const |
| Signs a message with a deterministically derived message-bound nonce. | |
| Result< Signature > | sign_message_with_prepared (std::span< const unsigned char > message, PreparedNonce &&prepared, purify_secp_context *secp_context) const |
| Signs a message using an already prepared message-bound nonce. | |
| Result< ProvenSignature > | sign_message_with_prepared_proof (std::span< const unsigned char > message, PreparedNonceWithProof &&prepared, purify_secp_context *secp_context) const |
| Signs a message using an already prepared message-bound nonce proof bundle. | |
| Result< Signature > | sign_with_topic (std::span< const unsigned char > message, std::span< const unsigned char > topic, purify_secp_context *secp_context) const |
| Signs a message using a topic-bound deterministic nonce. | |
| Result< Signature > | sign_with_prepared_topic (std::span< const unsigned char > message, PreparedNonce &&prepared, purify_secp_context *secp_context) const |
| Signs a message using an already prepared topic-bound nonce. | |
| Result< ProvenSignature > | sign_with_prepared_topic_proof (std::span< const unsigned char > message, PreparedNonceWithProof &&prepared, purify_secp_context *secp_context) const |
| Signs a message using an already prepared topic-bound nonce proof bundle. | |
| Result< ProvenSignature > | sign_message_with_proof (std::span< const unsigned char > message, purify_secp_context *secp_context) const |
| Signs a message and returns the signature bundled with its nonce proof. | |
| Result< ProvenSignature > | sign_message_with_proof (const MessageProofCache &cache, purify_secp_context *secp_context) const |
| Signs a message with proof using a reusable message cache. | |
| Result< ProvenSignature > | sign_with_topic_proof (std::span< const unsigned char > message, std::span< const unsigned char > topic, purify_secp_context *secp_context) const |
| Signs a message with a topic-bound nonce proof. | |
| Result< ProvenSignature > | sign_with_topic_proof (std::span< const unsigned char > message, const TopicProofCache &cache, purify_secp_context *secp_context) const |
| Signs a message with a topic-bound nonce proof using a reusable topic cache. | |
Static Public Member Functions | |
| static Result< KeyPair > | from_secret (const SecretKey &secret, purify_secp_context *secp_context) |
| Derives a signing key pair from one packed Purify secret. | |
| static Result< KeyPair > | from_secret (SecretKey &&secret, purify_secp_context *secp_context) |
| Derives a signing key pair from one owned Purify secret. | |
Definition at line 445 of file legacy.hpp.
|
delete |
|
defaultnoexcept |
|
default |
|
static |
| secret | The secret to clone into the returned key pair. |
Definition at line 779 of file legacy.cpp.
References purify::SecretKey::clone(), and PURIFY_ASSIGN_OR_RETURN.
|
static |
| secret | The secret to move into the returned key pair. |
Definition at line 784 of file legacy.cpp.
References PURIFY_ASSIGN_OR_RETURN.
| Result< PreparedNonce > purify::puresign::KeyPair::prepare_message_nonce | ( | std::span< const unsigned char > | message, |
| purify_secp_context * | secp_context | ||
| ) | const |
| message | The message to bind into the nonce derivation. |
Definition at line 789 of file legacy.cpp.
| Result< PreparedNonceWithProof > purify::puresign::KeyPair::prepare_message_nonce_with_proof | ( | const MessageProofCache & | cache, |
| purify_secp_context * | secp_context | ||
| ) | const |
| cache | The prebuilt cache for the exact message to bind. |
Definition at line 799 of file legacy.cpp.
| Result< PreparedNonceWithProof > purify::puresign::KeyPair::prepare_message_nonce_with_proof | ( | std::span< const unsigned char > | message, |
| purify_secp_context * | secp_context | ||
| ) | const |
| message | The message to bind into the nonce derivation and proof statement. |
Definition at line 794 of file legacy.cpp.
| Result< PreparedNonce > purify::puresign::KeyPair::prepare_topic_nonce | ( | std::span< const unsigned char > | topic, |
| purify_secp_context * | secp_context | ||
| ) | const |
| topic | The topic to bind into the nonce derivation. |
Definition at line 804 of file legacy.cpp.
| Result< PreparedNonceWithProof > purify::puresign::KeyPair::prepare_topic_nonce_with_proof | ( | const TopicProofCache & | cache, |
| purify_secp_context * | secp_context | ||
| ) | const |
| cache | The prebuilt cache for the exact topic to bind. |
Definition at line 814 of file legacy.cpp.
| Result< PreparedNonceWithProof > purify::puresign::KeyPair::prepare_topic_nonce_with_proof | ( | std::span< const unsigned char > | topic, |
| purify_secp_context * | secp_context | ||
| ) | const |
| topic | The topic to bind into the nonce derivation and proof statement. |
Definition at line 809 of file legacy.cpp.
|
inlinenoexcept |
Definition at line 473 of file legacy.hpp.
| Result< Signature > purify::puresign::KeyPair::sign_message | ( | std::span< const unsigned char > | message, |
| purify_secp_context * | secp_context | ||
| ) | const |
| message | The message to sign. |
Definition at line 819 of file legacy.cpp.
References PURIFY_ASSIGN_OR_RETURN.
| Result< Signature > purify::puresign::KeyPair::sign_message_with_prepared | ( | std::span< const unsigned char > | message, |
| PreparedNonce && | prepared, | ||
| purify_secp_context * | secp_context | ||
| ) | const |
| message | The message that must match the prepared nonce binding. |
| prepared | The prepared message-bound nonce to consume. |
Definition at line 825 of file legacy.cpp.
References purify::derive_bip340_key(), and PURIFY_ASSIGN_OR_RETURN.
| Result< ProvenSignature > purify::puresign::KeyPair::sign_message_with_prepared_proof | ( | std::span< const unsigned char > | message, |
| PreparedNonceWithProof && | prepared, | ||
| purify_secp_context * | secp_context | ||
| ) | const |
| message | The message that must match the prepared nonce binding. |
| prepared | The prepared nonce-plus-proof bundle to consume. |
Definition at line 832 of file legacy.cpp.
| Result< ProvenSignature > purify::puresign::KeyPair::sign_message_with_proof | ( | const MessageProofCache & | cache, |
| purify_secp_context * | secp_context | ||
| ) | const |
| cache | The prebuilt cache for the exact signed message. |
Definition at line 865 of file legacy.cpp.
References purify::puresign::MessageProofCache::message, and PURIFY_ASSIGN_OR_RETURN.
| Result< ProvenSignature > purify::puresign::KeyPair::sign_message_with_proof | ( | std::span< const unsigned char > | message, |
| purify_secp_context * | secp_context | ||
| ) | const |
| message | The message to sign. |
Definition at line 858 of file legacy.cpp.
References PURIFY_ASSIGN_OR_RETURN.
| Result< Signature > purify::puresign::KeyPair::sign_with_prepared_topic | ( | std::span< const unsigned char > | message, |
| PreparedNonce && | prepared, | ||
| purify_secp_context * | secp_context | ||
| ) | const |
| message | The message to sign. |
| prepared | The topic-bound nonce to consume. |
Definition at line 845 of file legacy.cpp.
References purify::derive_bip340_key(), and PURIFY_ASSIGN_OR_RETURN.
| Result< ProvenSignature > purify::puresign::KeyPair::sign_with_prepared_topic_proof | ( | std::span< const unsigned char > | message, |
| PreparedNonceWithProof && | prepared, | ||
| purify_secp_context * | secp_context | ||
| ) | const |
| message | The message to sign. |
| prepared | The topic-bound nonce-plus-proof bundle to consume. |
Definition at line 852 of file legacy.cpp.
| Result< Signature > purify::puresign::KeyPair::sign_with_topic | ( | std::span< const unsigned char > | message, |
| std::span< const unsigned char > | topic, | ||
| purify_secp_context * | secp_context | ||
| ) | const |
| message | The message to sign. |
| topic | The topic that the nonce must be bound to. |
Definition at line 838 of file legacy.cpp.
References PURIFY_ASSIGN_OR_RETURN.
| Result< ProvenSignature > purify::puresign::KeyPair::sign_with_topic_proof | ( | std::span< const unsigned char > | message, |
| const TopicProofCache & | cache, | ||
| purify_secp_context * | secp_context | ||
| ) | const |
| message | The message to sign. |
| cache | The prebuilt cache for the exact topic bound into the proof. |
Definition at line 880 of file legacy.cpp.
References PURIFY_ASSIGN_OR_RETURN.
| Result< ProvenSignature > purify::puresign::KeyPair::sign_with_topic_proof | ( | std::span< const unsigned char > | message, |
| std::span< const unsigned char > | topic, | ||
| purify_secp_context * | secp_context | ||
| ) | const |
| message | The message to sign. |
| topic | The topic that the nonce proof must bind to. |
Definition at line 872 of file legacy.cpp.
References PURIFY_ASSIGN_OR_RETURN.