|
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, bppp::ExperimentalCircuitBackend *circuit_cache) |
| Result< PreparedNonceWithProof > | prepare_message_nonce_with_proof (const SecretKey &secret, const MessageProofCache &cache, purify_secp_context *secp_context, bppp::ExperimentalCircuitBackend *circuit_cache) |
| 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, bppp::ExperimentalCircuitBackend *circuit_cache) |
| Result< PreparedNonceWithProof > | prepare_topic_nonce_with_proof (const SecretKey &secret, const TopicProofCache &cache, purify_secp_context *secp_context, bppp::ExperimentalCircuitBackend *circuit_cache) |
| 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, bppp::ExperimentalCircuitBackend *circuit_cache) |
| Result< ProvenSignature > | sign_message_with_proof (const SecretKey &secret, const MessageProofCache &cache, purify_secp_context *secp_context, bppp::ExperimentalCircuitBackend *circuit_cache) |
| 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, bppp::ExperimentalCircuitBackend *circuit_cache) |
| Result< ProvenSignature > | sign_with_topic_proof (const SecretKey &secret, std::span< const unsigned char > message, const TopicProofCache &cache, purify_secp_context *secp_context, bppp::ExperimentalCircuitBackend *circuit_cache) |
| 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, bppp::ExperimentalCircuitBackend *circuit_cache) |
| Result< bool > | verify_message_nonce_proof (const MessageProofCache &cache, const PublicKey &public_key, const NonceProof &nonce_proof, purify_secp_context *secp_context, bppp::ExperimentalCircuitBackend *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, bppp::ExperimentalCircuitBackend *circuit_cache) |
| Result< bool > | verify_topic_nonce_proof (const TopicProofCache &cache, const PublicKey &public_key, const NonceProof &nonce_proof, purify_secp_context *secp_context, bppp::ExperimentalCircuitBackend *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, bppp::ExperimentalCircuitBackend *circuit_cache) |
| Result< bool > | verify_message_signature_with_proof (const MessageProofCache &cache, const PublicKey &public_key, const ProvenSignature &signature, purify_secp_context *secp_context, bppp::ExperimentalCircuitBackend *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, bppp::ExperimentalCircuitBackend *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, bppp::ExperimentalCircuitBackend *circuit_cache) |
| Result< MessageProofCache > purify::puresign_plusplus::api_impl::build_message_proof_cache | ( | std::span< const unsigned char > | message | ) |
Definition at line 434 of file bppp.cpp.
References purify::puresign_plusplus::MessageProofCache::build().
| Result< TopicProofCache > purify::puresign_plusplus::api_impl::build_topic_proof_cache | ( | std::span< const unsigned char > | topic | ) |
Definition at line 438 of file bppp.cpp.
References purify::puresign_plusplus::TopicProofCache::build().
| Result< PublicKey > purify::puresign_plusplus::api_impl::derive_public_key | ( | const SecretKey & | secret, |
| purify_secp_context * | secp_context | ||
| ) |
Definition at line 428 of file bppp.cpp.
References purify::derive_bip340_key(), purify::derive_key(), and PURIFY_ASSIGN_OR_RETURN.
Referenced by purify::puresign_plusplus::PublicKey::from_secret().
| Result< PreparedNonce > purify::puresign_plusplus::api_impl::prepare_message_nonce | ( | const SecretKey & | secret, |
| std::span< const unsigned char > | message, | ||
| purify_secp_context * | secp_context | ||
| ) |
Definition at line 442 of file bppp.cpp.
References purify::puresign_plusplus::PreparedNonce::from_parts(), and PURIFY_ASSIGN_OR_RETURN.
Referenced by purify::puresign_plusplus::KeyPair::prepare_message_nonce(), and sign_message().
| Result< PreparedNonceWithProof > purify::puresign_plusplus::api_impl::prepare_message_nonce_with_proof | ( | const SecretKey & | secret, |
| const MessageProofCache & | cache, | ||
| purify_secp_context * | secp_context, | ||
| bppp::ExperimentalCircuitBackend * | circuit_cache | ||
| ) |
Definition at line 465 of file bppp.cpp.
References purify::puresign_plusplus::MessageProofCache::backend_cache, purify::puresign_plusplus::MessageProofCache::circuit_template, purify::puresign_plusplus::MessageProofCache::eval_input, purify::puresign_plusplus::PreparedNonceWithProof::from_parts(), purify::puresign_plusplus::PreparedNonce::from_parts(), purify::puresign_plusplus::MessageProofCache::message, purify::puresign_plusplus::PreparedNonce::public_nonce(), PURIFY_ASSIGN_OR_RETURN, and PURIFY_RETURN_IF_ERROR.
| Result< PreparedNonceWithProof > purify::puresign_plusplus::api_impl::prepare_message_nonce_with_proof | ( | const SecretKey & | secret, |
| std::span< const unsigned char > | message, | ||
| purify_secp_context * | secp_context, | ||
| bppp::ExperimentalCircuitBackend * | circuit_cache | ||
| ) |
Definition at line 450 of file bppp.cpp.
References purify::puresign_plusplus::PreparedNonceWithProof::from_parts(), purify::puresign_plusplus::PreparedNonce::from_parts(), purify::puresign_plusplus::PreparedNonce::public_nonce(), and PURIFY_ASSIGN_OR_RETURN.
Referenced by purify::puresign_plusplus::KeyPair::prepare_message_nonce_with_proof(), purify::puresign_plusplus::KeyPair::prepare_message_nonce_with_proof(), sign_message_with_proof(), and sign_message_with_proof().
| Result< PreparedNonce > purify::puresign_plusplus::api_impl::prepare_topic_nonce | ( | const SecretKey & | secret, |
| std::span< const unsigned char > | topic, | ||
| purify_secp_context * | secp_context | ||
| ) |
Definition at line 485 of file bppp.cpp.
References purify::puresign_plusplus::PreparedNonce::from_parts(), and PURIFY_ASSIGN_OR_RETURN.
Referenced by purify::puresign_plusplus::KeyPair::prepare_topic_nonce(), and sign_with_topic().
| Result< PreparedNonceWithProof > purify::puresign_plusplus::api_impl::prepare_topic_nonce_with_proof | ( | const SecretKey & | secret, |
| const TopicProofCache & | cache, | ||
| purify_secp_context * | secp_context, | ||
| bppp::ExperimentalCircuitBackend * | circuit_cache | ||
| ) |
Definition at line 508 of file bppp.cpp.
References purify::puresign_plusplus::TopicProofCache::backend_cache, purify::puresign_plusplus::TopicProofCache::circuit_template, purify::puresign_plusplus::TopicProofCache::eval_input, purify::puresign_plusplus::PreparedNonceWithProof::from_parts(), purify::puresign_plusplus::PreparedNonce::from_parts(), purify::puresign_plusplus::PreparedNonce::public_nonce(), PURIFY_ASSIGN_OR_RETURN, PURIFY_RETURN_IF_ERROR, and purify::puresign_plusplus::TopicProofCache::topic.
| Result< PreparedNonceWithProof > purify::puresign_plusplus::api_impl::prepare_topic_nonce_with_proof | ( | const SecretKey & | secret, |
| std::span< const unsigned char > | topic, | ||
| purify_secp_context * | secp_context, | ||
| bppp::ExperimentalCircuitBackend * | circuit_cache | ||
| ) |
Definition at line 493 of file bppp.cpp.
References purify::puresign_plusplus::PreparedNonceWithProof::from_parts(), purify::puresign_plusplus::PreparedNonce::from_parts(), purify::puresign_plusplus::PreparedNonce::public_nonce(), and PURIFY_ASSIGN_OR_RETURN.
Referenced by purify::puresign_plusplus::KeyPair::prepare_topic_nonce_with_proof(), purify::puresign_plusplus::KeyPair::prepare_topic_nonce_with_proof(), sign_with_topic_proof(), and sign_with_topic_proof().
| Result< Signature > purify::puresign_plusplus::api_impl::sign_message | ( | const SecretKey & | secret, |
| std::span< const unsigned char > | message, | ||
| purify_secp_context * | secp_context | ||
| ) |
Definition at line 528 of file bppp.cpp.
References prepare_message_nonce(), PURIFY_ASSIGN_OR_RETURN, and sign_message_with_prepared().
| Result< Signature > purify::puresign_plusplus::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 534 of file bppp.cpp.
References purify::derive_bip340_key(), and PURIFY_ASSIGN_OR_RETURN.
Referenced by sign_message(), and purify::puresign_plusplus::PreparedNonceWithProof::sign_message().
| Result< ProvenSignature > purify::puresign_plusplus::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 540 of file bppp.cpp.
Referenced by sign_message_with_proof(), and sign_message_with_proof().
| Result< ProvenSignature > purify::puresign_plusplus::api_impl::sign_message_with_proof | ( | const SecretKey & | secret, |
| const MessageProofCache & | cache, | ||
| purify_secp_context * | secp_context, | ||
| bppp::ExperimentalCircuitBackend * | circuit_cache | ||
| ) |
Definition at line 575 of file bppp.cpp.
References purify::puresign_plusplus::MessageProofCache::message, prepare_message_nonce_with_proof(), PURIFY_ASSIGN_OR_RETURN, and sign_message_with_prepared_proof().
| Result< ProvenSignature > purify::puresign_plusplus::api_impl::sign_message_with_proof | ( | const SecretKey & | secret, |
| std::span< const unsigned char > | message, | ||
| purify_secp_context * | secp_context, | ||
| bppp::ExperimentalCircuitBackend * | circuit_cache | ||
| ) |
Definition at line 567 of file bppp.cpp.
References prepare_message_nonce_with_proof(), PURIFY_ASSIGN_OR_RETURN, and sign_message_with_prepared_proof().
| Result< Signature > purify::puresign_plusplus::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 554 of file bppp.cpp.
References purify::derive_bip340_key(), and PURIFY_ASSIGN_OR_RETURN.
Referenced by purify::puresign_plusplus::PreparedNonceWithProof::sign_topic_message(), and sign_with_topic().
| Result< ProvenSignature > purify::puresign_plusplus::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 560 of file bppp.cpp.
Referenced by sign_with_topic_proof(), and sign_with_topic_proof().
| Result< Signature > purify::puresign_plusplus::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 547 of file bppp.cpp.
References prepare_topic_nonce(), PURIFY_ASSIGN_OR_RETURN, and sign_with_prepared_topic().
| Result< ProvenSignature > purify::puresign_plusplus::api_impl::sign_with_topic_proof | ( | const SecretKey & | secret, |
| std::span< const unsigned char > | message, | ||
| const TopicProofCache & | cache, | ||
| purify_secp_context * | secp_context, | ||
| bppp::ExperimentalCircuitBackend * | circuit_cache | ||
| ) |
Definition at line 592 of file bppp.cpp.
References prepare_topic_nonce_with_proof(), PURIFY_ASSIGN_OR_RETURN, and sign_with_prepared_topic_proof().
| Result< ProvenSignature > purify::puresign_plusplus::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, | ||
| bppp::ExperimentalCircuitBackend * | circuit_cache | ||
| ) |
Definition at line 583 of file bppp.cpp.
References prepare_topic_nonce_with_proof(), PURIFY_ASSIGN_OR_RETURN, and sign_with_prepared_topic_proof().
| Result< bool > purify::puresign_plusplus::api_impl::verify_message_nonce_proof | ( | const MessageProofCache & | cache, |
| const PublicKey & | public_key, | ||
| const NonceProof & | nonce_proof, | ||
| purify_secp_context * | secp_context, | ||
| bppp::ExperimentalCircuitBackend * | circuit_cache | ||
| ) |
Definition at line 628 of file bppp.cpp.
References purify::puresign_plusplus::MessageProofCache::backend_cache, purify::puresign_plusplus::MessageProofCache::circuit_template, purify::NativeBulletproofCircuitTemplate::instantiate(), PURIFY_ASSIGN_OR_RETURN, purify::puresign_plusplus::PublicKey::purify_pubkey, and PURIFY_RETURN_IF_ERROR.
| Result< bool > purify::puresign_plusplus::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, | ||
| bppp::ExperimentalCircuitBackend * | circuit_cache | ||
| ) |
Definition at line 616 of file bppp.cpp.
References PURIFY_ASSIGN_OR_RETURN, purify::puresign_plusplus::PublicKey::purify_pubkey, purify::detail::tagged_eval_input(), and purify::verifier_circuit().
Referenced by purify::puresign_plusplus::PublicKey::verify_message_nonce_proof(), purify::puresign_plusplus::PublicKey::verify_message_nonce_proof(), verify_message_signature_with_proof(), and verify_message_signature_with_proof().
| Result< bool > purify::puresign_plusplus::api_impl::verify_message_signature_with_proof | ( | const MessageProofCache & | cache, |
| const PublicKey & | public_key, | ||
| const ProvenSignature & | signature, | ||
| purify_secp_context * | secp_context, | ||
| bppp::ExperimentalCircuitBackend * | circuit_cache | ||
| ) |
Definition at line 683 of file bppp.cpp.
References purify::puresign_plusplus::MessageProofCache::message, purify::puresign_plusplus::Signature::nonce(), purify::puresign_plusplus::NonceProof::nonce, purify::puresign_plusplus::ProvenSignature::nonce_proof, PURIFY_ASSIGN_OR_RETURN, purify::puresign_plusplus::ProvenSignature::signature, verify_message_nonce_proof(), verify_signature(), and purify::puresign_plusplus::Nonce::xonly.
| Result< bool > purify::puresign_plusplus::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, | ||
| bppp::ExperimentalCircuitBackend * | circuit_cache | ||
| ) |
Definition at line 667 of file bppp.cpp.
References purify::puresign_plusplus::Signature::nonce(), purify::puresign_plusplus::NonceProof::nonce, purify::puresign_plusplus::ProvenSignature::nonce_proof, PURIFY_ASSIGN_OR_RETURN, purify::puresign_plusplus::ProvenSignature::signature, verify_message_nonce_proof(), verify_signature(), and purify::puresign_plusplus::Nonce::xonly.
Referenced by purify::puresign_plusplus::PublicKey::verify_message_signature_with_proof(), and purify::puresign_plusplus::PublicKey::verify_message_signature_with_proof().
| Result< bool > purify::puresign_plusplus::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 601 of file bppp.cpp.
References purify::BackendRejectedInput, purify::puresign_plusplus::PublicKey::bip340_pubkey, purify::puresign_plusplus::Signature::bytes, purify_bip340_validate_signature(), purify_bip340_validate_xonly_pubkey(), purify_bip340_verify(), purify::puresign_plusplus::PublicKey::purify_pubkey, PURIFY_RETURN_IF_ERROR, purify::require_secp_context(), purify::unexpected_error(), and purify::validate_public_key().
Referenced by verify_message_signature_with_proof(), verify_message_signature_with_proof(), purify::puresign_plusplus::PublicKey::verify_signature(), verify_topic_signature_with_proof(), and verify_topic_signature_with_proof().
| Result< bool > purify::puresign_plusplus::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, | ||
| bppp::ExperimentalCircuitBackend * | circuit_cache | ||
| ) |
Definition at line 640 of file bppp.cpp.
References purify::EmptyInput, PURIFY_ASSIGN_OR_RETURN, purify::puresign_plusplus::PublicKey::purify_pubkey, purify::detail::tagged_eval_input(), purify::unexpected_error(), and purify::verifier_circuit().
Referenced by purify::puresign_plusplus::PublicKey::verify_topic_nonce_proof(), purify::puresign_plusplus::PublicKey::verify_topic_nonce_proof(), verify_topic_signature_with_proof(), and verify_topic_signature_with_proof().
| Result< bool > purify::puresign_plusplus::api_impl::verify_topic_nonce_proof | ( | const TopicProofCache & | cache, |
| const PublicKey & | public_key, | ||
| const NonceProof & | nonce_proof, | ||
| purify_secp_context * | secp_context, | ||
| bppp::ExperimentalCircuitBackend * | circuit_cache | ||
| ) |
Definition at line 655 of file bppp.cpp.
References purify::puresign_plusplus::TopicProofCache::backend_cache, purify::puresign_plusplus::TopicProofCache::circuit_template, purify::NativeBulletproofCircuitTemplate::instantiate(), PURIFY_ASSIGN_OR_RETURN, purify::puresign_plusplus::PublicKey::purify_pubkey, and PURIFY_RETURN_IF_ERROR.
| Result< bool > purify::puresign_plusplus::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, | ||
| bppp::ExperimentalCircuitBackend * | circuit_cache | ||
| ) |
Definition at line 698 of file bppp.cpp.
References purify::puresign_plusplus::Signature::nonce(), purify::puresign_plusplus::NonceProof::nonce, purify::puresign_plusplus::ProvenSignature::nonce_proof, PURIFY_ASSIGN_OR_RETURN, purify::puresign_plusplus::ProvenSignature::signature, verify_signature(), verify_topic_nonce_proof(), and purify::puresign_plusplus::Nonce::xonly.
Referenced by purify::puresign_plusplus::PublicKey::verify_topic_signature_with_proof(), and purify::puresign_plusplus::PublicKey::verify_topic_signature_with_proof().
| Result< bool > purify::puresign_plusplus::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, | ||
| bppp::ExperimentalCircuitBackend * | circuit_cache | ||
| ) |
Definition at line 715 of file bppp.cpp.
References purify::puresign_plusplus::Signature::nonce(), purify::puresign_plusplus::NonceProof::nonce, purify::puresign_plusplus::ProvenSignature::nonce_proof, PURIFY_ASSIGN_OR_RETURN, purify::puresign_plusplus::ProvenSignature::signature, verify_signature(), verify_topic_nonce_proof(), and purify::puresign_plusplus::Nonce::xonly.