keygen

package
v0.0.0-...-19c2005 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TypeToString map[Type]string = map[Type]string{
	NULL_TYPE: "NULL",
	KYBER:     "KYBER",
	DILITHIUM: "DILITHIUM",
	Ed25519:   "ED25519",
	ANON:      "ANON",
}
View Source
var X []kyber.Point

Functions

func Decrypt

func Decrypt(e *EncryptedData, sks ...any) [][]byte

func GetKeyPair

func GetKeyPair(keyType Type) *keys

Types

type AnonEncrypt

type AnonEncrypt interface {
	GenEncryptionKeys(keyNum int) (s *edwards25519.SuiteEd25519, X []kyber.Point, y []kyber.Scalar)
	Encrypt(X []kyber.Point, suite *edwards25519.SuiteEd25519, m []byte) []byte
}

type EncryptedData

type EncryptedData struct {
	X []kyber.Point
	// contains filtered or unexported fields
}

func Encrypt

func Encrypt(k *keys, keyNum int, msg []byte) *EncryptedData

func (*EncryptedData) GetCipherText

func (e *EncryptedData) GetCipherText() []byte

func (*EncryptedData) GetSuite

func (e *EncryptedData) GetSuite() *edwards25519.SuiteEd25519

func (*EncryptedData) GetX

func (e *EncryptedData) GetX() []kyber.Point

type KeyGen

type KeyGen interface {
	NewKeyPair(keyType Type)
	GetPrivate() *privateKey
	GetPublic() *publicKey
}

type KyberKeyPair

type KyberKeyPair struct {
	RawPub  []byte
	RawPriv []byte
	// contains filtered or unexported fields
}

type Type

type Type uint32
const (
	NULL_TYPE Type = iota
	KYBER
	DILITHIUM
	Ed25519
	ANON
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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