Benign crates 2,270,708 installs Download

solana-zk-elgamal-proof-program 4.2.0

“Solana Zk ElGamal Proof Program”

Large registry install base (10k+ downloads)Encrypt method invocation
SHA-256c8c0ebd3d22e5889e0d4372a689efc2b04e5d32a07fa48c8f41d4cd0b99d8689
MaleculeO(As)H(Db)

Evidence

imports bytemuck::Pod lib.rs · lines 1–20
1:28… table-api")]
2#![forbid(unsafe_code)]
3
4use {
5 bytemuck::Pod,
6 solana_instruction::error::InstructionError,
7 solana_program_runtime::{declare_process_instruction, invoke_context::InvokeContext},
8 solana_sdk_ids::system_program,
9 solana_svm_log_collector::ic_msg,
10 solana_zk_sdk::zk_elgamal_proof_program::{
11 id,
12 instruction::ProofInstruction,
13 proof_data::*,
14 state::{ProofContextState, ProofContextStateMeta},
15 },
16 std::result::Result,
17};
18
19pub const CLOSE_CONTEXT_STATE_COMPUTE_UNITS: u64 = 3_300;
20pub const VERIFY_ZERO_CIPHERTEXT_COMPUTE_UNITS: …
Data-access verb token lib.rs · lines 47–48
47:21… n data is exactly 5 bytes, then read proof from an account
48 let context_data = if instruction_dat …
Repeated Base64-alphabet Rust literals lib.rs · lines 290–294
290:51… putationalBudgetExceeded)?;
291 ic_msg!(invoke_context, "VerifyGroupedCiphertext2HandlesValidity");
292 process_verify_proof::<
293 GroupedCiphertext2HandlesValidityProofData,
294 GroupedCipher …
imports criterion::Criterion verify_proofs.rs · lines 1–25
1:18… arithmetic_side_effects)]
2use {
3 criterion::{Criterion, criterion_group, criterion_main},
4 curve25519_dalek::scalar::Scalar,
5 solana_zk_sdk::{
6 encryption::{
7 elgamal::ElGamalKeypair,
8 grouped_elgamal::GroupedElGamal,
9 pedersen::{Pedersen, PedersenOpening},
10 },
11 zk_elgamal_proof_program::proof_data::{
12 BatchedGroupedCiphertext2HandlesValidityProofData,
13 BatchedGroupedCiphertext3HandlesValidityProofData, BatchedRangeProofU64Data,
14 BatchedRangeProofU128Data, BatchedRangeProofU256Data,
15 CiphertextCiphertextEqualityProofData, CiphertextCommitmentEqualityProofData,
16 GroupedCiphertext2HandlesValidityProofData, GroupedCiphertext3HandlesValidityProofData,
17 PercentageWithCapProofData, PubkeyValidityProofData, ZeroCiphertextProofData,
18 ZkProofData,
19 },
20 },
⋯5 lines
Encrypt method invocation verify_proofs.rs · lines 35–39
35:4… let keypair = ElGamalKeypair::new_rand();
36 let ciphertext = keypair.pubkey().encrypt(0_u64);
37 let proof_data = ZeroCiphertextProofData::new(&keypair, &ciphertext).unwrap();
38
39 c.bench_function("zero_cipher …

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.