key

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: MPL-2.0 Imports: 2 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package key creates asymmetric key pairs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

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

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

func NewKeyPair(suite Suite) *Pair

NewKeyPair directly creates a secret/public key pair

func (*Pair) Gen

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

type Suite interface {
	kyber.Group
	kyber.Random
}

Suite represents the list of functionalities needed by this package.

Jump to

Keyboard shortcuts

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