当前位置: 首页 > news >正文

seo优化自学开鲁网站seo

seo优化自学,开鲁网站seo,网络怎么做推广,wordpress 链接插件文章目录参考文献系统要求一、安装Open Enclave SDK 环境(一)什么是Open Enclave SDK(二)启动SGX功能方法一: BIOS启动方法二:软件方式启动(三)安装必要环境(1&#xff0…

文章目录

  • 参考文献
  • 系统要求
  • 一、安装Open Enclave SDK 环境
    • (一)什么是Open Enclave SDK
    • (二)启动SGX功能
      • 方法一: BIOS启动
      • 方法二:软件方式启动
    • (三)安装必要环境
      • (1)安装编译工具:Visual Studio Build 2019(x64)
      • (2)安装Git环境
      • (3)安装Clang环境
      • (4)安装OpenSSL
      • (5)安装ME
      • (6.1)自动安装Guard Extension SDK for windows(PSW)
      • (6.2)手动安装PSW(Intel Platform Software for Windows)
      • (7)安装openenclave SDK
      • (8)安装Intel SGX DCAP for Windows
  • 二、使用Open Enclave SDK
    • (一)Open Enclave SDK目录文件说明
    • (二)配置 Open Enclave SDK
    • (三)运行测试例子(helloworld)

参考文献

  • 哪些平台支持英特尔® Software Guard Extensions (英特尔® SGX) 数据中心标记基元 (DCAP
  • 官方文档一:Install the Open Enclave SDK NuGet Package
  • 官方文档二:Using the Open Enclave SDK on Windows
  • 官方文档三: Building and Running the Samples on Windows
  • Win10安装Intel SGX环境并执行一个基础demo
  • windows10下使用Intel SGX编程初体验

系统要求

  • x86-64。
  • Windows Server 2019 or Windows 10 (1709 or newer)。
  • 支持SGX1(+FLC),如果不支持FLC,则只能使用simulation mode。

一、安装Open Enclave SDK 环境

(一)什么是Open Enclave SDK

Open Enclave SDK提供了对Open Portable TEE OS(OP-TEE OS)的预览支持。OP-TEE是一个用于实现传统内核模式和用户模式执行环境的TEE的操作系统。它在支持ARM TrustZone的A-profile ARM系统上运行。因此,Open Enclave SDK 也可以被用来针对这些系统。

原文链接请参考Open Enclave SDK for OP-TEE OS。

(二)启动SGX功能

启动SGX功能的前提条件时:Windows® 10 is booted in Legacy or UEFI Mode。如果是Legacy mode,则需要修改为UEFI mode,并重装windows 10。

方法一: BIOS启动

  1. 查看是否支持SGX,可参考官方文档:在电脑设置中找到CPU类型,在Intel官网查询该型号是否支持SGX。
  1. 如果电脑支持SGX,则重启电脑进入【BIOS->Security】下启动SGX。如果BIOS无法设置,则不支持使用Intel SGX功能。

方法二:软件方式启动

在 Microsoft Store 中下载安装Intel(R) Software Guard Extensions Activation APP。并以 Admin 方式打开 Intel(R) Software Guard Extensions Activation APP,单击 【Activate】启动SGX。

(三)安装必要环境

安装Open Enclave SDK的环境要求如下:

  • Git v2.31.1
  • OpenSSL 1.1.1
  • Visual Studio Build Tools
  • Clang 10.0.0
  • ShellCheck v0.7.0
  • Nuget 3.4.3
  • Python 3
  • Python pip
  • Intel SGX PSW v2.13.100.2

下面根据自己电脑上缺失工具进行安装。

(1)安装编译工具:Visual Studio Build 2019(x64)

  1. Visual Studio Build 2019下载地址在这儿。
  2. 安装时选择【C++ build tools】,中文是【使用C++的桌面开发】进行安装;
  3. Visual Studio Build Tools 2019支持CMake 3.15版(构建Open Enclave SDK需要CMake 3.12版或以上)。

(2)安装Git环境

  1. 如果有git、git bash等环境,则跳过。
  2. 下载地址在这儿,按步骤安装即可。
  3. C:\Program Files\Git\binC:\Program Files\Git\mingw64\bin添加到 PATH

(3)安装Clang环境

  1. 下载地址在这儿
  2. 安装Clang 8.0.1并将LLVM文件夹添加到路径中.

(4)安装OpenSSL

  1. 安装Git之后,在Git Bash中可以使用openssl了。
  2. 记住,电脑中一定只能有一个openssl。不然ninja 编译的时候会出错,参考这儿

(5)安装ME

windows10的ME下载地址在这儿。下载后直接安装,安装文件为\ME_SW_2216.16.0.2805\ME_SW_DCH\SetupME.exe

(6.1)自动安装Guard Extension SDK for windows(PSW)

实验中这种方式总是提示版本不对,即使在 SGX 已经激活的状态下。

下载地址在这儿。下载后直接安装。

(6.2)手动安装PSW(Intel Platform Software for Windows)

官方文档说SGX1+FLC才安装PSW,但是所有支持SGX的都需要安装PSW。

  1. 查看windows版本。在cmdpowershell中输入:winver,查看版本。1709是指2017年9月第一版windows10。所以一般都是使用above版本安装。

  2. 解压Intel SGX PSW v2.13.100.2,下载地址在这儿。下载之后,解压。

  3. 进入\Intel SGX PSW for Windows v2.13.100.2\PSW_INF_RS3_and_above目录,command(Admin)下执行:

pnputil /add-driver sgx_psw.inf /install

注:官方文档使用devcon.exe update安装总是出错,使用pnputil没有问题。

  1. 检查PSW是否安装成功:检查C:\Windows\System32下是否有sgx_urts.dll,【右键->属性->详细信息】查看版本。

  2. 查看PSW是否启动。command(Admin)下执行sc query aesmservice,输出如下信息表示已经启动。启动命令Start-Service "AESMService",重启命令Restart-Service "AESMService"

SERVICE_NAME: aesmserviceTYPE               : 10  WIN32_OWN_PROCESSSTATE              : 4  RUNNING(STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)WIN32_EXIT_CODE    : 0  (0x0)SERVICE_EXIT_CODE  : 0  (0x0)CHECKPOINT         : 0x0WAIT_HINT          : 0x0

(7)安装openenclave SDK

  1. 下载 openenclave nupkg
    代码在这儿,下载最新版本。我下载的是v0.18.5。
  2. 安装nuget工具。
    1. 下载nuget工具,无需安装。下载地址在这儿。
    2. 下载之后将nuget存放地址加入到PATH
    3. 在Powershell(Admin)中测试nuget是否可用。

3.安装openenclave nupkg。打开Powershell(Admin),执行以下命令:

nuget.exe install open-enclave -Source D:\software\windows\SGX  -OutputDirectory C:\oe -ExcludeVersion -pre
  1. 安装完成后,Open Enclave SDK将被放置在C:\oe路径下。使用下面的命令来复制SDK到C:\openenclave
xcopy /E  C:\oe C:\openenclave\
  1. 查看当前SGX
// Powershell或者cmd下输入:
> oesgx.exe
CPU supports Software Guard Extensions:SGX1
MaxEnclaveSize_64: 2^(36)
CPU supports Key Sharing & Separation (KSS): false
EPC size on the platform: 98041856
oesgx outputSGX support level
CPU supports SGX_FLC:Flexible Launch Control CPU supports Software Guard Extensions:SGX1SGX1+FLC
CPU supports Software Guard Extensions:SGX1SGX1
CPU does not support SGXNone

所以本系统支持SGX1

(8)安装Intel SGX DCAP for Windows

  1. 安装WDK(Windows Driver Kit),获取devcon.exe等工具。

    1. 关闭visual studio。
    2. 安装Windows SDK,下载地址在这儿。下载之后安装,安装目录默认是C:\Program Files (x86)\Windows Kits\10\WindowsSDK,其他选项根据需要进行修改。(Windows SDK 貌似不支持家庭版,因为在安装WDK的时候总是提示Windows SDK未安装。
    3. Windows SDK安装完成之后,将C:\Program Files (x86)\Windows Kits\10添加到PATH
    4. 安装WDK,下载地址在这儿。默认安装路径,安装之后将C:\Program Files (x86)\Windows Kits\10\Tools\x64添加到PATH
  2. 安装Intel SGX DCAP for Windows。

    1. DCAP的下载地址在这儿。下载DCAP到存放路径。
    2. 运行Intel SGX DCAP for Windows v1.11.100.2.exe,解压到C:
    3. 允许SGX启动配置驱动程序运行: command(Admin)下执行:
    reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\sgx_lc_msr\Parameters /v "SGX_Launch_Config_Optin" /t REG_DWORD /d 1
    reg query HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\sgx_lc_msr\Parameters /v "SGX_Launch_Config_Optin"
    
    1. 安装和升级驱动。进入C:\Intel SGX DCAP for Windows v1.11.100.2目录,在command(Admin)下执行如下安装命令:
    devcon.exe update dcap\WindowsServer2016\sgx_dcap_dev.inf "SWC\VEN_INT&DEV_0E0C_DCAP"
    devcon.exe update base\WindowsServer2019_Windows10\sgx_base.inf *INT0E0C// 或
    pnputil /add-driver base\WindowsServer2019_Windows10\sgx_base.inf /install
    pnputil /add-driver dcap\WindowsServer2016\sgx_dcap_dev.inf /install
    
    1. 安装DCAP_Components。command(Amind)执行如下命令。
    // 安装 DCAP_Components
    nuget.exe install DCAP_Components -Source "C:\Intel SGX DCAP for Windows v1.11.100.2\nuget\DCAP_Components" -OutputDirectory C:\oe_prereqs -ExcludeVersion// 安装 EnclaveCommonAPI
    > nuget.exe install EnclaveCommonAPI -Source "C:\Intel SGX DCAP for Windows v1.11.100.2\nuget\EnclaveCommonAPI" -OutputDirectory C:\oe_prereqs -ExcludeVersion
    

    如果安装EnclaveCommonAPI提示错误Unable to resolve dependency 'SgxHeaders'. Source(s) used: 'nuget.org'.或错误Unable to find package 'DCAP_Components'. Existing packages must be restored before performing an install or update.。则不指定源,使用所有源安装EnclaveCommonAPI

    nuget.exe install EnclaveCommonAPI -OutputDirectory C:\oe_prereqs -ExcludeVersion
    

二、使用Open Enclave SDK

注意:目前该SDK仅支持64bit的程序。

(一)Open Enclave SDK目录文件说明

Path说明
binDeveloper tools such as oedebugrt.dll for debugging and oesign for signing your enclaves.
include\openenclaveOpen Enclave runtime headers for use in your enclave (enclave.h) and its host (host.h).
include\openenclave\3rdpartyHeaders for libc, libcxx and mbedlts libraries for use inside the enclave. See the API Reference section for supported functions.
lib\openenclave\cmakeOpen Enclave SDK CMake Package for integration with your CMake projects. See README.md for more details.
lib\openenclave\enclaveLibraries for linking into the enclave, including the libc, libcxx and mbedtls libraries for Open Enclave.
lib\openenclave\hostLibrary for linking into the host process of the enclave.
lib\openenclave\debuggerLibraries used by the gdb plug-in for debugging enclaves.
share\openenclave\samplesSample code showing how to use the Open Enclave SDK.

(二)配置 Open Enclave SDK

在环境变量中增加CMAKE_PREFIX_PATH,值为C:\openenclave\lib\openenclave\cmake。或者:

set CMAKE_PREFIX_PATH=%CMAKE_PREFIX_PATH%;C:\openenclave\lib\openenclave\cmake

(三)运行测试例子(helloworld)

Open Enclave SDK的测试例相关文档:

  • Open Enclave SDK Samples
  • Build and Sign an Enclave
  • Open Enclave Debugging
  1. 拷贝所有测试示例到本地地址
// 示例
xcopy /E C:\openenclave\share\openenclave\samples E:\codes\MPC\oe-tee
  1. 在菜单栏展开Visual Studio 2019,以 Admin 的方式打开x64 Native Tools Command Prompt for VS 2019编译(如果选择其他,则会提示find_package The following configuration files were considered but not accepted的错误)。进入到程序目录。

注:visual studio的各个shell工具说明在这儿。

  1. 编译helloworld测试代码
mkdir build
cd build
> cmake .. -G Ninja -DNUGET_PACKAGE_PATH=C:\oe_prereqs
// 等待无错误输出> ninja
[1/1] Generating enclave/enclave.signed
Created E:/codes/MPC/oe-samples/helloworld/build/enclave/enclave.signed> ninja run
[1/1] cmd.exe /C "cd /D E:\codes\MPC\oe-samples\helloworld...es/MPC/oe-samples/helloworld/build/enclave/enclave.signed"
Hello world from the enclave
Enclave called into host to print: Hello World!
http://www.yayakq.cn/news/638561/

相关文章:

  • 网站做聚合页面页面设计标准规范
  • 有什么图片做视频的网站吗百度地图怎么搜街景
  • 江阴网站开发公司电话深圳设计装修公司哪家好
  • 北京中国建设部网站wordpress开头
  • 做新闻封面的网站网站建设技术服务费怎么入账
  • 查询网站备案密码艺客网站首页
  • 做网站看好金石网络网站功能规划
  • 闸北区网站设计怎样自己做网站赚钱吗
  • 网站的建设会计入哪个科目福州市交通建设集团有限公司 网站
  • 商城网站结算页面怎么做外贸公司会计账务处理
  • 天河建设网站企业网站目录架构
  • 女人做一级a网站免费微信开发者平台登录
  • 网站运营的目的及意义深圳建筑工务署官网
  • 网站首页列表布局设计萝卜建站分类信息
  • 微网站的图标怎么做网站类型定义
  • 义乌制作网站开发腾讯云 云服务器
  • 企业网站建设有什么要求网站开发最新流程
  • 绍兴 网站制作苏州公司建设网站首页
  • 网站文章模板wordpress产品批量导入
  • 怎么提交网站地图外包公司属于什么行业
  • 四川交投建设工程股份有限公司网站品牌型 网站建设
  • 请说明网站建设的一般过程包括哪些wordpress 鲜果
  • 电脑店免费建站怎么建立公司网站?
  • 网站建设报价表建立网站需要准备的材料
  • 自己做的网站程序怎么发布辽源做网站
  • 旅游网站建设模版app订制开发公司
  • 做网站怎么做多少钱php网站开发实例教程实验报告
  • 上海平台网站建设哪家好手机赚钱
  • 企业管理网站模板官方网站建设 找磐石网络一流
  • 网站单页seo淄博网站营销与推广