libsgx-dcap-quote-verify-dev
, libsgx-dcap-ql-dev
, libsgx-uae-service
Please follow the command to build librats from the latested source code on your system.
mkdir -p "$WORKSPACE"
cd "$WORKSPACE"
git clone https://github.com/inclavare-containers/librats
cd librats
cmake -DBUILD_SAMPLES=on -H. -Bbuild
make -C build install
cert-app
will be installed to /usr/share/librats/samples/cert-app
on your system. All instances are placed in /usr/local/lib/librats/
.
If you want to build instances related to sgx(sgx_ecdsa, sgx_ecdsa_qve, sgx_la), please type the following command.
cmake -DRATS_BUILD_MODE="sgx" -DBUILD_SAMPLES=on -H. -Bbuild
make -C build install
If you want to run instances on libos occlum, please type the following command.
cmake -DRATS_BUILD_MODE="occlum" -DBUILD_SAMPLES=on -H. -Bbuild
make -C build install
If you want to run TDX instances, please type the following command.
cmake -DRATS_BUILD_MODE="tdx" -DBUILD_SAMPLES=on -H. -Bbuild
make -C build install
Note that SGX LVI mitigation is enabled by default. You can set macro SGX_LVI_MITIGATION
to 0
to disable SGX LVI mitigation.
Librats provides support for WebAssembly, which enables it to run in the browser and WAMR.
If you want to run it in browser, please read this document.
If you want to run it in WAMR, please type the following command.
# install librats in host mode first
cmake -H. -Bbuild
make -C build install
# export librats APIs to wamr
cd wasm/wamr
cmake -H. -Bbuild
make -C build
# run the sample
cd build
./iwasm --native-lib=librats_wamr.so sample/test.wasm
Right now, Librats supports the following instance types:
Priority | Attester instances | Verifier instances |
---|---|---|
0 | nullattester | nullverifier |
15 | sgx_la | sgx_la |
20 | csv | csv |
35 | sev | sev |
42 | sev_snp | sev_snp |
42 | tdx_ecdsa | tdx_ecdsa |
52 | sgx_ecdsa | sgx_ecdsa |
53 | sgx_ecdsa | sgx_ecdsa_qve |
For instance priority, the higher, the stronger. By default, Librats will select the highest priority instance to use.
Notice: special prerequisites for TDX remote attestation in bios configuration and hardware capability.
Check msr 0x503, return value must be 0:
sudo rdmsr 0x503s
Note that if you want to run SEV-SNP remote attestation, please refer to link to set up the host and guest Linux kernel, qemu and ovmf bios used for launching SEV-SNP guest.
Notice: special prerequisites for SEV(-ES) remote attestation in software capability.
Notice: special prerequisites for CSV(2) remote attestation in software capability.
In the early bootstrap of librats, the debug message is mute by default. In order to enable it, please explicitly set the environment variable RATS_GLOBAL_LOG_LEVEL=<log_level>
, where <log_level> is same as the values of the option -l
.
Direct Dependencies
Name | Repo URL | Licenses |
---|---|---|
linux-sgx | https://github.com/intel/linux-sgx | BSD-3-clause |
SGXDataCenterAttestationPrimitives | https://github.com/intel/SGXDataCenterAttestationPrimitives | BSD-3-clause |
GNU C library | C library | GNU General Public License version 3 |
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。