Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/docknetwork/crypto
/ functions
Functions
2,782 in github.com/docknetwork/crypto
⨍
Functions
2,782
◇
Types & classes
723
↓ 2,679 callers
Method
clone
(&self)
utils/src/pairs.rs:15
↓ 1,268 callers
Function
rand
Generates a random using given `rng`.
utils/src/misc.rs:114
↓ 1,198 callers
Method
map
Applies given `f` to each contained entity producing a new `SecretKeyModel`.
coconut/src/setup/keygen/common.rs:133
↓ 557 callers
Method
add
(&mut self, item: Witness<E>)
proof_system/src/witness.rs:308
↓ 471 callers
Method
len
Returns underlying length.
utils/src/pairs.rs:101
↓ 464 callers
Method
iter
Returns an iterator over zipped pairs.
utils/src/pairs.rs:111
↓ 437 callers
Method
into_iter
(self)
utils/src/pairs.rs:162
↓ 260 callers
Method
append
(&mut self, label: &'static [u8], element: &S)
utils/src/transcript.rs:66
↓ 168 callers
Method
len
(&self)
vb_accumulator/src/batch_utils.rs:701
↓ 162 callers
Method
value
(&self)
vb_accumulator/src/kb_universal_accumulator/accumulator.rs:256
↓ 158 callers
Method
get
(&self, s_idx: usize)
proof_system/src/derived_params.rs:108
↓ 117 callers
Method
len
(&self)
schnorr_pok/src/pok_generalized_pedersen.rs:210
↓ 116 callers
Method
is_zero
Checks if a signature has zero elements. A valid signature should not have zero elements.
coconut/src/signature/ps_signature.rs:118
↓ 102 callers
Method
validate
Sanity check to ensure the proof spec is valid. This should never error as these are used by same entity creating them.
proof_system/src/proof_spec.rs:138
↓ 98 callers
Method
add_witness_equality
(&mut self, item: EqualWitnesses)
proof_system/src/meta_statement.rs:83
↓ 85 callers
Method
as_ref
Borrows `OwnedPairs` as `Pairs.`
utils/src/owned_pairs.rs:47
↓ 85 callers
Method
mul
(self, rhs: &G::ScalarField)
utils/src/msm.rs:50
↓ 84 callers
Method
remove
Remove an element from the accumulator and state
vb_accumulator/src/positive.rs:521
↓ 74 callers
Function
abs_path
Given path relative to this crate, return absolute disk path
legogroth16/src/circom/tests.rs:27
↓ 71 callers
Method
multiply
Multiply with a single scalar
utils/src/msm.rs:33
↓ 66 callers
Method
len
(&self)
legogroth16/src/aggregation/srs.rs:139
↓ 65 callers
Method
into_iter
(self)
coconut/src/setup/keygen/common.rs:25
↓ 61 callers
Function
n_rand
Generates an iterator of randoms producing `count` elements using the supplied `rng`.
utils/src/misc.rs:65
↓ 58 callers
Method
len
(&self)
oblivious_transfer/src/base_ot/simplest_ot.rs:118
↓ 57 callers
Function
new_merlin_transcript
must be specific to the application.
utils/src/transcript.rs:17
↓ 50 callers
Method
len
(&self)
proof_system/src/witness.rs:317
↓ 49 callers
Method
is_empty
Returns `true` if no pairs exists.
utils/src/pairs.rs:106
↓ 41 callers
Method
add_multiple_sources_and_target
Add a sequence of group elements whose pairing product must be equal to the given target field element, i.e. `\prod_{i}(e(a_i, b_i)) = out`
utils/src/randomized_pairing_check.rs:81
↓ 41 callers
Method
commit
Pedersen commitment to the set member, `g * member + h * randomness`
smc_range_proof/src/common.rs:42
↓ 40 callers
Method
len
(&self)
legogroth16/src/circom/r1cs.rs:14
↓ 36 callers
Method
eval
(&self, x: &[Fr])
compressed_sigma/src/amortized_linear_form.rs:261
↓ 34 callers
Method
challenge_scalar
(&mut self, label: &'static [u8])
utils/src/transcript.rs:101
↓ 34 callers
Method
len
(&self)
oblivious_transfer/src/ot_extensions/kos_ote.rs:359
↓ 32 callers
Method
get_membership_witness
( &self, member: &G::ScalarField, sk: &SecretKey<G::ScalarField>, mem_state: &
vb_accumulator/src/kb_universal_accumulator/accumulator.rs:183
↓ 31 callers
Method
add_batch
Add a batch of members in the accumulator
vb_accumulator/src/positive.rs:501
↓ 30 callers
Method
gen_proof
Generate proof. Post-challenge phase of the protocol.
bbs_plus/src/proof.rs:273
↓ 30 callers
Method
verify_proof_contribution
Verify that the snark proof is valid, the commitment in the ciphertext is correct, the commitment to the chunks and the combined message are equal, th
proof_system/src/sub_protocols/saver.rs:246
↓ 29 callers
Method
next
Computes the next state by looking at the counter of the current state Writes the next counters into bytes over the u8 state array
oblivious_transfer/src/aes_prng.rs:107
↓ 29 callers
Method
verify
Verify the signature given all messages and corresponding set commitments.
delegatable_credentials/src/msbm/sps_eq_uc_sig.rs:347
↓ 28 callers
Method
append_message
Append a prover's `message` to the transcript. The `label` parameter is metadata about the message, and is also appended to the transcript. See the
merlin/src/transcript.rs:101
↓ 27 callers
Function
decompose
Given an element `F`, break it into chunks where each chunk is of `chunk_bit_size` bits. This is essentially an n-ary representation where n is `chunk
saver/src/utils.rs:17
↓ 27 callers
Method
get_params
( &'a self, setup_params: &'a [SetupParams<E>], st_idx: usize, )
proof_system/src/statement/bbdt16_kvac.rs:61
↓ 27 callers
Method
value
(&self)
vb_accumulator/src/kb_positive_accumulator/adaptive_accumulator.rs:231
↓ 26 callers
Method
gen_proof_contribution
Generate responses for the 3 Schnorr protocols
proof_system/src/sub_protocols/saver.rs:211
↓ 26 callers
Method
size
(&self)
delegatable_credentials/src/mercurial_sig.rs:117
↓ 25 callers
Method
add_2
Add a check of the form `p1 * s1 + p2 * s2 = t`. Converts it to `p1 * s1 * r + p2 * s2 * r - t * r = 0` where `r` is the current randomness.
utils/src/randomized_mult_checker.rs:53
↓ 25 callers
Method
evaluate
Inner product of powers of `y`, i.e. the element for which witness needs to be updated and `omega`. Equivalent to evaluating the polynomial at `y` and
vb_accumulator/src/batch_utils.rs:664
↓ 24 callers
Function
get_resp_for_message
()
coconut/src/proof/signature_pok/mod.rs:394
↓ 24 callers
Method
mem_value
(&self)
vb_accumulator/src/kb_universal_accumulator/accumulator.rs:248
↓ 24 callers
Method
non_mem_value
(&self)
vb_accumulator/src/kb_universal_accumulator/accumulator.rs:252
↓ 24 callers
Method
set_private
Set a private input signal. Ensure that this function is called for signals in the same order as they are declared in the circuit.
proof_system/src/witness.rs:419
↓ 23 callers
Method
add_3
Add a check of the form `p1 * s1 + p2 * s2 + p3 * s3 = t`. Converts it to `p1 * s1 * r + p2 * s2 * r + p3 * s3 * r - t * r = 0` where `r` is the curre
utils/src/randomized_mult_checker.rs:61
↓ 23 callers
Function
check
( rng: &mut StdRng, m: u16, n: u16, choices: Vec<u16>,
oblivious_transfer/src/base_ot/naor_pinkas_ot.rs:252
↓ 23 callers
Function
check
( rng: &mut StdRng, m: u16, n: u16, choices: Vec<u16>,
oblivious_transfer/src/base_ot/naor_pinkas_ot_without_ro.rs:193
↓ 23 callers
Method
get_public_key
Get public key for the statement index `s_idx` either from `self` or from given `setup_params`.
proof_system/src/statement/ps_signature.rs:81
↓ 22 callers
Function
set_circuit_wires
( circuit: &mut CircomCircuit<E>, wasm_file_path: &str, inputs: I, )
legogroth16/src/circom/circuit.rs:192
↓ 21 callers
Function
basic_checks
Some basic checks that should be true for all supported circuits
legogroth16/src/circom/r1cs_reader.rs:252
↓ 21 callers
Method
finish
Finished tracking derived params, return map of statement to derived params
proof_system/src/derived_params.rs:99
↓ 21 callers
Method
meta_ad
(&mut self, data: &[u8], more: bool)
merlin/src/strobe.rs:89
↓ 21 callers
Method
num_base_ot
(&self)
oblivious_transfer/src/ot_based_multiplication/dkls18_mul_2p.rs:61
↓ 21 callers
Method
on_new_statement_idx
Creates a new derived param for the statement index if need be else store the reference to old parameter.
proof_system/src/derived_params.rs:86
↓ 21 callers
Method
verify_membership
( &self, member: &G::ScalarField, witness: &KBPositiveAccumulatorWitness<E>, p
vb_accumulator/src/kb_positive_accumulator/adaptive_accumulator.rs:212
↓ 21 callers
Function
xor
(a: &[u8], b: &[u8])
oblivious_transfer/src/util.rs:9
↓ 20 callers
Method
as_ref
(&self)
kvac/src/bbdt_2016/setup.rs:168
↓ 20 callers
Method
challenge_contribution
(&self, writer: W)
proof_system/src/sub_protocols/mod.rs:147
↓ 20 callers
Method
fill_bytes
Fills in an array of bytes with randomness
oblivious_transfer/src/aes_prng.rs:185
↓ 20 callers
Method
get_response
Get response for the specified discrete log
schnorr_pok/src/partial.rs:200
↓ 20 callers
Function
inner_product
Inner product of 2 vectors `a` and `b`
utils/src/ff.rs:21
↓ 20 callers
Function
prove_and_verify_circuit
( circuit: CircomCircuit<E>, params: &ProvingKey<E>, commit_witness_count: u32, )
legogroth16/src/circom/tests.rs:53
↓ 20 callers
Function
setup_positive_accum
Setup a positive accumulator, its keys, params and state for testing.
vb_accumulator/src/positive.rs:595
↓ 19 callers
Method
add_sources
Add 2 group elements whose pairing should be equal to the pairing of another 2 given group elements, i.e. `e(a, b) = e(c, d)`
utils/src/randomized_pairing_check.rs:104
↓ 19 callers
Function
multiply_field_elems_with_same_group_elem
The same group element is multiplied by each in `elements` using a window table
utils/src/msm.rs:56
↓ 19 callers
Method
verify
Verify the `Proof` given the `ProofSpec`, `nonce` and `config`
proof_system/src/verifier.rs:128
↓ 18 callers
Method
add
Add an element to the accumulator and state
vb_accumulator/src/positive.rs:481
↓ 18 callers
Method
add_1
Add a check of the form `p * s = t`. Converts it to `p * s * r - t * r = 0` where `r` is the current randomness.
utils/src/randomized_mult_checker.rs:46
↓ 18 callers
Function
check_compression
(size: u32)
compressed_sigma/src/compressed_homomorphism.rs:421
↓ 18 callers
Method
get_non_membership_witness
Get non-membership witness for an element absent from accumulator. Described in section 2 of the paper
vb_accumulator/src/universal.rs:446
↓ 18 callers
Method
len
(&self)
oblivious_transfer/src/ot_based_multiplication/dkls19_batch_mul_2p.rs:422
↓ 18 callers
Function
powers
Powers of a finite field as `[1, s, s^2, .. s^{num-1}]`
utils/src/ff.rs:76
↓ 18 callers
Method
value
(&self)
vb_accumulator/src/positive.rs:448
↓ 18 callers
Function
verify_proof
Verify a LegoGroth16 proof `proof` against the prepared verification key `pvk`
legogroth16/src/verifier.rs:87
↓ 17 callers
Function
check_hom
(n: usize, known_indices: BTreeSet<usize>)
compressed_sigma/src/partial_knowledge.rs:417
↓ 17 callers
Function
check_partial_know_single
(n: usize, known_indices: BTreeSet<usize>)
compressed_sigma/src/partial_knowledge.rs:476
↓ 17 callers
Function
is_multiple_of_8
(n: T)
oblivious_transfer/src/util.rs:58
↓ 17 callers
Method
len
(&self)
proof_system/src/statement/mod.rs:162
↓ 17 callers
Method
remove_batch
Removing a batch of members from the accumulator
vb_accumulator/src/positive.rs:541
↓ 17 callers
Method
zeroize
(&mut self)
utils/src/owned_pairs.rs:302
↓ 16 callers
Function
bbs_plus_sig_setup
( rng: &mut R, message_count: u32, )
test_utils/src/bbs.rs:7
↓ 16 callers
Method
get_proving_key
( &'a self, setup_params: &'a [SetupParams<E>], st_idx: usize, )
proof_system/src/statement/r1cs_legogroth16.rs:129
↓ 16 callers
Method
is_empty
(&self)
proof_system/src/witness.rs:313
↓ 16 callers
Method
supported_message_count
Returns max amount of messages supported by this secret key.
coconut/src/setup/keypair/secret.rs:73
↓ 15 callers
Function
get_gs_for_encryption
These parameters are needed for setting up keys for encryption/decryption
saver/src/saver_groth16.rs:47
↓ 15 callers
Method
get_membership_witnesses_for_batch
( &self, members: &[G::ScalarField], sk: &SecretKey<G::ScalarField>, mem_state
vb_accumulator/src/kb_universal_accumulator/accumulator.rs:194
↓ 15 callers
Method
set_label
(&mut self, label: &'static [u8])
utils/src/transcript.rs:36
↓ 15 callers
Function
verify_witness_commitment
Given the proof, verify that the commitment in it (`proof.d`) commits to the witness.
legogroth16/src/prover.rs:437
↓ 14 callers
Method
add
Add an element to the accumulator updating both the internal accumulators.
vb_accumulator/src/kb_universal_accumulator/accumulator.rs:76
↓ 14 callers
Method
b
Compute `b = A*{e+x}` `indexed_messages_sorted_by_index` must produce items sorted by unique indices, otherwise, an error will be returned. Commits to
kvac/src/bbdt_2016/setup.rs:117
↓ 14 callers
Method
batch_size
(&self)
verifiable_encryption/src/tz_21/encryption.rs:102
↓ 14 callers
Function
check
(file: &R1CSFile<E>, curve_type: Curve)
legogroth16/src/circom/r1cs_reader.rs:389
↓ 14 callers
Method
init
Encrypt the message and create proof using SAVER. Then initialize 3 Schnorr proof of knowledge protocols
proof_system/src/sub_protocols/saver.rs:111
next →
1–100 of 2,782, ranked by callers