The open-source sgx-decode-pib tool can be used to decode the Platform Info Blob (PIB) string returned by Intel® SGX IAS when performing remote attestation of an Intel® SGX enclave.
|Note||You must also install the Intel® SGX SDK before building this tool.|
1. Install Rust:
Linux, macOS, or other Unix-like OS
Run the following command in a terminal
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
2. Download or clone the sgx-decode-pib Github repository:
$ git clone https://github.com/dingelish/sgx-decode-pib-rs.git
3. Install dependencies and build the app:
Before building the app, make sure the build.rs file reflects the correct location of your SGX installation. The build.rs file assumes you have installed the Intel® SGX SDK at /opt/intel/sgxsdk. Edit this path in the build.rs file if it is not correct.
For Windows, specify the directory where SGX libraries are located, e.g.
let sdk_dir = env::var("SGX_SDK").unwrap_or_else(|_| "C:\\Program Files (x86)\\Intel\\IntelSGXSDK\\bin\\x64\\Release".to_string());
$ cd sgx-decode-pib-rs-master
$ cargo build
4. Execute the tool:
$ cd target/debug
$ sgx-decode-pib <PIB>
Where <PIB> is the Platform Info Blob returned by IAS. It looks something like this: 00023232392323213012312213213000234941234…