mceliece460896f

package
v0.0.0-...-746a847 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2023 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package mceliece460896f implements the IND-CCA2 secure key encapsulation mechanism mceliece460896f as submitted to round 3 of the NIST PQC competition and described in

https://classic.mceliece.org/nist/mceliece-20201010.pdf

The following code is translated from the C reference implementation, and from a Rust implementation by Bernhard Berg, Lukas Prokop, Daniel Kales where direct translation from C is not applicable.

https://github.com/Colfenor/classic-mceliece-rust

Index

Constants

View Source
const (
	PublicKeySize  = 524160
	PrivateKeySize = 13608
	CiphertextSize = 156
	SharedKeySize  = 32
)

Variables

This section is empty.

Functions

func Scheme

func Scheme() kem.Scheme

Scheme returns a KEM interface.

Types

type PrivateKey

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

func (*PrivateKey) Equal

func (sk *PrivateKey) Equal(other kem.PrivateKey) bool

func (*PrivateKey) MarshalBinary

func (sk *PrivateKey) MarshalBinary() ([]byte, error)

func (*PrivateKey) MarshalCompressedBinary

func (sk *PrivateKey) MarshalCompressedBinary() []byte

MarshalCompressedBinary returns a 32-byte seed that can be used to regenerate the key pair when passed to DeriveKeyPair

func (*PrivateKey) Public

func (sk *PrivateKey) Public() kem.PublicKey

func (*PrivateKey) Scheme

func (sk *PrivateKey) Scheme() kem.Scheme

type PublicKey

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

func (*PublicKey) Equal

func (pk *PublicKey) Equal(other kem.PublicKey) bool

func (*PublicKey) MarshalBinary

func (pk *PublicKey) MarshalBinary() ([]byte, error)

func (*PublicKey) Scheme

func (pk *PublicKey) Scheme() kem.Scheme

Jump to

Keyboard shortcuts

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