kyber: go.dedis.ch/kyber/util/key Index | Files

package key

import "go.dedis.ch/kyber/util/key"

Package key creates asymmetric key pairs.

Index

Package Files

key.go

type Generator Uses

type Generator interface {
    NewKey(random cipher.Stream) kyber.Scalar
}

Generator is a type that needs to implement a special case in order to correctly choose a key.

type Pair Uses

type Pair struct {
    Public  kyber.Point  // Public key
    Private kyber.Scalar // Private key
}

Pair represents a public/private keypair together with the ciphersuite the key was generated from.

func NewKeyPair Uses

func NewKeyPair(suite Suite) *Pair

NewKeyPair directly creates a secret/public key pair

func (*Pair) Gen Uses

func (p *Pair) Gen(suite Suite)

Gen creates a fresh public/private keypair with the given ciphersuite, using a given source of cryptographic randomness. If suite implements key.Generator, then suite.NewKey is called to generate the private key, otherwise the normal technique of choosing a random scalar from the group is used.

type Suite Uses

type Suite interface {
    kyber.Group
    kyber.Random
}

Suite represents the list of functionalities needed by this package.

Package key imports 2 packages (graph) and is imported by 2 packages. Updated 2019-10-19. Refresh now. Tools for package owners.