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
↓ 8 callers
Method
scale
(&self, _scalar: &Fr)
compressed_sigma/src/amortized_linear_form.rs:265
↓ 8 callers
Function
setup_universal_accum
Setup a universal accumulator, its keys, params and state for testing.
vb_accumulator/src/universal.rs:697
↓ 8 callers
Method
specialize
specializes returns the prover and verifier SRS for a specific number of proofs to aggregate. The number of proofs MUST BE a power of two, it panics o
legogroth16/src/aggregation/srs.rs:218
↓ 8 callers
Function
structured_generators_scalar_power
( num: usize, g: &G, s: &G::ScalarField, )
legogroth16/src/aggregation/srs.rs:394
↓ 8 callers
Function
transpose
(input: &[u8], nrows: usize, ncols: usize)
oblivious_transfer/src/util.rs:243
↓ 8 callers
Method
unblind
Prior to verification, the signature needs to be unblinded using the blindings used in the commitments. Blindings must be provided along with the indi
coconut/src/signature/blind_signature.rs:119
↓ 8 callers
Method
update
Update accumulator on share sent by another party. If the share verifies, stores it.
secret_sharing_and_dkg/src/common.rs:325
↓ 8 callers
Method
verify
Verify if the proof is valid. Assumes that the public key and parameters have been validated already.
bbs_plus/src/proof_23.rs:252
↓ 8 callers
Function
xor_in_place
(a: &mut [u8], b: &[u8])
oblivious_transfer/src/util.rs:25
↓ 7 callers
Method
add_sources_and_target
Add single elements from source and target groups
utils/src/randomized_pairing_check.rs:61
↓ 7 callers
Method
challenge_contribution
(&self, mut writer: W)
vb_accumulator/src/proofs.rs:408
↓ 7 callers
Method
commit_to_messages
Commit to given messages using the parameters and the given blinding as a Pedersen commitment. `indexed_messages_sorted_by_index` must produce items s
kvac/src/bbdt_2016/setup.rs:92
↓ 7 callers
Function
compress
compress is similar to commit::{V,W}KEY::compress: it modifies the `vec` vector by setting the value at index $i:0 -> split$ $vec[i] = vec[i] + vec[i
legogroth16/src/aggregation/utils.rs:34
↓ 7 callers
Function
find_l_for_arbitrary_range
Returns the number of digits, `l`, needed to represent `max - min` in base `base` and satisfy `max - min < base^l`
smc_range_proof/src/ccs_range_proof/util.rs:70
↓ 7 callers
Method
generate_proving_key
Does the zk-SNARK setup and returns the proving key. `commit_witness_count` is the number of private inputs wires that should be committed in the Pede
legogroth16/src/circom/circuit.rs:46
↓ 7 callers
Method
has
(&self, element: &T)
vb_accumulator/src/persistence.rs:65
↓ 7 callers
Method
is_valid
Check that all group elements are non-zero (returns false if any element is zero). A verifier on receiving these parameters must first check that they
bbs_plus/src/setup.rs:525
↓ 7 callers
Function
prepare_verifying_key
Prepare the verifying key `vk` for use in proof verification.
legogroth16/src/verifier.rs:18
↓ 7 callers
Method
prf
(&mut self, data: &mut [u8], more: bool)
merlin/src/strobe.rs:99
↓ 7 callers
Function
setup
( rng: &mut StdRng, max_attributes: u32, )
delegatable_credentials/src/msbm/issuance.rs:516
↓ 7 callers
Function
split_messages_and_blindings
TODO: Document this
utils/src/signature.rs:35
↓ 7 callers
Method
update_using_public_info_after_multiple_batch_updates
Compute an update to the witness after adding and removing several batches of elements from the accumulator. Expects the update-info (`Omega`) publish
vb_accumulator/src/witness.rs:601
↓ 7 callers
Method
value
(&self)
vb_accumulator/src/kb_positive_accumulator/non_adaptive_accumulator.rs:26
↓ 7 callers
Method
verify
( &self, messages: &[E::G1Affine], public_key: impl Into<PreparedPublicKey<E>>,
delegatable_credentials/src/mercurial_sig.rs:308
↓ 6 callers
Method
_verify
( &self, challenge: &E::ScalarField, disclosed_attributes: Vec<E::ScalarField>,
delegatable_credentials/src/protego/show/known_signer.rs:505
↓ 6 callers
Method
add
Add an element to the accumulator and state. Reads and writes to state. Described in section 2 of the paper
vb_accumulator/src/universal.rs:250
↓ 6 callers
Method
add_using_trapdoor
(&mut self, additions: &[E::ScalarField], trapdoor: &E::ScalarField)
delegatable_credentials/src/accumulator.rs:84
↓ 6 callers
Function
add_vecs
Add two vectors of scalars
utils/src/ff.rs:37
↓ 6 callers
Function
bbdt16_mac_setup
( rng: &mut R, message_count: u32, )
test_utils/src/kvac.rs:9
↓ 6 callers
Method
call_func
Call the function with given name and args
legogroth16/src/circom/wasm.rs:121
↓ 6 callers
Method
challenge_bytes
(&mut self, label: &'static [u8], dest: &mut [u8])
utils/src/transcript.rs:92
↓ 6 callers
Method
challenge_contribution
The commitment's contribution to the overall challenge of the protocol.
coconut/src/proof/signature_pok/mod.rs:92
↓ 6 callers
Method
challenge_contribution
( &self, commitment: &E::G1Affine, comm_key: &MemberCommitmentKey<E::G1Affine>,
smc_range_proof/src/cls_range_proof/range_proof_cdh.rs:134
↓ 6 callers
Method
challenge_contribution_for_public_inequality
( &self, commitment: &G, inequal_to: &G::ScalarField, comm_key: &PedersenCommi
schnorr_pok/src/inequality.rs:142
↓ 6 callers
Function
check
( rng: &mut StdRng, ote_params: MultiplicationOTEParams<KAPPA, STATISTICAL_SECURITY_PA
bbs_plus/src/threshold/threshold_bbs_plus.rs:246
↓ 6 callers
Function
check
(chunk_bit_size: u8)
saver/src/commitment.rs:172
↓ 6 callers
Function
check
(chunk_bit_size: u8)
saver/src/saver_groth16.rs:290
↓ 6 callers
Function
check
( rng: &mut StdRng, ote_params: MultiplicationOTEParams<KAPPA, STATISTICAL_SECURITY_PA
oblivious_transfer/src/ot_based_multiplication/batch_mul_multi_party.rs:270
↓ 6 callers
Method
commitment_key
Commitment key (vector of all `g`s and `h`) for the chunked commitment Given a group element `g`, create `chunks_count` multiples of `g` as `g_n, g_{n
saver/src/commitment.rs:81
↓ 6 callers
Method
commitment_to_secret
The constant coefficient is the secret and thus returns the commitment to that.
secret_sharing_and_dkg/src/common.rs:123
↓ 6 callers
Function
encode_usize_as_u32
(x: usize)
merlin/src/transcript.rs:18
↓ 6 callers
Function
find_l_for_perfect_range
Returns the number of digits, `l`, needed to represent `max` in base `base`, i.e. `l = log_{base} max`. `l` should satisfy `base^l = max`
smc_range_proof/src/ccs_range_proof/util.rs:81
↓ 6 callers
Method
gen_proof
Generate proof. Post-challenge phase of the protocol.
coconut/src/proof/signature_pok/mod.rs:108
↓ 6 callers
Method
gen_proof
(mut self, challenge: &G::ScalarField)
kvac/src/bbs_sharp/proof.rs:258
↓ 6 callers
Method
gen_proof
( mut self, challenge: &E::ScalarField, )
short_group_sig/src/bb_sig_pok.rs:226
↓ 6 callers
Function
get_member_counts
(batch_size: u32)
benches/benches/accum_witness_updates.rs:18
↓ 6 callers
Method
get_non_membership_witness
( &self, non_member: &G::ScalarField, sk: &SecretKey<G::ScalarField>, non_mem_
vb_accumulator/src/kb_universal_accumulator/accumulator.rs:205
↓ 6 callers
Method
get_params_and_comm_key
( &'a self, setup_params: &'a [SetupParams<E>], st_idx: usize, )
proof_system/src/statement/bound_check_smc.rs:109
↓ 6 callers
Function
get_r1cs_and_wasm_bytes
( r1cs_file_path: &str, wasm_file_path: &str, commit_witness_count: u32, rng: &mut R, )
proof_system/tests/r1cs/mod.rs:23
↓ 6 callers
Method
get_verifying_key
( &'a self, setup_params: &'a [SetupParams<E>], st_idx: usize, )
proof_system/src/statement/r1cs_legogroth16.rs:185
↓ 6 callers
Method
has_wit_ref
(&self, wit_ref: &WitnessRef)
proof_system/src/meta_statement.rs:68
↓ 6 callers
Method
is_valid
( &self, g: &[G], h: &G, max_size: u32, commitments: &[G], y:
compressed_sigma/src/amortized_linear_form.rs:96
↓ 6 callers
Function
polynomial_evaluation_product_form_from_transcript
It returns the evaluation of the polynomial $\prod (1 + x_{l-j}(rX)^{2j}$ at the point z, where transcript contains the reversed order of all challeng
legogroth16/src/aggregation/kzg.rs:233
↓ 6 callers
Function
rerandomize_proof_1
A similar technique to re-randomize proof as in `rerandomize_proof` but it still keeps `proof.D` a commitment to witnesses. See comments of `rerandomi
legogroth16/src/prover.rs:512
↓ 6 callers
Method
response
( &self, witnesses: Vec<&[G::ScalarField]>, gammas: &[G::ScalarField], challen
compressed_sigma/src/amortized_linear_form.rs:70
↓ 6 callers
Function
rev_vec
(v: &[T])
utils/src/randomized_pairing_check.rs:228
↓ 6 callers
Method
set_public
(&mut self, name: String, value: Vec<E::ScalarField>)
proof_system/src/witness.rs:410
↓ 6 callers
Function
setup_kb_universal_accum
( rng: &mut StdRng, size: usize, )
vb_accumulator/src/kb_universal_accumulator/accumulator.rs:463
↓ 6 callers
Method
supported_message_count
(&self)
kvac/src/bbdt_2016/setup.rs:138
↓ 6 callers
Method
unblind
Used to unblind a blinded MAC from signer
kvac/src/bbdt_2016/mac.rs:157
↓ 6 callers
Method
value
(&self)
vb_accumulator/src/universal.rs:119
↓ 6 callers
Method
verify
Executed by each participant to verify its share received from the dealer. Also, should be called by the "reconstructor" to verify that each of the sh
secret_sharing_and_dkg/src/feldman_vss.rs:76
↓ 6 callers
Method
verify
( &self, subset: BTreeSet<E::ScalarField>, set_commitment: &SetCommitment<E>,
delegatable_credentials/src/set_commitment.rs:393
↓ 6 callers
Method
verify
( &self, message: &E::ScalarField, pk: &PublicKeyG2<E>, params: &SignaturePara
short_group_sig/src/bb_sig.rs:129
↓ 6 callers
Function
verify_aggregate_proof
Verifies the aggregated proofs thanks to the Groth16 verifying key, the verifier SRS from the aggregation scheme, all the public inputs of the proofs
legogroth16/src/aggregation/groth16/verifier.rs:48
↓ 6 callers
Method
verify_common
Verify Schnorr proofs and proof of knowledge of public key if designated verifier proof
kvac/src/bbs_sharp/proof.rs:547
↓ 5 callers
Method
add
( &self, element: G::ScalarField, state: &mut dyn State<G::ScalarField>, )
vb_accumulator/src/kb_positive_accumulator/non_adaptive_accumulator.rs:41
↓ 5 callers
Method
add_batch
( &self, elements: Vec<G::ScalarField>, sk: &SecretKey<G::ScalarField>, mem_st
vb_accumulator/src/kb_universal_accumulator/accumulator.rs:105
↓ 5 callers
Method
as_mut_bytes
Unsafe method which converts from a Block128x8 to a mutable u8 array
oblivious_transfer/src/aes_prng.rs:89
↓ 5 callers
Method
as_ref
(&self)
vb_accumulator/src/universal.rs:113
↓ 5 callers
Method
b
Used to create whats called `B` in the paper. `B = g_0 + user_public_key + \sum_i{g_i * m_i}`
kvac/src/bbs_sharp/setup.rs:126
↓ 5 callers
Function
base_bits
Number of bits in `base`
bulletproofs_plus_plus/src/util.rs:2
↓ 5 callers
Function
boolvec_to_u8vec
(bv: &[bool])
oblivious_transfer/src/util.rs:223
↓ 5 callers
Method
challenge_contribution
Get the contribution of this protocol towards the challenge, i.e. bytecode of items that will be hashed
bbs_plus/src/proof.rs:254
↓ 5 callers
Method
challenge_contribution
(&self, mut writer: W)
equality_across_groups/src/pok_ecdsa_pubkey.rs:183
↓ 5 callers
Function
check
( rng: &mut R, set_size: u32, pp: &SetCommitmentSRS<Bls12_381>,
delegatable_credentials/src/set_commitment.rs:742
↓ 5 callers
Function
check
(rng: &mut StdRng, batch_size: u32, num_parties: u16)
oblivious_transfer/src/zero_sharing.rs:178
↓ 5 callers
Function
check_compression
(size: u32)
compressed_sigma/src/compressed_linear_form.rs:434
↓ 5 callers
Function
create_proof
`r` is the randomness used during the encryption
saver/src/saver_groth16.rs:83
↓ 5 callers
Function
deal_random_secret
Generate a random secret with its shares according to Shamir secret sharing. At least `threshold` number of shares are needed to reconstruct the secre
secret_sharing_and_dkg/src/shamir_ss.rs:18
↓ 5 callers
Function
decrypt_and_verify
( proof: &Proof<Bls12_381>, stmt_idx: usize, snark_vk: &VerifyingKey<Bls12_381>, decrypted: Fr
proof_system/tests/verifiable_encryption_saver.rs:47
↓ 5 callers
Method
gen_partial_proof_contribution
( &mut self, challenge: &G::ScalarField, skip_responses_for: &BTreeSet<usize>, )
proof_system/src/sub_protocols/schnorr.rs:109
↓ 5 callers
Method
gen_proof
( mut self, challenge: &G::ScalarField, )
vb_accumulator/src/proofs_keyed_verification.rs:315
↓ 5 callers
Method
gen_proof
(mut self, challenge: &G::ScalarField)
schnorr_pok/src/inequality.rs:180
↓ 5 callers
Method
gen_proof
(self, challenge: &G::ScalarField)
schnorr_pok/src/mult_relations.rs:177
↓ 5 callers
Method
generate_constraints
( self, cs: ConstraintSystemRef<E::ScalarField>, )
legogroth16/src/circom/circuit.rs:85
↓ 5 callers
Method
get_encryption_key
( &'a self, setup_params: &'a [SetupParams<E>], st_idx: usize, )
proof_system/src/statement/saver.rs:124
↓ 5 callers
Method
get_membership_witness
Get membership witness for an element present in accumulator. Described in section 2 of the paper
vb_accumulator/src/positive.rs:356
↓ 5 callers
Method
get_non_membership_witnesses_for_batch
Get non-membership witnesses for multiple elements absent in accumulator. Returns witnesses in the order of passed elements. It is more efficient than
vb_accumulator/src/universal.rs:540
↓ 5 callers
Method
get_resp_for_message
Get the response from post-challenge phase of the Schnorr protocol for the given message index `msg_idx`. Used when comparing message equality
bbs_plus/src/proof.rs:447
↓ 5 callers
Method
get_u32
Call the function with given name and return the result as a u32.
legogroth16/src/circom/wasm.rs:104
↓ 5 callers
Method
get_updated
Update the accumulated values with the given ones
vb_accumulator/src/universal.rs:230
↓ 5 callers
Function
hadamard_product
Hadamard product of two vectors of scalars
utils/src/ff.rs:29
↓ 5 callers
Method
is_element_acceptable
TODO: What is an attacker figures out a way to keep on querying the accumulator manager for acceptable elements. Like submitting add or remove request
vb_accumulator/src/universal.rs:221
↓ 5 callers
Method
len
Returns underlying length.
utils/src/owned_pairs.rs:52
↓ 5 callers
Function
msg_index_to_schnorr_response_index
( msg_idx: usize, revealed_msg_ids: &BTreeSet<usize>, )
utils/src/signature.rs:101
↓ 5 callers
Method
msm
`G::Group::msm_unchecked(left, right)`
utils/src/pairs.rs:145
↓ 5 callers
Method
open_subset_unchecked
Returns witness for the given subset of a set which is committed in this commitment
delegatable_credentials/src/set_commitment.rs:321
↓ 5 callers
Function
poly_from_roots
Create a polynomial from given `roots` as `(x-roots[0])*(x-roots[1])*(x-roots[2])*..`
utils/src/poly.rs:59
↓ 5 callers
Function
powers_starting_from
Powers of a finite field as `[start, start*exp, start * exp^2, .. start * exp^{num-1}]`
utils/src/ff.rs:88
← previous
next →
201–300 of 2,782, ranked by callers