v3go.dedis.ch/kyber/v3/suites Index | Files

package suites

import "go.dedis.ch/kyber/v3/suites"

Package suites allows callers to look up Kyber suites by name.

Currently, only the "ed25519" suite is available with a constant time implementation and the other ones use variable time algorithms.

Index

Variables

var ErrUnknownSuite = errors.New("unknown suite")

ErrUnknownSuite indicates that the suite was not one of the registered suites.

Functions

func RequireConstantTime

func RequireConstantTime()

RequireConstantTime causes all future calls to Find and MustFind to only search for suites where the implementation is constant time. It should be called in an init() function for the main package of users of Kyber who need to be sure to avoid variable time implementations. Once constant time implementations are required, there is no way to turn it back off (by design).

At this time, the only constant time crypto suite is "Ed25519".

Types

type Suite

type Suite interface {
	kyber.Encoding
	kyber.Group
	kyber.HashFactory
	kyber.XOFFactory
	kyber.Random
}

Suite is the sum of all suites mix-ins in Kyber.

func Find

func Find(name string) (Suite, error)

Find looks up a suite by name.

func MustFind

func MustFind(name string) Suite

MustFind looks up a suite by name and panics if it is not found.

Source Files

all.go suites.go

Version
v3.1.0 (latest)
Published
Nov 30, 2022
Platform
linux/amd64
Imports
7 packages
Last checked
1 month ago

Tools for package owners.