Documentation
¶
Index ¶
- Constants
- func AESEncrypt(plaintext []byte) ([]byte, []byte, error)
- func Deploy(req DeployRequest, keyReq KeyRequest) (string, []byte, error)
- func Encrypt(message, username string, options ...Option) (string, error)
- func EncryptBytes(keyReq KeyRequest, input []byte) ([]byte, error)
- func Key(keyReq KeyRequest) ([]byte, error)
- func LinkAWSAccount(url string, token string, customerID string) error
- func PersistFile(configDir, filename string, data []byte) error
- func RSAEncrypt(plaintext []byte, publicKey []byte) ([]byte, error)
- func Run(req RunRequest) ([]byte, error)
- func Test(testReq TestRequest, endpoint string, pcrSlice []string) (*entities.RunResults, error)
- type AttestationUserData
- type DeployRequest
- type ErrorMsg
- type KeyRequest
- type Option
- type Options
- type RunRequest
- type TestRequest
Constants ¶
View Source
const AesKeySize = 32
Variables ¶
This section is empty.
Functions ¶
func Deploy ¶
func Deploy(req DeployRequest, keyReq KeyRequest) (string, []byte, error)
Deploy encrypts the given function data within a secure enclave and stores the encrypted function for future use. Returns a function ID upon successful deployment. The stored function can only be decrypted within an enclave.
func EncryptBytes ¶ added in v0.2.1
func EncryptBytes(keyReq KeyRequest, input []byte) ([]byte, error)
func Key ¶
func Key(keyReq KeyRequest) ([]byte, error)
func LinkAWSAccount ¶ added in v0.4.0
func PersistFile ¶ added in v0.4.0
func Run ¶
func Run(req RunRequest) ([]byte, error)
Run loads the given function into a secure enclave and invokes it on the given data, then returns the result.
func Test ¶
func Test(testReq TestRequest, endpoint string, pcrSlice []string) (*entities.RunResults, error)
Test simulates the workflow of Deploy and Run, without storing the function. It loads the given function into an enclave, runs it on the given data, and returns the result. Use Test to verify that your function will work before storing it via Deploy.
Types ¶
type AttestationUserData ¶ added in v0.3.0
type AttestationUserData struct { FuncChecksum []byte `json:"func_checksum"` KeyChecksum []byte `json:"key_checksum"` CapeKey []byte `json:"key"` }
func ConnectAndAttest ¶
func ConnectAndAttest(keyReq KeyRequest) (*attest.AttestationDoc, *AttestationUserData, error)
TODO: Run, deploy and test could use this function.
type DeployRequest ¶
type KeyRequest ¶
type RunRequest ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.