当前位置:网站首页>Introduction to Intel SGX development
Introduction to Intel SGX development
2022-04-22 06:05:00 【Q446512799】
sgx The definition file *.edl
enclave {
/* Quote external .edl*/
from "sgx_tstdc.edl" import *;
/* Safety zone function interface definition */
trusted {
public int sgx_sdkinit([in,size=iplen] unsigned char *ip,size_t iplen,[in,size=portlen] unsigned char *port, size_t portlen);
};
/* Definition of non safe zone function interface */
untrusted {
void ocall_print_string([in, string] const char *str);
};
};
Initialize the security zone
//ENCLAVE_FILE For secure dynamic library , Absolute paths can be used
sgx_create_enclave(ENCLAVE_FILE, SGX_DEBUG_FLAG, &token, &token_updated, &eid, NULL);
Release the safety zone
sgx_destroy_enclave(eid);
Safe zone function call
// Having a return value char * type , The corresponding length should be passed into the string sizeof length , Such as incoming 0 It's in sgx The space not applied for in becomes NULL
sgx_sdkinit(eid,&i_ret,ip,iplen,port,portlen);
Chip true random number and sealed key encryption and decryption
sgx_read_rand random number
sgx_read_rand(buf, buflen);
sgx_seal_data Sealed key encryption
sgx_seal_data(0, NULL, key_len, key_buf, seal_len, (sgx_sealed_data_t*)seal_data);
sgx_unseal_data Seal key decryption
sgx_unseal_data((sgx_sealed_data_t*)seal_data, NULL, NULL, unseal_key, &len);
版权声明
本文为[Q446512799]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220540172375.html
边栏推荐
- Installation of QT learning
- 07 operator
- AIX上安装gcc并使用
- C/S架构
- Blue Bridge Cup Sprint - binary enumeration
- transform-origin基点设置'无效'问题
- Why is softmax commonly used instead of sigmoid in binary classification tasks
- Pytorch deep learning practice_ 10 basis of convolutional neural network CNN
- LeetCode 898. Subarray bitwise OR operation - set
- Part 85 leetcode sword refers to offer dynamic programming (II) frog jumping steps
猜你喜欢
随机推荐
The postgraduate entrance examination is over
蓝桥杯嵌入式扩展板学习之光敏电阻
dlopen调用动态库
Blue Bridge Cup 31 day sprint Day5
蓝桥杯嵌入式扩展板学习之LIS302DL
AIX6.1编译openssl
日常学习记录——读取自定义数据集
07 operator
[2022 Ali security] real scene tampering image detection challenge final rank17 scheme sharing
记录一次安装centos8+postgresql9.6+postgis的惨痛经历
PyQT5总结
Installation of QT learning
汇编 dos中断功能
Record the pit of ad software learning
RTL8367学习笔记3——ACL访问控制列表
QT添加pri编译运行: error: fatal error: no input files问题解决
汇编 makefile
QT学习之安装QT
stm32 printf 重定向 虚拟示波器
第73篇 LeetCode题目练习(六) 6.Z字形变换








