identity

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFileStore

func NewFileStore(identityDir, nodeName string, decrypt bool, agePasswordFile string) (*fileStore, error)

NewFileStore creates a new identity store

Types

type InitiatorKey added in v0.3.2

type InitiatorKey struct {
	Algorithm types.EventInitiatorKeyType
	Ed25519   []byte
	P256      *ecdsa.PublicKey
}

type NodeIdentity

type NodeIdentity struct {
	NodeName  string `json:"node_name"`
	NodeID    string `json:"node_id"`
	PublicKey string `json:"public_key"`
	CreatedAt string `json:"created_at"`
}

NodeIdentity represents a node's identity information

type Store

type Store interface {
	// GetPublicKey retrieves a node's public key by its ID
	GetPublicKey(nodeID string) ([]byte, error)
	VerifyInitiatorMessage(msg types.InitiatorMessage) error
	SignMessage(msg *types.TssMessage) ([]byte, error)
	VerifyMessage(msg *types.TssMessage) error

	SignEcdhMessage(msg *types.ECDHMessage) ([]byte, error)
	VerifySignature(msg *types.ECDHMessage) error

	SetSymmetricKey(peerID string, key []byte)
	GetSymmetricKey(peerID string) ([]byte, error)
	RemoveSymmetricKey(peerID string)
	GetSymetricKeyCount() int
	CheckSymmetricKeyComplete(desired int) bool

	EncryptMessage(plaintext []byte, peerID string) ([]byte, error)
	DecryptMessage(cipher []byte, peerID string) ([]byte, error)
}

Store manages node identities

Jump to

Keyboard shortcuts

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