mceliece460896

package
v1.3.8 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: BSD-3-Clause Imports: 9 Imported by: 1

Documentation

Overview

Package mceliece460896 implements the IND-CCA2 secure key encapsulation mechanism mceliece460896 as submitted to round 4 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) MarshalText added in v1.3.8

func (pk *PublicKey) MarshalText() (text []byte, err 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