|
purify
C++ Purify implementation with native circuit and BPP support
|
Functions | |
| Result< Signature > | sign_message_with_prepared (const SecretKey &secret, std::span< const unsigned char > message, PreparedNonce &&prepared, purify_secp_context *secp_context) |
| Result< Signature > | sign_with_prepared_topic (const SecretKey &secret, std::span< const unsigned char > message, PreparedNonce &&prepared, purify_secp_context *secp_context) |
| Result< PublicKey > | derive_public_key (const SecretKey &secret, purify_secp_context *secp_context) |
| Result< MessageProofCache > | build_message_proof_cache (std::span< const unsigned char > message) |
| Result< TopicProofCache > | build_topic_proof_cache (std::span< const unsigned char > topic) |
| Result< PreparedNonce > | prepare_message_nonce (const SecretKey &secret, std::span< const unsigned char > message, purify_secp_context *secp_context) |
| Result< PreparedNonceWithProof > | prepare_message_nonce_with_proof (const SecretKey &secret, std::span< const unsigned char > message, purify_secp_context *secp_context) |
| Result< PreparedNonceWithProof > | prepare_message_nonce_with_proof (const SecretKey &secret, const MessageProofCache &cache, purify_secp_context *secp_context) |
| Result< PreparedNonce > | prepare_topic_nonce (const SecretKey &secret, std::span< const unsigned char > topic, purify_secp_context *secp_context) |
| Result< PreparedNonceWithProof > | prepare_topic_nonce_with_proof (const SecretKey &secret, std::span< const unsigned char > topic, purify_secp_context *secp_context) |
| Result< PreparedNonceWithProof > | prepare_topic_nonce_with_proof (const SecretKey &secret, const TopicProofCache &cache, purify_secp_context *secp_context) |
| Result< Signature > | sign_message (const SecretKey &secret, std::span< const unsigned char > message, purify_secp_context *secp_context) |
| Result< ProvenSignature > | sign_message_with_prepared_proof (const SecretKey &secret, std::span< const unsigned char > message, PreparedNonceWithProof &&prepared, purify_secp_context *secp_context) |
| Result< Signature > | sign_with_topic (const SecretKey &secret, std::span< const unsigned char > message, std::span< const unsigned char > topic, purify_secp_context *secp_context) |
| Result< ProvenSignature > | sign_with_prepared_topic_proof (const SecretKey &secret, std::span< const unsigned char > message, PreparedNonceWithProof &&prepared, purify_secp_context *secp_context) |
| Result< ProvenSignature > | sign_message_with_proof (const SecretKey &secret, std::span< const unsigned char > message, purify_secp_context *secp_context) |
| Result< ProvenSignature > | sign_message_with_proof (const SecretKey &secret, const MessageProofCache &cache, purify_secp_context *secp_context) |
| Result< ProvenSignature > | sign_with_topic_proof (const SecretKey &secret, std::span< const unsigned char > message, std::span< const unsigned char > topic, purify_secp_context *secp_context) |
| Result< ProvenSignature > | sign_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) |
| Result< MessageProofCache > purify::puresign::api_impl::build_message_proof_cache | ( | std::span< const unsigned char > | message | ) |
Definition at line 396 of file legacy.cpp.
References eval_input, purify::puresign::MessageProofCache::message, PURIFY_ASSIGN_OR_RETURN, and purify::verifier_circuit_template().
| Result< TopicProofCache > purify::puresign::api_impl::build_topic_proof_cache | ( | std::span< const unsigned char > | topic | ) |
Definition at line 410 of file legacy.cpp.
References eval_input, PURIFY_ASSIGN_OR_RETURN, purify::puresign::TopicProofCache::topic, purify::unexpected_error(), and purify::verifier_circuit_template().
| Result< PublicKey > purify::puresign::api_impl::derive_public_key | ( | const SecretKey & | secret, |
| purify_secp_context * | secp_context | ||
| ) |
Definition at line 390 of file legacy.cpp.
References purify::derive_bip340_key(), purify::derive_key(), and PURIFY_ASSIGN_OR_RETURN.
| 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.
| Result< PreparedNonceWithProof > purify::puresign::api_impl::prepare_message_nonce_with_proof | ( | const SecretKey & | secret, |
| const MessageProofCache & | cache, | ||
| purify_secp_context * | secp_context | ||
| ) |
Definition at line 450 of file legacy.cpp.
References purify::puresign::MessageProofCache::backend_cache, purify::puresign::MessageProofCache::circuit_template, purify::puresign::MessageProofCache::message, PURIFY_ASSIGN_OR_RETURN, and PURIFY_RETURN_IF_ERROR.
| 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.
| 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.
| Result< PreparedNonceWithProof > purify::puresign::api_impl::prepare_topic_nonce_with_proof | ( | const SecretKey & | secret, |
| const TopicProofCache & | cache, | ||
| purify_secp_context * | secp_context | ||
| ) |
Definition at line 491 of file legacy.cpp.
References purify::puresign::TopicProofCache::backend_cache, purify::puresign::TopicProofCache::circuit_template, PURIFY_ASSIGN_OR_RETURN, PURIFY_RETURN_IF_ERROR, and purify::puresign::TopicProofCache::topic.
| 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.
| 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.
| 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.
| 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.
| Result< ProvenSignature > purify::puresign::api_impl::sign_message_with_proof | ( | const SecretKey & | secret, |
| const MessageProofCache & | cache, | ||
| purify_secp_context * | secp_context | ||
| ) |
Definition at line 553 of file legacy.cpp.
References purify::puresign::MessageProofCache::message, and PURIFY_ASSIGN_OR_RETURN.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| Result< bool > purify::puresign::api_impl::verify_message_nonce_proof | ( | const MessageProofCache & | cache, |
| const PublicKey & | public_key, | ||
| const NonceProof & | nonce_proof, | ||
| purify_secp_context * | secp_context, | ||
| ExperimentalBulletproofBackendCache * | circuit_cache | ||
| ) |
Definition at line 603 of file legacy.cpp.
References purify::puresign::MessageProofCache::backend_cache, purify::puresign::MessageProofCache::circuit_template, purify::NativeBulletproofCircuitTemplate::instantiate_packed(), PURIFY_ASSIGN_OR_RETURN, purify::puresign::PublicKey::purify_pubkey, and PURIFY_RETURN_IF_ERROR.
| 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 | ||
| ) |
Definition at line 591 of file legacy.cpp.
References PURIFY_ASSIGN_OR_RETURN, purify::puresign::PublicKey::purify_pubkey, and purify::verifier_circuit().
| Result< bool > purify::puresign::api_impl::verify_message_signature_with_proof | ( | const MessageProofCache & | cache, |
| const PublicKey & | public_key, | ||
| const ProvenSignature & | signature, | ||
| purify_secp_context * | secp_context, | ||
| ExperimentalBulletproofBackendCache * | circuit_cache | ||
| ) |
Definition at line 657 of file legacy.cpp.
References purify::puresign::MessageProofCache::message, purify::puresign::Signature::nonce(), purify::puresign::NonceProof::nonce, purify::puresign::ProvenSignature::nonce_proof, PURIFY_ASSIGN_OR_RETURN, purify::puresign::ProvenSignature::signature, and purify::puresign::Nonce::xonly.
| 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 | ||
| ) |
| Result< bool > purify::puresign::api_impl::verify_signature | ( | const PublicKey & | public_key, |
| std::span< const unsigned char > | message, | ||
| const Signature & | signature, | ||
| purify_secp_context * | secp_context | ||
| ) |
Definition at line 576 of file legacy.cpp.
References purify::puresign::PublicKey::bip340_pubkey, purify::puresign::Signature::bytes, purify_bip340_validate_signature(), purify_bip340_validate_xonly_pubkey(), purify_bip340_verify(), purify::puresign::PublicKey::purify_pubkey, PURIFY_RETURN_IF_ERROR, purify::require_secp_context(), purify::unexpected_error(), and purify::validate_public_key().
| 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 | ||
| ) |
Definition at line 615 of file legacy.cpp.
References PURIFY_ASSIGN_OR_RETURN, purify::puresign::PublicKey::purify_pubkey, purify::unexpected_error(), and purify::verifier_circuit().
| Result< bool > purify::puresign::api_impl::verify_topic_nonce_proof | ( | const TopicProofCache & | cache, |
| const PublicKey & | public_key, | ||
| const NonceProof & | nonce_proof, | ||
| purify_secp_context * | secp_context, | ||
| ExperimentalBulletproofBackendCache * | circuit_cache | ||
| ) |
Definition at line 630 of file legacy.cpp.
References purify::puresign::TopicProofCache::backend_cache, purify::puresign::TopicProofCache::circuit_template, purify::NativeBulletproofCircuitTemplate::instantiate_packed(), PURIFY_ASSIGN_OR_RETURN, purify::puresign::PublicKey::purify_pubkey, and PURIFY_RETURN_IF_ERROR.
| 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 | ||
| ) |
| 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 | ||
| ) |