Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cloudflare/bn256
/ functions
Functions
161 in github.com/cloudflare/bn256
⨍
Functions
161
◇
Types & classes
9
↓ 64 callers
Function
gfpMul
go:noescape
gfp_decl.go:24
↓ 44 callers
Method
Marshal
(out []byte)
gfp.go:90
↓ 42 callers
Method
Sub
(a, b *gfP2)
gfp2.go:70
↓ 34 callers
Method
Square
(a *gfP2)
gfp2.go:118
↓ 33 callers
Function
gfpAdd
go:noescape
gfp_decl.go:18
↓ 30 callers
Method
Add
Add sets e to a+b and then returns e.
bn256.go:77
↓ 30 callers
Method
Mul
See "Multiplication and Squaring in Pairing-Friendly Fields", http://eprint.iacr.org/2006/471.pdf
gfp2.go:78
↓ 25 callers
Function
montDecode
(c, a *gfP)
gfp.go:108
↓ 22 callers
Function
newGFp
(x int64)
gfp.go:14
↓ 21 callers
Function
gfpSub
go:noescape
gfp_decl.go:21
↓ 21 callers
Function
montEncode
(c, a *gfP)
gfp.go:107
↓ 20 callers
Method
ScalarBaseMult
ScalarBaseMult sets e to g*k where g is the generator of the group and then returns e.
bn256.go:59
↓ 17 callers
Method
Add
(a, b *gfP6)
gfp6.go:80
↓ 17 callers
Method
Mul
(a *twistPoint, scalar *big.Int)
twist.go:159
↓ 16 callers
Method
Unmarshal
Unmarshal sets e to the result of converting the output of Marshal back into a group element and then returns e.
bn256.go:129
↓ 15 callers
Method
Mul
(a, b *gfP6)
gfp6.go:94
↓ 15 callers
Method
Sub
(a, b *gfP6)
gfp6.go:87
↓ 14 callers
Method
SetOne
()
gfp2.go:36
↓ 13 callers
Method
Set
(f *gfP)
gfp.go:56
↓ 12 callers
Method
Set
(a *gfP6)
gfp6.go:17
↓ 11 callers
Method
Add
(a, b *twistPoint)
twist.go:71
↓ 11 callers
Method
Conjugate
(a *gfP2)
gfp2.go:52
↓ 11 callers
Method
Unmarshal
(in []byte)
gfp.go:98
↓ 10 callers
Method
Mul
(a, b *gfP12)
gfp12.go:125
↓ 10 callers
Function
gfpNeg
go:noescape
gfp_decl.go:15
↓ 9 callers
Method
MulXi
MulXi sets e=ξa where ξ=i+3 and then returns e.
gfp2.go:101
↓ 9 callers
Function
Pair
Pair calculates an Optimal Ate pairing.
bn256.go:325
↓ 9 callers
Method
ScalarMult
ScalarMult sets e to a*k and then returns e.
bn256.go:68
↓ 9 callers
Method
Set
(a *twistPoint)
twist.go:39
↓ 9 callers
Function
randomGF
randomGF returns a random integer between 0 and p-1.
gfp_test.go:12
↓ 9 callers
Function
togfP
togfP converts an integer into a field element (in Montgomery representation). This function assumes the input is between 0 and p-1; otherwise it pani
gfp_test.go:36
↓ 8 callers
Method
SetZero
()
gfp2.go:30
↓ 7 callers
Method
IsInfinity
()
curve.go:61
↓ 7 callers
Method
MulScalar
(a *gfP6, b *gfP2)
gfp6.go:124
↓ 7 callers
Method
Set
(a *curvePoint)
curve.go:31
↓ 7 callers
Method
Set
(a *gfP2)
gfp2.go:24
↓ 6 callers
Method
IsZero
()
gfp2.go:42
↓ 6 callers
Method
MulScalar
(a *gfP2, b *gfP)
gfp2.go:94
↓ 6 callers
Method
Set
(a *gfP12)
gfp12.go:52
↓ 6 callers
Function
toBigInt
toBigInt converts a field element into its reduced (mod p) integer representation.
gfp_test.go:22
↓ 5 callers
Method
Add
(a, b *gfP12)
gfp12.go:113
↓ 5 callers
Method
Exp
(a *gfP12, power *big.Int)
gfp12.go:144
↓ 5 callers
Method
Frobenius
(a *gfP6)
gfp6.go:53
↓ 5 callers
Method
Invert
(f *gfP)
gfp.go:81
↓ 5 callers
Method
MakeAffine
()
curve.go:201
↓ 5 callers
Method
MulTau
MulTau computes τ·(aτ²+bτ+c) = bτ²+cτ+aξ
gfp6.go:139
↓ 5 callers
Method
Neg
Neg sets e to -a and then returns e.
bn256.go:86
↓ 5 callers
Function
RandomG2
RandomG2 returns x and g₂ˣ where x is a random, non-zero number read from r.
bn256.go:173
↓ 5 callers
Method
Square
(a *gfP6)
gfp6.go:149
↓ 4 callers
Method
Double
(a *curvePoint)
curve.go:152
↓ 4 callers
Function
RandomG1
RandomG1 returns x and g₁ˣ where x is a random, non-zero number read from r.
bn256.go:44
↓ 4 callers
Method
Sqrt
(f *gfP)
gfp.go:85
↓ 4 callers
Function
gfpCarry
(a *gfP, head uint64)
gfp_generic.go:5
↓ 4 callers
Function
lineFunctionAdd
(r, p *twistPoint, q *curvePoint, r2 *gfP2)
optate.go:3
↓ 4 callers
Function
mul
(a, b [4]uint64)
gfp_generic.go:69
↓ 4 callers
Function
mulLine
(ret *gfP12, a, b, c *gfP2)
optate.go:94
↓ 4 callers
Function
sign0
(e *gfP)
gfp.go:110
↓ 3 callers
Method
FrobeniusP2
FrobeniusP2 computes (xτ²+yτ+z)^(p²) = xτ^(2p²) + yτ^(p²) + z
gfp6.go:64
↓ 3 callers
Method
IsInfinity
()
twist.go:67
↓ 3 callers
Method
MakeAffine
()
twist.go:174
↓ 3 callers
Method
Set
Set sets e to a and then returns e.
bn256.go:95
↓ 3 callers
Method
Sub
(a, b *gfP12)
gfp12.go:119
↓ 3 callers
Function
benchmarkSize
(b *testing.B, size int)
hash_test.go:20
↓ 3 callers
Function
bigFromBase10
(s string)
constants.go:7
↓ 3 callers
Method
exp
(f *gfP, bits [4]uint64)
gfp.go:63
↓ 3 callers
Function
randomK
(r io.Reader)
bn256.go:26
↓ 2 callers
Method
Double
(a *twistPoint)
twist.go:130
↓ 2 callers
Function
HashG1
HashG1 implements a hashing function into the G1 group. dst represents domain separation tag, similar to salt, for the hash.
hash.go:6
↓ 2 callers
Method
IsOnCurve
IsOnCurve returns true iff c is on the curve.
curve.go:39
↓ 2 callers
Method
IsZero
()
gfp6.go:38
↓ 2 callers
Method
MulGFP
(a *gfP6, b *gfP)
gfp6.go:131
↓ 2 callers
Method
MulScalar
(a *gfP12, b *gfP6)
gfp12.go:138
↓ 2 callers
Method
Neg
(a *gfP12)
gfp12.go:84
↓ 2 callers
Function
RandomGT
RandomGT returns x and e(g₁, g₂)ˣ where x is a random, non-zero number read from r.
bn256.go:315
↓ 2 callers
Method
SetInfinity
()
curve.go:54
↓ 2 callers
Method
SetZero
()
gfp6.go:24
↓ 2 callers
Method
Square
(a *gfP12)
gfp12.go:161
↓ 2 callers
Method
String
()
bn256.go:53
↓ 2 callers
Method
String
()
gfp.go:52
↓ 2 callers
Function
finalExponentiation
finalExponentiation computes the (p¹²-1)/Order-th power of an element of GF(p¹²) to obtain an element of GT (steps 13-15 of algorithm 1 from http://cr
optate.go:208
↓ 2 callers
Function
gfP2Decode
(in *gfP2)
gfp2.go:13
↓ 2 callers
Function
legendre
(e *gfP)
gfp.go:123
↓ 2 callers
Function
miller
miller implements the Miller loop for calculating the Optimal Ate pairing. See algorithm 1 from http://cryptojedi.org/papers/dclxvi-20100714.pdf
optate.go:119
↓ 1 callers
Method
Add
(a, b *curvePoint)
curve.go:65
↓ 1 callers
Method
Invert
(a *gfP6)
gfp6.go:171
↓ 1 callers
Method
Invert
(a *gfP12)
gfp12.go:177
↓ 1 callers
Method
IsOne
()
gfp2.go:47
↓ 1 callers
Method
IsZero
()
gfp12.go:70
↓ 1 callers
Method
Marshal
Marshal converts e to a byte slice.
bn256.go:104
↓ 1 callers
Method
Marshal
Marshal converts e into a byte slice.
bn256.go:233
↓ 1 callers
Method
Neg
(a *twistPoint)
twist.go:194
↓ 1 callers
Method
SetOne
()
gfp12.go:64
↓ 1 callers
Method
SetZero
()
gfp12.go:58
↓ 1 callers
Function
halfMul
(a, b [4]uint64)
gfp_generic.go:112
↓ 1 callers
Function
hashToBase
hashToBase implements hashing a message to an element of the field. L = ceil((256+128)/8)=48, ctr = 0, i = 1
gfp.go:29
↓ 1 callers
Function
lineFunctionDouble
(r *twistPoint, q *curvePoint)
optate.go:52
↓ 1 callers
Function
mapToCurve
(t *gfP)
hash.go:10
↓ 1 callers
Function
optimalAte
(a *twistPoint, b *curvePoint)
optate.go:259
Method
Add
Add sets e to a+b and then returns e.
bn256.go:206
Method
Add
Add sets e to a+b and then returns e.
bn256.go:360
next →
1–100 of 161, ranked by callers