MCPcopy Create free account

hub / github.com/Godspower-Eze/learn-cryptography-and-zk / functions

Functions275 in github.com/Godspower-Eze/learn-cryptography-and-zk

↓ 22 callersMethodscalar_multiplication
A=zG computed using the double and add algorithm (https://www.youtube.com/watch?v=5ITRACsmCvQ). Where z is the multiple and G is the
with_python/utils/ecc.py:157
↓ 20 callersFunctionpow
()
with_rust/ff/src/lib.rs:400
↓ 13 callersFunctiongenerate_random_prime
(min: int, max: int)
with_python/utils/number_theory.py:53
↓ 10 callersMethodidentity
()
with_python/utils/ecc/bandersnatch/curve.py:207
↓ 10 callersMethodright_rotate
(n: int, b: int)
with_python/commitments/hashing/sha2/sha512.py:42
↓ 10 callersMethodright_rotate
(n: int, b: int)
with_python/commitments/hashing/sha2/sha256.py:101
↓ 9 callersMethodpow
(&self, mut n: usize)
with_rust/ff/src/lib.rs:62
↓ 7 callersMethod_check_all_integers_same_modulus
(self, a: 'Field', b: 'Field')
with_python/utils/fields.py:173
↓ 7 callersMethodinv
(self, a: 'Field')
with_python/utils/fields.py:91
↓ 7 callersMethodpoint_addition
(self, a: tuple[int, int] | str, b: tuple[int, int] | str)
with_python/utils/ecc.py:108
↓ 6 callersMethodcommit
(self, m: int, q: int, g: int, h: int)
with_python/commitments/pedcomm_mod.py:71
↓ 6 callersMethodcommit
(self, m: int, q: int, g: tuple[int, int], h: tuple[int, int])
with_python/commitments/pedcomm_ecc.py:48
↓ 6 callersMethodone
()
with_python/utils/ecc/bandersnatch/fields.py:36
↓ 5 callersMethodadd
Formula: (x1, y1) + (x2, y2) = (((x1 * y2) + (y1 * x2)/(1 + D * x1 * x2 * y1 * y2)) , ((y1 * y2) - (A * x1 * x2)/(1 - D * x1 * x
with_python/utils/ecc/bandersnatch/curve.py:55
↓ 5 callersMethodexp
(self, a: 'Field', exponent: int)
with_python/utils/fields.py:125
↓ 5 callersFunctiongcd_by_eea
Computes the gcd and reverses the process to express the gcd as a linear combination in the form ax + by = gcd(a, b). The Extended Eucli
with_python/utils/number_theory.py:17
↓ 5 callersMethodis_on_curve
We check if a point is on the curve using the condition: y**2 mod p == (x**3 + ax + b) mod p
with_python/utils/ecc.py:61
↓ 5 callersMethodis_zero
(&self)
with_rust/poly/src/lib.rs:58
↓ 5 callersMethodis_zero
Identity is {x=0, y=1, t = 0, z =1} The equivalence class is therefore is {x=0, y=k, t = 0, z=k} for all k where k!=0
with_python/utils/ecc/bandersnatch/curve.py:297
↓ 4 callersMethodcompute
(self, secret_key: bytes, message: bytes)
with_python/mac/hmac.py:67
↓ 4 callersFunctionmultiplicative_inverse
(a: isize, b: isize)
with_rust/ff/src/lib.rs:111
↓ 4 callersFunctionsha3_hash
(message: bytes, rate: int)
with_python/commitments/hashing/sha3/utils.py:251
↓ 3 callersMethod__encrypted_product__
(self, values: list[int])
with_python/commitments/polynomials/basic_polynomial_comm_using_mod.py:153
↓ 3 callersMethod__encrypted_summation__
(self, values: list[tuple[int, int]])
with_python/commitments/polynomials/basic_polynomial_comm_using_ecc.py:25
↓ 3 callersMethoddegree
(&self)
with_rust/poly/src/lib.rs:63
↓ 3 callersFunctiongcd_by_ea
Computes the GCD of a and b using the Euclidean Algorithm
with_python/utils/number_theory.py:4
↓ 3 callersMethodgenerate_key_pair
Generates a random private-public key pair
with_python/utils/ecc.py:187
↓ 3 callersMethodgenerator
()
with_python/utils/ecc/bandersnatch/curve.py:45
↓ 3 callersFunctionhash_value
(H_A, message)
with_python/mac/hmac.py:14
↓ 3 callersMethodleft_rotate
(n: int, b: int)
with_python/commitments/hashing/sha1.py:97
↓ 3 callersFunctionlegendre_symbol
Compute the Legendre symbol a|p using Euler's criterion. p is a prime, a is relatively prime to p (if p divides a, then a|p =
with_python/utils/fields.py:260
↓ 3 callersMethodlexographically_largest
(self)
with_python/utils/ecc/bandersnatch/fields.py:48
↓ 3 callersMethodsplit_into_blocks
(self, padded_message: bytes)
with_python/commitments/hashing/sha1.py:107
↓ 3 callersMethodzero
(modulus)
with_python/utils/fields.py:17
↓ 3 callersMethodzero
()
with_python/utils/ecc/bandersnatch/fields.py:33
↓ 2 callersMethod__init__
(self, value=None, generic_field=None)
with_python/utils/ecc/bandersnatch/fields.py:25
↓ 2 callersMethod_partition_word
(self, _length: int, _word: str, _partitioned_words: list)
with_python/ciphers/polyaphabetic_cipher.py:77
↓ 2 callersMethod_shift
(self, _num_of_shifts: int)
with_python/ciphers/xor_and_one_time_pad.py:81
↓ 2 callersMethod_xor
(self, letter_numbers: list[int], random_numbers: list[int])
with_python/ciphers/xor_and_one_time_pad.py:69
↓ 2 callersMethodadd
(self, p, q)
with_python/utils/ecc/bandersnatch/curve.py:319
↓ 2 callersMethodcompute_public_key
(self, private_key: int)
with_python/key_exchange/diffie_hellman.py:42
↓ 2 callersMethodcompute_shared_secret
(self, private_key: int, public_key: int)
with_python/key_exchange/diffie_hellman.py:45
↓ 2 callersMethoddouble
Formula: 2(x1, y1) = ((2(x1 * y1)) / ((y1 ** 2) + (A(x1 ** 2))) , ((((y1 ** 2) - A(x1 ** 2)) / (2 - (y1 ** 2) - A(x1 ** 2))))
with_python/utils/ecc/bandersnatch/curve.py:103
↓ 2 callersMethoddup
(self)
with_python/utils/ecc/bandersnatch/curve.py:181
↓ 2 callersMethodevaluate
(&self, var: F)
with_rust/poly/src/lib.rs:75
↓ 2 callersMethodf2
(self, b: int, c: int, d: int)
with_python/commitments/hashing/sha1.py:84
↓ 2 callersMethodfrom_bytes
Return None if the bytes are not in canonical form. Canonical here means that the integer representation of the bytes must be
with_python/utils/fields.py:38
↓ 2 callersMethodis_constant
(self, constant: int)
with_python/utils/fields.py:23
↓ 2 callersMethodis_prime
(self, num: int)
with_python/rsa.py:42
↓ 2 callersFunctionleft_rotate
(n: int, b: int)
with_python/commitments/hashing/sha3/utils.py:168
↓ 2 callersMethodlegendre
(self)
with_python/utils/fields.py:130
↓ 2 callersMethodmul
(self, a: 'Field', b: 'Field')
with_python/utils/fields.py:79
↓ 2 callersMethodneg
(self, a: 'Field')
with_python/utils/fields.py:74
↓ 2 callersMethodneg
(self, p: 'BandersnatchAffinePoint')
with_python/utils/ecc/bandersnatch/curve.py:51
↓ 2 callersMethodopen
(self, m_i: int, c: int, *r_i)
with_python/commitments/pedcomm_mod.py:76
↓ 2 callersMethodopen
(self, m_i: int, c: int, *r_i)
with_python/commitments/pedcomm_ecc.py:56
↓ 2 callersMethodpad
(self, message: bytes)
with_python/commitments/hashing/sha2/sha512.py:49
↓ 2 callersMethodphi_of_n
The phi of any prime number p is p - 1. To find the phi of n where n is a product of two primes p, q can be computed as (ɸ(n) = ɸ(p)
with_python/rsa.py:62
↓ 2 callersMethodscalar_mul
Using Double and Add : https://en.wikipedia.org/wiki/Elliptic_curve_point_multiplication#Double-and-add
with_python/utils/ecc/bandersnatch/curve.py:184
↓ 2 callersMethodsqrt
(self, a: 'Field')
with_python/utils/fields.py:118
↓ 2 callersMethodsub
(self, p: 'BandersnatchAffinePoint', q: 'BandersnatchAffinePoint')
with_python/utils/ecc/bandersnatch/curve.py:97
↓ 2 callersFunctionxor_bytes
(a: bytes, b: bytes)
with_python/utils/operations.py:13
↓ 1 callersMethod__add__
(self, other)
with_python/utils/ecc/bandersnatch/fields.py:60
↓ 1 callersMethod__mul__
(self, other)
with_python/utils/ecc/bandersnatch/fields.py:66
↓ 1 callersMethod__neg__
(self)
with_python/utils/ecc/bandersnatch/fields.py:69
↓ 1 callersMethod__sub__
(self, other)
with_python/utils/ecc/bandersnatch/fields.py:63
↓ 1 callersMethod__truediv__
(self, other)
with_python/utils/ecc/bandersnatch/fields.py:72
↓ 1 callersMethod__unencrypted_summation__
(self, values: list[int])
with_python/commitments/polynomials/basic_polynomial_comm_using_mod.py:161
↓ 1 callersMethod__unencrypted_summation__
(self, values: list[int])
with_python/commitments/polynomials/basic_polynomial_comm_using_ecc.py:33
↓ 1 callersFunction_naive_multi_inv
(values: list[Field])
with_python/test/utils/test_fields.py:126
↓ 1 callersMethod_shift
(self, _letter: str, _num_of_shifts: int)
with_python/ciphers/polyaphabetic_cipher.py:57
↓ 1 callersMethod_shift
(self, _letter: str, _num_of_shifts: int)
with_python/ciphers/one_time_pad.py:65
↓ 1 callersMethod_unshift
(self, _letter: str, _num_of_shifts: int)
with_python/ciphers/polyaphabetic_cipher.py:67
↓ 1 callersMethod_unshift
(self, _letter: str, _num_of_shifts: int)
with_python/ciphers/one_time_pad.py:75
↓ 1 callersMethodadd
(self, a: 'Field', b: 'Field')
with_python/utils/fields.py:64
↓ 1 callersMethodadd_comm
(self, *c)
with_python/commitments/pedcomm_ecc.py:66
↓ 1 callersFunctionadd_list
(a: Vec<T>, b: Vec<T>)
with_rust/poly/src/lib.rs:168
↓ 1 callersFunctionbyte_padding
According to the spec(FIPS PUB 202), section B.2, q = (x - 8) - (m % (x / 8)) where: x is the rate m i
with_python/commitments/hashing/sha3/utils.py:54
↓ 1 callersMethodcal_padding_length
(self, length: int)
with_python/commitments/hashing/sha2/sha512.py:45
↓ 1 callersMethodcheck_knowledge_of_polynomial
( self, eval_of_h: int, eval_of_t: int, eval_of_f: int)
with_python/commitments/polynomials/basic_polynomial_comm_using_mod.py:208
↓ 1 callersMethodcheck_knowledge_of_polynomial
( self, eval_of_h: int, eval_of_t: int, eval_of_f: int)
with_python/commitments/polynomials/basic_polynomial_comm_using_ecc.py:80
↓ 1 callersMethodcheck_polynomial
(self, a: int, eval_of_f: int, eval_of_f_prime: int)
with_python/commitments/polynomials/basic_polynomial_comm_using_mod.py:204
↓ 1 callersMethodcheck_polynomial
(self, a: int, eval_of_f: int, eval_of_f_prime: int)
with_python/commitments/polynomials/basic_polynomial_comm_using_ecc.py:76
↓ 1 callersFunctionchi
(state_array: np.ndarray)
with_python/commitments/hashing/sha3/utils.py:208
↓ 1 callersMethodcompute_crs
(self, x: int, a: int, crs: ( list[int], list[int]))
with_python/commitments/polynomials/basic_trusted_setup_mod.py:82
↓ 1 callersMethodcompute_crs
(self, x: int, a: int, crs: ( list[int], list[int]))
with_python/commitments/polynomials/basic_trusted_setup_ecc.py:39
↓ 1 callersMethodcompute_r
(self, k: int)
with_python/signatures/ecdsa.py:72
↓ 1 callersMethodcompute_s
(self, r: int, k: int, m: int, d: int)
with_python/signatures/ecdsa.py:79
↓ 1 callersMethoddecrypt
To decrypt, we compute N = (c ** d mod n). N is the original message
with_python/rsa.py:124
↓ 1 callersMethoddecrypt
(self, cipher_text: str)
with_python/ciphers/caesar_cipher.py:74
↓ 1 callersMethodderive_key
(self, key: bytes)
with_python/mac/hmac.py:58
↓ 1 callersMethoddigest
(self, message: bytes)
with_python/commitments/hashing/sha1.py:118
↓ 1 callersMethoddigest
(self, message: bytes)
with_python/commitments/hashing/sha2/sha512.py:66
↓ 1 callersMethoddigest
(self, message: bytes)
with_python/commitments/hashing/sha2/sha256.py:114
↓ 1 callersMethoddigest
(self, message: bytes)
with_python/commitments/hashing/sha2/sha224.py:15
↓ 1 callersMethoddigest
(self, message: bytes)
with_python/commitments/hashing/sha2/sha384.py:18
↓ 1 callersMethoddiv
(self, a: 'Field', b: 'Field')
with_python/utils/fields.py:133
↓ 1 callersMethoddup
(self)
with_python/utils/fields.py:88
↓ 1 callersMethodencrypt
To encrypt, we compute c = m ** e mod n where m is the message, c is encrypted message and n is the modulus
with_python/rsa.py:115
↓ 1 callersMethodencrypt
(self, _word: str)
with_python/ciphers/caesar_cipher.py:59
next →1–100 of 275, ranked by callers