multipartybox

package
v0.0.0-...-cb92b4e Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2023 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Slots []byte
	Main  []byte
}

func ParseMessage

func ParseMessage(x []byte) (*Message, error)

type PrivateKey

type PrivateKey[KEMPriv, SigPriv any] struct {
	KEM  KEMPriv
	Sign SigPriv
}

type PublicKey

type PublicKey[KEMPub, SigPub any] struct {
	KEM  KEMPub
	Sign SigPub
}

type Scheme

type Scheme[XOF, KEMPriv, KEMPub, SigPriv, SigPub any] struct {
	KEM  kem.Scheme256[KEMPriv, KEMPub]
	Sign sign.Scheme[SigPriv, SigPub]
	AEAD aead.SUV256
	XOF  xof.Scheme[XOF]
}

func (*Scheme[XOF, KEMPriv, KEMPub, SigPriv, SigPub]) CiphertextSize

func (s *Scheme[XOF, KEMPriv, KEMPub, SigPriv, SigPub]) CiphertextSize(numReaders, ptextLen int) int

func (*Scheme[XOF, KEMPriv, KEMPub, SigPriv, SigPub]) Decrypt

func (s *Scheme[XOF, KEMPriv, KEMPub, SigPriv, SigPub]) Decrypt(out []byte, private *PrivateKey[KEMPriv, SigPriv], writers []*SigPub, ctext []byte) (int, []byte, error)

func (*Scheme[XOF, KEMPriv, KEMPub, SigPriv, SigPub]) DerivePublic

func (s *Scheme[XOF, KEMPriv, KEMPub, SigPriv, SigPub]) DerivePublic(priv PrivateKey[KEMPriv, SigPriv]) PublicKey[KEMPub, SigPub]

func (*Scheme[XOF, KEMPriv, KEMPub, SigPriv, SigPub]) Encrypt

func (s *Scheme[XOF, KEMPriv, KEMPub, SigPriv, SigPub]) Encrypt(out []byte, private *PrivateKey[KEMPriv, SigPriv], pubs []*KEMPub, seed *[32]byte, ptext []byte) ([]byte, error)

func (*Scheme[XOF, KEMPriv, KEMPub, SigPriv, SigPub]) EncryptDet

func (s *Scheme[XOF, KEMPriv, KEMPub, SigPriv, SigPub]) EncryptDet(out []byte, private *PrivateKey[KEMPriv, SigPriv], pubs []*KEMPub, ptext []byte) ([]byte, error)

func (*Scheme[XOF, KEMPriv, KEMPub, SigPriv, SigPub]) Generate

func (s *Scheme[XOF, KEMPriv, KEMPub, SigPriv, SigPub]) Generate(rng io.Reader) (retPub PublicKey[KEMPub, SigPub], retPriv PrivateKey[KEMPriv, SigPriv], _ error)

func (*Scheme[XOF, KEMPriv, KEMPub, SigPriv, SigPub]) MarshalPublic

func (s *Scheme[XOF, KEMPriv, KEMPub, SigPriv, SigPub]) MarshalPublic(dst []byte, pub *PublicKey[KEMPub, SigPub])

func (*Scheme[XOF, KEMPriv, KEMPub, SigPriv, SigPub]) Overhead

func (s *Scheme[XOF, KEMPriv, KEMPub, SigPriv, SigPub]) Overhead(numReaders int) int

func (*Scheme[XOF, KEMPriv, KEMPub, SigPriv, SigPub]) ParsePublic

func (s *Scheme[XOF, KEMPriv, KEMPub, SigPriv, SigPub]) ParsePublic(x []byte) (ret PublicKey[KEMPub, SigPub], _ error)

func (*Scheme[XOF, KEMPriv, KEMPub, SigPriv, SigPub]) PlaintextSize

func (s *Scheme[XOF, KEMPriv, KEMPub, SigPriv, SigPub]) PlaintextSize(ctext []byte) (int, error)

type SchemeV1

func NewV1

func NewV1() SchemeV1

NewV1 returns the version 1 Multiparty Box encryption scheme

type SignPrivateKeyV1

type SignPrivateKeyV1 = sig_ed25519.PrivateKey

type SignPublicKeyV1

type SignPublicKeyV1 = sig_ed25519.PublicKey

type XOFStateV1

type XOFStateV1 = xof_sha3.SHAKE256State

Jump to

Keyboard shortcuts

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