ciphersuite

package
v0.0.0-...-e4cc500 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

A (not so extensible) Ciphersuite for Format 2.

Index

Constants

This section is empty.

Variables

View Source
var EInvalidInput = errors.New("EInvalidInput")
View Source
var ENextKE = errors.New("Next KE Algo")
View Source
var ENextKeyRing = errors.New("Next Key Ring")
View Source
var ENoPublicKey = errors.New("No Public Key")

Functions

func Register_EncryptionAlgorithm

func Register_EncryptionAlgorithm(e *EncryptionAlgorithm)

func Register_KeyExchangeAlgoritm

func Register_KeyExchangeAlgoritm(e *KeyExchangeAlgoritm)

Types

type Curve25519_KeyRing

type Curve25519_KeyRing map[[32]byte][32]byte

func (Curve25519_KeyRing) Algo

func (c Curve25519_KeyRing) Algo() string

func (Curve25519_KeyRing) IsKeyRing

func (c Curve25519_KeyRing) IsKeyRing()

type Curve25519_PublicKey

type Curve25519_PublicKey [32]byte

func (*Curve25519_PublicKey) Algo

func (c *Curve25519_PublicKey) Algo() string

func (*Curve25519_PublicKey) IsPublicKey

func (c *Curve25519_PublicKey) IsPublicKey()

type EncryptionAlgorithm

type EncryptionAlgorithm struct {
	Name   string
	Block  func(e EncryptionKeyData) cipher.BlockMode
	Stream func(e EncryptionKeyData) cipher.Stream
	AEAD   func(e EncryptionKeyData) cipher.AEAD
}

type EncryptionKeyData

type EncryptionKeyData interface {
	// contains filtered or unexported methods
}

func NextKE

func NextKE() (EncryptionKeyData, []byte, error)

func NextKeyRing

func NextKeyRing() (EncryptionKeyData, error)

type KeyExchangeAlgoritm

type KeyExchangeAlgoritm struct {
	Name   string
	Encode func(rand io.Reader, pub PublicKey) (EncryptionKeyData, []byte, error)
	Decode func(rand io.Reader, opaque []byte, kring KeyRing) (EncryptionKeyData, error)
}

type KeyRing

type KeyRing interface {
	Algo() string
	IsKeyRing()
}

type PublicKey

type PublicKey interface {
	Algo() string
	IsPublicKey()
}

Jump to

Keyboard shortcuts

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