Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthorizationConfig ¶ added in v0.3.3
type AuthorizationConfig struct {
Enabled bool `mapstructure:"enabled"`
RequiredAuthorizers []AuthorizerID `mapstructure:"required_authorizers"`
AuthorizerPublicKeys map[AuthorizerID]AuthorizerPublicKey `mapstructure:"authorizer_public_keys"`
}
type AuthorizerConfigEntry ¶ added in v0.3.3
type AuthorizerConfigEntry struct {
PublicKey string `mapstructure:"public_key"`
Algorithm string `mapstructure:"algorithm"`
}
AuthorizerConfigEntry represents the raw configuration for an authorizer
type AuthorizerID ¶ added in v0.3.3
type AuthorizerID string
type AuthorizerPublicKey ¶ added in v0.3.3
type AuthorizerPublicKey struct {
PublicKey string `json:"public_key" mapstructure:"public_key"`
Algorithm SignatureAlgorithm `json:"algorithm" mapstructure:"algorithm"`
}
AuthorizerPublicKey represents a single authorizer with their public key and algorithm
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 SignatureAlgorithm ¶ added in v0.3.3
type SignatureAlgorithm string
SignatureAlgorithm represents supported signature algorithms
const ( AlgorithmEd25519 SignatureAlgorithm = "ed25519" AlgorithmP256 SignatureAlgorithm = "p256" )
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
AuthorizeInitiatorMessage(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
Click to show internal directories.
Click to hide internal directories.