kyber: Index | Files

package key

import ""

Package key creates asymmetric key pairs.


Package Files


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 {

Suite represents the list of functionalities needed by this package.

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