purify
C++ Purify implementation with native circuit and BPP support
Loading...
Searching...
No Matches
purify::puresign::api_impl Namespace Reference

Functions

Result< Signaturesign_message_with_prepared (const SecretKey &secret, std::span< const unsigned char > message, PreparedNonce &&prepared, purify_secp_context *secp_context)
 
Result< Signaturesign_with_prepared_topic (const SecretKey &secret, std::span< const unsigned char > message, PreparedNonce &&prepared, purify_secp_context *secp_context)
 
Result< PublicKeyderive_public_key (const SecretKey &secret, purify_secp_context *secp_context)
 
Result< MessageProofCachebuild_message_proof_cache (std::span< const unsigned char > message)
 
Result< TopicProofCachebuild_topic_proof_cache (std::span< const unsigned char > topic)
 
Result< PreparedNonceprepare_message_nonce (const SecretKey &secret, std::span< const unsigned char > message, purify_secp_context *secp_context)
 
Result< PreparedNonceWithProofprepare_message_nonce_with_proof (const SecretKey &secret, std::span< const unsigned char > message, purify_secp_context *secp_context)
 
Result< PreparedNonceWithProofprepare_message_nonce_with_proof (const SecretKey &secret, const MessageProofCache &cache, purify_secp_context *secp_context)
 
Result< PreparedNonceprepare_topic_nonce (const SecretKey &secret, std::span< const unsigned char > topic, purify_secp_context *secp_context)
 
Result< PreparedNonceWithProofprepare_topic_nonce_with_proof (const SecretKey &secret, std::span< const unsigned char > topic, purify_secp_context *secp_context)
 
Result< PreparedNonceWithProofprepare_topic_nonce_with_proof (const SecretKey &secret, const TopicProofCache &cache, purify_secp_context *secp_context)
 
Result< Signaturesign_message (const SecretKey &secret, std::span< const unsigned char > message, purify_secp_context *secp_context)
 
Result< ProvenSignaturesign_message_with_prepared_proof (const SecretKey &secret, std::span< const unsigned char > message, PreparedNonceWithProof &&prepared, purify_secp_context *secp_context)
 
Result< Signaturesign_with_topic (const SecretKey &secret, std::span< const unsigned char > message, std::span< const unsigned char > topic, purify_secp_context *secp_context)
 
Result< ProvenSignaturesign_with_prepared_topic_proof (const SecretKey &secret, std::span< const unsigned char > message, PreparedNonceWithProof &&prepared, purify_secp_context *secp_context)
 
Result< ProvenSignaturesign_message_with_proof (const SecretKey &secret, std::span< const unsigned char > message, purify_secp_context *secp_context)
 
Result< ProvenSignaturesign_message_with_proof (const SecretKey &secret, const MessageProofCache &cache, purify_secp_context *secp_context)
 
Result< ProvenSignaturesign_with_topic_proof (const SecretKey &secret, std::span< const unsigned char > message, std::span< const unsigned char > topic, purify_secp_context *secp_context)
 
Result< ProvenSignaturesign_with_topic_proof (const SecretKey &secret, std::span< const unsigned char > message, const TopicProofCache &cache, purify_secp_context *secp_context)
 
Result< bool > verify_signature (const PublicKey &public_key, std::span< const unsigned char > message, const Signature &signature, purify_secp_context *secp_context)
 
Result< bool > verify_message_nonce_proof (const PublicKey &public_key, std::span< const unsigned char > message, const NonceProof &nonce_proof, purify_secp_context *secp_context, ExperimentalBulletproofBackendCache *circuit_cache)
 
Result< bool > verify_message_nonce_proof (const MessageProofCache &cache, const PublicKey &public_key, const NonceProof &nonce_proof, purify_secp_context *secp_context, ExperimentalBulletproofBackendCache *circuit_cache)
 
Result< bool > verify_topic_nonce_proof (const PublicKey &public_key, std::span< const unsigned char > topic, const NonceProof &nonce_proof, purify_secp_context *secp_context, ExperimentalBulletproofBackendCache *circuit_cache)
 
Result< bool > verify_topic_nonce_proof (const TopicProofCache &cache, const PublicKey &public_key, const NonceProof &nonce_proof, purify_secp_context *secp_context, ExperimentalBulletproofBackendCache *circuit_cache)
 
Result< bool > verify_message_signature_with_proof (const PublicKey &public_key, std::span< const unsigned char > message, const ProvenSignature &signature, purify_secp_context *secp_context, ExperimentalBulletproofBackendCache *circuit_cache)
 
Result< bool > verify_message_signature_with_proof (const MessageProofCache &cache, const PublicKey &public_key, const ProvenSignature &signature, purify_secp_context *secp_context, ExperimentalBulletproofBackendCache *circuit_cache)
 
Result< bool > verify_topic_signature_with_proof (const PublicKey &public_key, std::span< const unsigned char > message, std::span< const unsigned char > topic, const ProvenSignature &signature, purify_secp_context *secp_context, ExperimentalBulletproofBackendCache *circuit_cache)
 
Result< bool > verify_topic_signature_with_proof (const TopicProofCache &cache, const PublicKey &public_key, std::span< const unsigned char > message, const ProvenSignature &signature, purify_secp_context *secp_context, ExperimentalBulletproofBackendCache *circuit_cache)
 

Function Documentation

◆ build_message_proof_cache()

Result< MessageProofCache > purify::puresign::api_impl::build_message_proof_cache ( std::span< const unsigned char >  message)

◆ build_topic_proof_cache()

Result< TopicProofCache > purify::puresign::api_impl::build_topic_proof_cache ( std::span< const unsigned char >  topic)

◆ derive_public_key()

Result< PublicKey > purify::puresign::api_impl::derive_public_key ( const SecretKey secret,
purify_secp_context secp_context 
)

◆ prepare_message_nonce()

Result< PreparedNonce > purify::puresign::api_impl::prepare_message_nonce ( const SecretKey secret,
std::span< const unsigned char >  message,
purify_secp_context secp_context 
)

Definition at line 427 of file legacy.cpp.

References PURIFY_ASSIGN_OR_RETURN.

◆ prepare_message_nonce_with_proof() [1/2]

◆ prepare_message_nonce_with_proof() [2/2]

Result< PreparedNonceWithProof > purify::puresign::api_impl::prepare_message_nonce_with_proof ( const SecretKey secret,
std::span< const unsigned char >  message,
purify_secp_context secp_context 
)

Definition at line 436 of file legacy.cpp.

References PURIFY_ASSIGN_OR_RETURN.

◆ prepare_topic_nonce()

Result< PreparedNonce > purify::puresign::api_impl::prepare_topic_nonce ( const SecretKey secret,
std::span< const unsigned char >  topic,
purify_secp_context secp_context 
)

Definition at line 468 of file legacy.cpp.

References PURIFY_ASSIGN_OR_RETURN.

◆ prepare_topic_nonce_with_proof() [1/2]

Result< PreparedNonceWithProof > purify::puresign::api_impl::prepare_topic_nonce_with_proof ( const SecretKey secret,
const TopicProofCache cache,
purify_secp_context secp_context 
)

◆ prepare_topic_nonce_with_proof() [2/2]

Result< PreparedNonceWithProof > purify::puresign::api_impl::prepare_topic_nonce_with_proof ( const SecretKey secret,
std::span< const unsigned char >  topic,
purify_secp_context secp_context 
)

Definition at line 477 of file legacy.cpp.

References PURIFY_ASSIGN_OR_RETURN.

◆ sign_message()

Result< Signature > purify::puresign::api_impl::sign_message ( const SecretKey secret,
std::span< const unsigned char >  message,
purify_secp_context secp_context 
)

Definition at line 509 of file legacy.cpp.

References PURIFY_ASSIGN_OR_RETURN.

◆ sign_message_with_prepared()

Result< Signature > purify::puresign::api_impl::sign_message_with_prepared ( const SecretKey secret,
std::span< const unsigned char >  message,
PreparedNonce &&  prepared,
purify_secp_context secp_context 
)

Definition at line 515 of file legacy.cpp.

References purify::derive_bip340_key(), and PURIFY_ASSIGN_OR_RETURN.

◆ sign_message_with_prepared_proof()

Result< ProvenSignature > purify::puresign::api_impl::sign_message_with_prepared_proof ( const SecretKey secret,
std::span< const unsigned char >  message,
PreparedNonceWithProof &&  prepared,
purify_secp_context secp_context 
)

Definition at line 521 of file legacy.cpp.

◆ sign_message_with_proof() [1/2]

Result< ProvenSignature > purify::puresign::api_impl::sign_message_with_proof ( const SecretKey secret,
const MessageProofCache cache,
purify_secp_context secp_context 
)

◆ sign_message_with_proof() [2/2]

Result< ProvenSignature > purify::puresign::api_impl::sign_message_with_proof ( const SecretKey secret,
std::span< const unsigned char >  message,
purify_secp_context secp_context 
)

Definition at line 546 of file legacy.cpp.

References PURIFY_ASSIGN_OR_RETURN.

◆ sign_with_prepared_topic()

Result< Signature > purify::puresign::api_impl::sign_with_prepared_topic ( const SecretKey secret,
std::span< const unsigned char >  message,
PreparedNonce &&  prepared,
purify_secp_context secp_context 
)

Definition at line 534 of file legacy.cpp.

References purify::derive_bip340_key(), and PURIFY_ASSIGN_OR_RETURN.

◆ sign_with_prepared_topic_proof()

Result< ProvenSignature > purify::puresign::api_impl::sign_with_prepared_topic_proof ( const SecretKey secret,
std::span< const unsigned char >  message,
PreparedNonceWithProof &&  prepared,
purify_secp_context secp_context 
)

Definition at line 540 of file legacy.cpp.

◆ sign_with_topic()

Result< Signature > purify::puresign::api_impl::sign_with_topic ( const SecretKey secret,
std::span< const unsigned char >  message,
std::span< const unsigned char >  topic,
purify_secp_context secp_context 
)

Definition at line 527 of file legacy.cpp.

References PURIFY_ASSIGN_OR_RETURN.

◆ sign_with_topic_proof() [1/2]

Result< ProvenSignature > purify::puresign::api_impl::sign_with_topic_proof ( const SecretKey secret,
std::span< const unsigned char >  message,
const TopicProofCache cache,
purify_secp_context secp_context 
)

Definition at line 568 of file legacy.cpp.

References PURIFY_ASSIGN_OR_RETURN.

◆ sign_with_topic_proof() [2/2]

Result< ProvenSignature > purify::puresign::api_impl::sign_with_topic_proof ( const SecretKey secret,
std::span< const unsigned char >  message,
std::span< const unsigned char >  topic,
purify_secp_context secp_context 
)

Definition at line 560 of file legacy.cpp.

References PURIFY_ASSIGN_OR_RETURN.

◆ verify_message_nonce_proof() [1/2]

◆ verify_message_nonce_proof() [2/2]

Result< bool > purify::puresign::api_impl::verify_message_nonce_proof ( const PublicKey public_key,
std::span< const unsigned char >  message,
const NonceProof nonce_proof,
purify_secp_context secp_context,
ExperimentalBulletproofBackendCache circuit_cache 
)

◆ verify_message_signature_with_proof() [1/2]

◆ verify_message_signature_with_proof() [2/2]

Result< bool > purify::puresign::api_impl::verify_message_signature_with_proof ( const PublicKey public_key,
std::span< const unsigned char >  message,
const ProvenSignature signature,
purify_secp_context secp_context,
ExperimentalBulletproofBackendCache circuit_cache 
)

◆ verify_signature()

◆ verify_topic_nonce_proof() [1/2]

Result< bool > purify::puresign::api_impl::verify_topic_nonce_proof ( const PublicKey public_key,
std::span< const unsigned char >  topic,
const NonceProof nonce_proof,
purify_secp_context secp_context,
ExperimentalBulletproofBackendCache circuit_cache 
)

◆ verify_topic_nonce_proof() [2/2]

◆ verify_topic_signature_with_proof() [1/2]

Result< bool > purify::puresign::api_impl::verify_topic_signature_with_proof ( const PublicKey public_key,
std::span< const unsigned char >  message,
std::span< const unsigned char >  topic,
const ProvenSignature signature,
purify_secp_context secp_context,
ExperimentalBulletproofBackendCache circuit_cache 
)

◆ verify_topic_signature_with_proof() [2/2]

Result< bool > purify::puresign::api_impl::verify_topic_signature_with_proof ( const TopicProofCache cache,
const PublicKey public_key,
std::span< const unsigned char >  message,
const ProvenSignature signature,
purify_secp_context secp_context,
ExperimentalBulletproofBackendCache circuit_cache 
)