Documentation ¶
Overview ¶
Package test contains generic testing and benchmarking infrastructure for cryptographic groups and ciphersuites.
Index ¶
- func CompareGroups(t *testing.T, fn func(key []byte) kyber.XOF, g1, g2 kyber.Group)
- func GroupTest(t *testing.T, g kyber.Group)
- func SuiteTest(t *testing.T, suite suite)
- type GroupBench
- func (gb GroupBench) PointAdd(iters int)
- func (gb GroupBench) PointBaseMul(iters int)
- func (gb GroupBench) PointDecode(iters int)
- func (gb GroupBench) PointEncode(iters int)
- func (gb GroupBench) PointMul(iters int)
- func (gb GroupBench) PointNeg(iters int)
- func (gb GroupBench) PointPick(iters int)
- func (gb GroupBench) PointSub(iters int)
- func (gb GroupBench) ScalarAdd(iters int)
- func (gb GroupBench) ScalarDecode(iters int)
- func (gb GroupBench) ScalarDiv(iters int)
- func (gb GroupBench) ScalarEncode(iters int)
- func (gb GroupBench) ScalarInv(iters int)
- func (gb GroupBench) ScalarMul(iters int)
- func (gb GroupBench) ScalarNeg(iters int)
- func (gb GroupBench) ScalarPick(iters int)
- func (gb GroupBench) ScalarSub(iters int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareGroups ¶
CompareGroups tests two group implementations that are supposed to be equivalent, and compare their results.
Types ¶
type GroupBench ¶
type GroupBench struct {
X, Y kyber.Point
Xe []byte // encoded Point
// contains filtered or unexported fields
}
GroupBench is a generic benchmark suite for kyber.groups.
func NewGroupBench ¶
func NewGroupBench(g kyber.Group) *GroupBench
NewGroupBench returns a new GroupBench.
func (GroupBench) PointAdd ¶
func (gb GroupBench) PointAdd(iters int)
PointAdd benchmarks the addition operation for points
func (GroupBench) PointBaseMul ¶
func (gb GroupBench) PointBaseMul(iters int)
PointBaseMul benchmarks the base multiplication operation for points
func (GroupBench) PointDecode ¶
func (gb GroupBench) PointDecode(iters int)
PointDecode benchmarks the decoding operation for points
func (GroupBench) PointEncode ¶
func (gb GroupBench) PointEncode(iters int)
PointEncode benchmarks the encoding operation for points
func (GroupBench) PointMul ¶
func (gb GroupBench) PointMul(iters int)
PointMul benchmarks the multiplication operation for points
func (GroupBench) PointNeg ¶
func (gb GroupBench) PointNeg(iters int)
PointNeg benchmarks the negation operation for points
func (GroupBench) PointPick ¶
func (gb GroupBench) PointPick(iters int)
PointPick benchmarks the pick-ing operation for points
func (GroupBench) PointSub ¶
func (gb GroupBench) PointSub(iters int)
PointSub benchmarks the substraction operation for points
func (GroupBench) ScalarAdd ¶
func (gb GroupBench) ScalarAdd(iters int)
ScalarAdd benchmarks the addition operation for scalars
func (GroupBench) ScalarDecode ¶
func (gb GroupBench) ScalarDecode(iters int)
ScalarDecode benchmarks the unmarshalling operation for scalars
func (GroupBench) ScalarDiv ¶
func (gb GroupBench) ScalarDiv(iters int)
ScalarDiv benchmarks the division operation for scalars
func (GroupBench) ScalarEncode ¶
func (gb GroupBench) ScalarEncode(iters int)
ScalarEncode benchmarks the marshalling operation for scalars
func (GroupBench) ScalarInv ¶
func (gb GroupBench) ScalarInv(iters int)
ScalarInv benchmarks the inverse operation for scalars
func (GroupBench) ScalarMul ¶
func (gb GroupBench) ScalarMul(iters int)
ScalarMul benchmarks the multiplication operation for scalars
func (GroupBench) ScalarNeg ¶
func (gb GroupBench) ScalarNeg(iters int)
ScalarNeg benchmarks the negation operation for scalars
func (GroupBench) ScalarPick ¶
func (gb GroupBench) ScalarPick(iters int)
ScalarPick benchmarks the Pick operation for scalars
func (GroupBench) ScalarSub ¶
func (gb GroupBench) ScalarSub(iters int)
ScalarSub benchmarks the substraction operation for scalars