package
0.38.1
Repository: https://github.com/aperturerobotics/bifrost.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# Functions

DecryptWithEd25519 decrypts with a ed25519 key using curve25519.
DecryptWithPrivKey decrypts with the given private key.
DecryptWithRSA decrypts a message with a RSA private key.
DeriveEd25519Key derives a ed25519 private key from an existing private key.
DeriveKey derives a secret using a private key.
EncryptToEd25519 encrypts to a ed25519 key using curve25519.
EncryptToPubKey encrypts a message to a public key.
EncryptToRSA encrypts a message to a RSA public key.
GetPeerWithID gets a peer.
IDB58Decode returns a b58-decoded Peer ID.
IDB58Encode returns b58-encoded string.
IDFromBytes cast a string to ID type, and validate the id to make sure it is a multihash.
IDFromPrivateKey returns the Peer ID corresponding to sk.
IDFromPublicKey returns the Peer ID corresponding to pk.
IDsToString converts a slice of IDs to strings.
NewGetPeer constructs a new getPeer directive.
NewGetPeerResolver constructs a new GetPeer resolver.
NewNetAddr constructs a new net.Addr from a peer ID.
NewPeer builds a new Peer object with a private key.
NewPeerWithGenerateED25519 generates an ED25519 key and returns it + the peer.
NewPeerWithID constructs a new Peer by extracting the pubkey from the ID.
NewPeerWithPubKey builds a Peer with a public key.
NewSignature constructs a signature.
NewSignatureWithHashedData builds a new signature with already-hashed data.
NewSignedMsg constructs/signs/encodes a new signed message.
ParsePeerIDWithPubKey parses the peer id and extracts the public key.
UnmarshalSignedMsg parses a signed message.

# Variables

ErrEmptyBody is returned if the message body was empty.
ErrEmptyPeerID is returned if the peer id cannot be empty.
ErrInvalidEd25519PubKeyForCurve25519 is returned if a public key cannot be used for curve25519.
ErrNoPrivKey is returned if the private key is not available.
ErrShortMessage is returned if a message is too short.
ErrSignatureInvalid is returned for an invalid signature.

# Structs

GetPeerResolver resolves the GetPeer directive.
NetAddr matches net.Addr with a peer ID.
Signature contains a signature by a peer.
SignedMsg is a message from a peer with a signature.

# Interfaces

GetPeer is a directive to lookup a peer on a controller.
Peer is the common interface for a keypair-based identity.

# Type aliases

GetPeerValue is the result of the GetPeer directive.
ID is a peer identifier.