Documentation ¶
Index ¶
- Constants
- func AgentSeal(msg, clientPub []byte, agentKey *ecdsa.PrivateKey) ([]byte, error)
- func ClientOpen(c, agentPub []byte, clientPrv *ecdsa.PrivateKey) ([]byte, error)
- func PackWithSignature(msg []byte, key *ecdsa.PrivateKey) ([]byte, error)
- func UnpackSignature(c []byte) (msg []byte, sig []byte)
- func VerifySignature(pubk, msg, sig []byte) bool
Constants ¶
View Source
const ( // CRC16("github.com/privatix/dappctrl/client/svcrun") = 0x7FDE ErrWrongSignature errors.Error = 0x7FDE<<8 + iota )
Errors.
Variables ¶
This section is empty.
Functions ¶
func AgentSeal ¶
func AgentSeal(msg, clientPub []byte, agentKey *ecdsa.PrivateKey) ([]byte, error)
AgentSeal encrypts message using client's public key and packs with agent signature.
func ClientOpen ¶
func ClientOpen(c, agentPub []byte, clientPrv *ecdsa.PrivateKey) ([]byte, error)
ClientOpen decrypts message using client's key and verifies using agent's key.
func PackWithSignature ¶
func PackWithSignature(msg []byte, key *ecdsa.PrivateKey) ([]byte, error)
PackWithSignature packs message with signature.
func UnpackSignature ¶
UnpackSignature unpacks msg from signature.
func VerifySignature ¶
VerifySignature returns true if signature is correct.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.