hrss

package
v0.0.0-...-928146c Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: GPL-2.0, BSD-3-Clause, ISC, + 2 more Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PublicKeySize  = modQBytes
	CiphertextSize = modQBytes
)
View Source
const (
	N = 701
	Q = 8192
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PrivateKey

type PrivateKey struct {
	PublicKey
	// contains filtered or unexported fields
}

func GenerateKey

func GenerateKey(rand io.Reader) PrivateKey

func (*PrivateKey) Decap

func (priv *PrivateKey) Decap(ciphertext []byte) (sharedKey []byte, ok bool)

func (*PrivateKey) Marshal

func (priv *PrivateKey) Marshal() []byte

type PublicKey

type PublicKey struct {
	// contains filtered or unexported fields
}

func ParsePublicKey

func ParsePublicKey(in []byte) (*PublicKey, bool)

func (*PublicKey) Encap

func (pub *PublicKey) Encap(rand io.Reader) (ciphertext []byte, sharedKey []byte)

func (*PublicKey) Marshal

func (pub *PublicKey) Marshal() []byte

Jump to

Keyboard shortcuts

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