keyshare

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2026 License: MIT Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrKeyshareNotFound = errors.New("keyshare not found")
	ErrInvalidID        = errors.New("invalid ID")
	ErrInvalidKey       = errors.New("invalid encryption key")
	ErrDecryptionFailed = errors.New("decryption failed")
)

Functions

This section is empty.

Types

type Manager

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

Manager provides methods for storing and retrieving encrypted keyshares from files.

func NewManager

func NewManager(homeDir string, encryptionPassword string) (*Manager, error)

NewManager creates a new keyshare manager instance. homeDir: Base directory (e.g., $HOME/.puniversal) encryptionPassword: Password for encrypting/decrypting keyshares

func (*Manager) Exists

func (m *Manager) Exists(id string) (bool, error)

Exists checks if a keyshare file exists for the given id.

func (*Manager) Get

func (m *Manager) Get(id string) ([]byte, error)

Get retrieves and decrypts a keyshare from a file. Returns the decrypted keyshare bytes.

func (*Manager) Store

func (m *Manager) Store(keyshareBytes []byte, id string) error

Store stores an encrypted keyshare as a file. keyshareBytes: Raw keyshare bytes from DKLS library id: Unique identifier (used as filename)

Jump to

Keyboard shortcuts

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