keyshare

package
v0.0.41 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 11 Imported by: 0

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