test

package
v0.0.0-...-aed91c4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 21, 2021 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package test contains generic testing and benchmarking infrastructure for cryptographic groups and ciphersuites.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareGroups

func CompareGroups(t *testing.T, fn func(key []byte) kyber.XOF, g1, g2 kyber.Group)

CompareGroups tests two group implementations that are supposed to be equivalent, and compare their results.

func GroupTest

func GroupTest(t *testing.T, g kyber.Group)

GroupTest applies a generic set of validation tests to a cryptographic Group.

func SuiteTest

func SuiteTest(t *testing.T, suite suite)

SuiteTest tests a standard set of validation tests to a ciphersuite.

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL