Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New() (i.KemExchangeProvider, error)
Types ¶
type KyberExchange ¶
type KyberExchange struct {
Type int
PrivateKey *kyber.PrivateKey
PublicKey *kyber.PublicKey
}
KyberExchange is a Kyber512 KEM
func (*KyberExchange) Export ¶
func (k *KyberExchange) Export() ([]byte, error)
Export writes the entire object to a byte slice for writing to disk
func (*KyberExchange) Import ¶
func (k *KyberExchange) Import(export []byte) error
Import imports the entire object from disk
func (*KyberExchange) Public ¶
func (k *KyberExchange) Public() []byte
Public packs the public key into a byte slice for use with the recipient's k.Send
func (*KyberExchange) Receive ¶
func (k *KyberExchange) Receive(ct []byte) []byte
Receive processes the ciphertext received from the sender (using this instance's k.Public key) into a shared secret.
type KyberExchangeExport ¶
type KyberExchangeExport struct {
Type int
PrivateKey [kyber.PrivateKeySize]byte
PublicKey [kyber.PublicKeySize]byte
}
KyberExchangeExport is used for writing KyberExchange to disk
Click to show internal directories.
Click to hide internal directories.