quantum

package
v0.0.0-...-17e6b21 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DilithiumSigner

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

func NewDilithiumSigner

func NewDilithiumSigner(tracer tracing.Tracer) *DilithiumSigner

func (*DilithiumSigner) GenerateKeyPair

func (s *DilithiumSigner) GenerateKeyPair(ctx context.Context) (publicKey, privateKey []byte, err error)

func (*DilithiumSigner) Sign

func (s *DilithiumSigner) Sign(ctx context.Context, privateKey, message []byte) ([]byte, error)

func (*DilithiumSigner) Verify

func (s *DilithiumSigner) Verify(ctx context.Context, publicKey, message, signature []byte) error

type ExchangeSession

type ExchangeSession struct {
	ID              string
	InitiatedAt     time.Time
	CompletedAt     time.Time
	Status          ExchangeStatus
	PublicKey       []byte
	EncapsulatedKey []byte
	SharedSecret    []byte
}

type ExchangeStatus

type ExchangeStatus string
const (
	ExchangeStatusInitiated ExchangeStatus = "initiated"
	ExchangeStatusCompleted ExchangeStatus = "completed"
	ExchangeStatusFailed    ExchangeStatus = "failed"
)

type KeyExchange

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

func NewKeyExchange

func NewKeyExchange(
	metrics *metrics.QuantumStorageMetrics,
	tracer tracing.Tracer,
) *KeyExchange

func (*KeyExchange) CompleteExchange

func (ke *KeyExchange) CompleteExchange(ctx context.Context, session *ExchangeSession) error

func (*KeyExchange) InitiateExchange

func (ke *KeyExchange) InitiateExchange(ctx context.Context) (*ExchangeSession, error)

type KyberEncryptor

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

func NewKyberEncryptor

func NewKyberEncryptor(tracer tracing.Tracer) *KyberEncryptor

func (*KyberEncryptor) Decrypt

func (e *KyberEncryptor) Decrypt(ctx context.Context, privateKey, ciphertext []byte) (sharedSecret []byte, err error)

func (*KyberEncryptor) Encrypt

func (e *KyberEncryptor) Encrypt(ctx context.Context, publicKey, data []byte) (ciphertext, sharedSecret []byte, err error)

func (*KyberEncryptor) GenerateKeyPair

func (e *KyberEncryptor) GenerateKeyPair(ctx context.Context) (publicKey, privateKey []byte, err error)

type SPHINCSPlusSigner

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

func NewSPHINCSPlusSigner

func NewSPHINCSPlusSigner(tracer tracing.Tracer, metrics *metrics.QuantumStorageMetrics) *SPHINCSPlusSigner

func (*SPHINCSPlusSigner) GenerateKeyPair

func (s *SPHINCSPlusSigner) GenerateKeyPair(ctx context.Context) (publicKey, privateKey []byte, err error)

func (*SPHINCSPlusSigner) Sign

func (s *SPHINCSPlusSigner) Sign(ctx context.Context, privateKey, message []byte) ([]byte, error)

func (*SPHINCSPlusSigner) Verify

func (s *SPHINCSPlusSigner) Verify(ctx context.Context, publicKey, message, signature []byte) error

Jump to

Keyboard shortcuts

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