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 ProcessUserFunction(path string) (io.Reader, error)
- func RSAEncrypt(plaintext []byte, publicKey []byte) ([]byte, error)
- func Run(req RunRequest) (*cli.RunResult, error)
- func Test(testReq TestRequest, verifier Verifier, endpoint string, pcrSlice []string) (*cli.RunResult, error)
- type AttestationUserData
- type DeployRequest
- type ErrorMsg
- type KeyRequest
- type Option
- type Options
- type OversizeFunctionError
- type RunRequest
- type TestRequest
- type Verifier
Constants ¶
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 ProcessUserFunction ¶ added in v0.5.6
ProcessUserFunction takes a string path and produces a io.Reader to zipped function. It could take both a folder as well as a zip file.
func Run ¶
func Run(req RunRequest) (*cli.RunResult, 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, verifier Verifier, endpoint string, pcrSlice []string) (*cli.RunResult, 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"` SignatureVerificationKey []byte `json:"signature_verification_public_key,omitempty"` }
func ConnectAndAttest ¶
func ConnectAndAttest(keyReq KeyRequest, verifier Verifier) (*attest.AttestationDoc, *AttestationUserData, error)
TODO: Run, deploy and test could use this function.
type DeployRequest ¶
type KeyRequest ¶
type OversizeFunctionError ¶ added in v0.5.6
type OversizeFunctionError struct {
// contains filtered or unexported fields
}
func (OversizeFunctionError) Error ¶ added in v0.5.6
func (e OversizeFunctionError) Error() string