Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/crate-crypto/go-ipa
/ functions
Functions
304 in github.com/crate-crypto/go-ipa
⨍
Functions
304
◇
Types & classes
18
↓ 199 callers
Method
Mul
API with assembly impl Mul z = x * y mod q see https://hackmd.io/@zkteam/modular_multiplication
bandersnatch/fr/element.go:288
↓ 72 callers
Method
Equal
Equal returns z == x
bandersnatch/fr/element.go:170
↓ 59 callers
Method
FromMont
FromMont converts z in place (i.e. mutates) from Montgomery to regular representation sets and returns z = z * 1
bandersnatch/fr/element.go:302
↓ 53 callers
Method
SetUint64
SetUint64 z = v, sets z LSB to v (non-Montgomery form) and convert z to Montgomery form
bandersnatch/fr/element.go:92
↓ 47 callers
Method
Add
Add z = x + y mod q
bandersnatch/fr/element.go:308
↓ 43 callers
Method
ToBigIntRegular
ToBigIntRegular returns z as a big.Int in regular form
bandersnatch/fr/element.go:668
↓ 39 callers
Method
Cmp
Cmp compares (lexicographic order) z and x and returns: -1 if z < x 0 if z == x +1 if z > x
bandersnatch/fr/element.go:190
↓ 35 callers
Method
Add
Add sets p to p1+p2.
banderwagon/element.go:374
↓ 32 callers
Function
Modulus
Modulus returns q as a big.Int q = 13108968793781547619861935127046491459309155893440570251786403306729687672801
bandersnatch/fr/element.go:61
↓ 32 callers
Method
SetRandom
SetRandom sets z to a random element < q
bandersnatch/fr/element.go:238
↓ 29 callers
Method
Bytes
Bytes returns the compressed serialized version of the element.
banderwagon/element.go:44
↓ 29 callers
Function
madd2
madd2 hi, lo = a*b + c + d
bandersnatch/fr/arith.go:42
↓ 28 callers
Method
IsZero
IsZero returns z == 0
bandersnatch/fr/element.go:175
↓ 28 callers
Function
msmProcessChunkPointAffine
(chunk uint64, chRes chan<- PointProj, buckets []PointProj, c uint64, points []PointAffine, scalars []fr.
bandersnatch/multiexp.go:391
↓ 27 callers
Method
ToBigInt
ToBigInt returns z as a big.Int in Montgomery form
bandersnatch/fr/element.go:657
↓ 24 callers
Function
One
One returns 1 (in montgommery form)
bandersnatch/fr/element.go:263
↓ 23 callers
Method
Square
Square z = x * x mod q see https://hackmd.io/@zkteam/modular_multiplication
bandersnatch/fr/element.go:295
↓ 23 callers
Method
Sub
Sub z = x - y mod q
bandersnatch/fr/element.go:320
↓ 22 callers
Function
NewTranscript
(label string)
common/transcript.go:19
↓ 22 callers
Method
Set
Set z = x
bandersnatch/fr/element.go:98
↓ 22 callers
Method
Sub
Sub sets p to p1-p2.
banderwagon/element.go:386
↓ 22 callers
Function
gen
()
bandersnatch/fr/element_test.go:1769
↓ 20 callers
Function
partitionScalars
partitionScalars compute, for each scalars over c-bit wide windows, nbChunk digits if the digit is larger than 2^{c-1}, then, we borrow 2^c from the
bandersnatch/multiexp.go:57
↓ 19 callers
Method
Equal
Equal returns true if p and other represent the same point.
banderwagon/element.go:322
↓ 19 callers
Method
Inverse
Inverse z = x^-1 mod q Algorithm 16 in "Efficient Software-Implementation of Finite Fields with Applications to Cryptography" if x == 0, sets and retu
bandersnatch/fr/element.go:931
↓ 18 callers
Method
Neg
Neg z = q - x
bandersnatch/fr/element.go:326
↓ 17 callers
Method
ChallengeScalar
Computes a challenge based off of the state of the transcript Hash the transcript state, then reduce the hash modulo the size of the scalar field No
common/transcript.go:66
↓ 16 callers
Method
Write
Write serializes the IPA proof to the given writer.
ipa/prover.go:166
↓ 16 callers
Function
degree
(p []fr.Element)
ipa/barycentric_test.go:414
↓ 15 callers
Function
One
One returns the field element 1.
bandersnatch/fp/fp.go:14
↓ 15 callers
Function
msmReduceChunkPointAffine
msmReduceChunkPointAffine reduces the weighted sum of the buckets into the result of the multiExp
bandersnatch/multiexp.go:357
↓ 14 callers
Method
AppendScalar
Appends a Scalar to the transcript Converts the scalar to 32 bytes, then appends it to the state
common/transcript.go:40
↓ 14 callers
Method
Double
Double z = x + x mod q, aka Lsh 1
bandersnatch/fr/element.go:314
↓ 14 callers
Method
Exp
Exp z = x^exponent mod q
bandersnatch/fr/element.go:608
↓ 13 callers
Method
AppendPoint
Appends a Point to the transcript Compresses the Point into a 32 byte slice, then appends it to the state
common/transcript.go:50
↓ 13 callers
Method
SetBytes
SetBytes deserializes a compressed group element from buf. This method does all the proper checks assuming the bytes come from an untrusted source.
banderwagon/element.go:228
↓ 13 callers
Method
biggerOrEqualModulus
()
bandersnatch/fr/element_test.go:1744
↓ 12 callers
Method
Div
Div z = x*y^-1 mod q
bandersnatch/fr/element.go:152
↓ 12 callers
Function
Zero
Zero returns 0 (in montgommery form) This is not strictly needed, as the default value for u64s is zero
bandersnatch/fr/element.go:278
↓ 11 callers
Method
Commit
Commit calculates the Pedersen Commitment of a polynomial polynomial in evaluation form using the SRS.
ipa/config.go:63
↓ 11 callers
Method
Equal
Equal checks if two IPA proofs are equal.
ipa/prover.go:214
↓ 11 callers
Method
SetOne
SetOne z = 1 (in Montgomery form)
bandersnatch/fr/element.go:143
↓ 10 callers
Method
Double
Double sets p to 2*p1.
banderwagon/element.go:368
↓ 10 callers
Method
SetString
SetString creates a big.Int with s (in base 10) and calls SetBigInt on z
bandersnatch/fr/element.go:814
↓ 9 callers
Method
Set
Set sets p to p1.
banderwagon/element.go:419
↓ 9 callers
Method
SetBytes
SetBytes interprets e as the bytes of a big-endian unsigned integer, sets z to that value (in Montgomery form), and returns z.
bandersnatch/fr/element.go:706
↓ 8 callers
Function
InnerProd
InnerProd computes the inner product of a and b.
ipa/config.go:76
↓ 8 callers
Function
TestPoly256
(polynomial ...uint64)
test_helper/poly.go:11
↓ 8 callers
Method
evaluate
(point fr.Element)
ipa/barycentric_test.go:330
↓ 8 callers
Function
madd0
madd0 hi = a*b + c (discards lo bits)
bandersnatch/fr/arith.go:24
↓ 7 callers
Method
BytesLE
Bytes returns the regular (non montgomery) value of z as a little-endian byte array.
bandersnatch/fr/element.go:687
↓ 7 callers
Method
DomainSep
(label []byte)
common/transcript.go:56
↓ 7 callers
Method
Normalize
Normalize returns a point in affine form. If the point is at infinity, returns an error.
banderwagon/element.go:403
↓ 7 callers
Method
ScalarMul
ScalarMul sets p to p1*s.
banderwagon/element.go:433
↓ 7 callers
Method
SetZero
SetZero z = 0
bandersnatch/fr/element.go:134
↓ 7 callers
Method
Sqrt
Sqrt z = √x mod q if the square root doesn't exist (x is not a square mod q) Sqrt leaves z unchanged and returns nil
bandersnatch/fr/element.go:863
↓ 6 callers
Function
CreateMultiProof
CreateMultiProof creates a multi-proof for several polynomials in evaluation form. The list of triplets (C, Fs, Z) represents each polynomial commitme
multiproof.go:54
↓ 6 callers
Function
MultiExpAffine
MultiExp implements section 4 of https://eprint.iacr.org/2012/549.pdf
bandersnatch/multiexp.go:175
↓ 6 callers
Method
SetBigInt
SetBigInt sets z to v (regular form) and returns z in Montgomery form
bandersnatch/fr/element.go:762
↓ 6 callers
Function
Zero
Zero returns the field element 0.
bandersnatch/fp/fp.go:19
↓ 6 callers
Function
commit
commit commits to a polynomial using the input group elements
ipa/config.go:68
↓ 6 callers
Function
madd1
madd1 hi, lo = a*b + c
bandersnatch/fr/arith.go:33
↓ 5 callers
Method
Bytes
Bytes returns the regular (non montgomery) value of z as a big-endian byte array.
bandersnatch/fr/element.go:675
↓ 5 callers
Function
CheckMultiProof
CheckMultiProof verifies a multi-proof for several polynomials in evaluation form. The list of triplets (C, Y, Z) represents each polynomial commitmen
multiproof.go:171
↓ 5 callers
Function
MultiExp
MultiExp implements section 4 of https://eprint.iacr.org/2012/549.pdf Note: We rely on this algortithm not use Equal functionality, since it is called
bandersnatch/multiexp.go:188
↓ 5 callers
Function
_mulGeneric
Generic (no ADX instructions, no AMD64) versions of multiplication and squaring algorithms
bandersnatch/fr/element.go:333
↓ 4 callers
Function
BatchInvert
BatchInvert returns a new slice with every element inverted. Uses Montgomery batch inversion trick
bandersnatch/fr/element.go:555
↓ 4 callers
Function
BatchNormalize
BatchNormalize normalizes a slice of group elements.
banderwagon/element.go:81
↓ 4 callers
Function
CheckIPAProof
CheckIPAProof verifies an IPA proof for a committed polynomial in evaluation form. It verifies that `proof` is a valid proof for the polynomial at the
ipa/verifier.go:14
↓ 4 callers
Method
ComputeBarycentricCoefficients
ComputeBarycentricCoefficients, computes the coefficients `bary_coeffs` for a point `z` such that when we have a polynomial `p` in lagrange basis, the
ipa/barycentric.go:105
↓ 4 callers
Function
CreateIPAProof
CreateIPAProof creates an IPA proof for a committed polynomial in evaluation form. `a` are the evaluation of the polynomial in the domain, and `evalPo
ipa/prover.go:58
↓ 4 callers
Function
Execute
Execute process in parallel the work function
common/parallel/execute.go:23
↓ 4 callers
Function
GetEdwardsCurve
()
bandersnatch/multiexp_test.go:720
↓ 4 callers
Method
LexicographicallyLargest
LexicographicallyLargest returns true if this element is strictly lexicographically larger than its negation, false otherwise
bandersnatch/fr/element.go:220
↓ 4 callers
Function
MinusOne
One returns 1 (in montgommery form)
bandersnatch/fr/element.go:270
↓ 4 callers
Function
NewPrecompMSM
NewPrecompMSM creates a new MSMPrecomp.
banderwagon/precomp.go:35
↓ 4 callers
Method
SetBytesUncompressed
SetBytesUncompressed deserializes an uncompressed group element from buf. This method does all the proper checks assuming the bytes come from an untru
banderwagon/element.go:241
↓ 4 callers
Function
_addGeneric
(z, x, y *Element)
bandersnatch/fr/element.go:452
↓ 4 callers
Function
_subGeneric
(z, x, y *Element)
bandersnatch/fr/element.go:490
↓ 4 callers
Function
domainToFr
(in uint8)
multiproof.go:258
↓ 4 callers
Method
interpolate
(t *testing.T)
ipa/barycentric_test.go:340
↓ 4 callers
Function
madd3
(a, b, c, d, e uint64)
bandersnatch/fr/arith.go:52
↓ 4 callers
Function
msmC16
(p *PointProj,points []PointAffine, scalars []fr.Element, splitFirstChunk bool)
bandersnatch/multiexp.go:1086
↓ 4 callers
Function
mulByConstant
(z *Element, c uint8)
bandersnatch/fr/element.go:530
↓ 3 callers
Function
BatchInvert
BatchInvert computes the inverse of a slice of field elements.
bandersnatch/fp/fp.go:36
↓ 3 callers
Function
GetPointFromX
(x *fp.Element, choose_largest bool)
bandersnatch/bandersnatch.go:60
↓ 3 callers
Method
IsUint64
IsUint64 returns true if z[0] >= 0 and all other words are 0
bandersnatch/fr/element.go:180
↓ 3 callers
Method
MSM
MSM calculates the 256-MSM of the given scalars on the fixed basis. It automatically detects how many non-zero scalars there are and parallelizes the
banderwagon/precomp.go:63
↓ 3 callers
Function
MultiScalar
MultiScalar computes the multi scalar multiplication of points and scalars.
ipa/config.go:49
↓ 3 callers
Method
Neg
Neg sets p to -p1.
banderwagon/element.go:427
↓ 3 callers
Function
NewPrecomputedWeights
NewPrecomputedWeights generates the precomputed weights for the barycentric formula.
ipa/barycentric.go:25
↓ 3 callers
Function
PowersOf
Returns powers of x from 0 to degree-1 <1, x, x^2, x^3, x^4,...,x^(degree-1)> TODO This method is used in two places; one is to evaluate a polynomial
common/common.go:21
↓ 3 callers
Function
ReadPoint
(r io.Reader)
common/common.go:32
↓ 3 callers
Function
ScalarEqualHex
(t *testing.T, scalar fr.Element, expected string)
test_helper/poly.go:36
↓ 3 callers
Method
SetBytesLE
SetBytes interprets e as the bytes of a little-endian unsigned integer, sets z to that value (in Montgomery form), and returns z.
bandersnatch/fr/element.go:722
↓ 3 callers
Method
String
String returns the string form of an Element in Montgomery form
bandersnatch/fr/element.go:638
↓ 3 callers
Method
ToMont
ToMont converts z to Montgomery form sets and returns z = z * r^2
bandersnatch/fr/element.go:628
↓ 3 callers
Function
_doubleGeneric
(z, x *Element)
bandersnatch/fr/element.go:471
↓ 3 callers
Function
_negGeneric
(z, x *Element)
bandersnatch/fr/element.go:505
↓ 3 callers
Function
_reduceGeneric
(z *Element)
bandersnatch/fr/element.go:517
next →
1–100 of 304, ranked by callers