Python package to verify Intel SGX ECDSA-based quotes
Project description
SGX DCAP quote verify for Python
This package provides a Python binding to the SGX Quote Verification Library (QVL), which is the reference implementation of ECDSA-based SGX quote verification. It allows you to verify ECDSA-based quotes generated by the Intel provided Quoting Enclave in Python.
Usage
import sgx_dcap_quote_verify
from pathlib import Path
from datetime import datetime
# You can download the trusted root CA in PEM format directly from Intel at :
# <https://certificates.trustedservices.intel.com/Intel_SGX_Provisioning_Certification_RootCA.pem>
trusted_root_ca_certificate = Path("path/to/root_ca_certificate.pem").read_text()
# Get the quote and the collateral from the service you want to attest
pck_certificate = Path("path/to/pck_certificate.pem").read_text()
pck_signing_chain = Path("path/to/pck_signing_chain.pem").read_text()
root_ca_crl = Path("/path/to/root_ca_crl.pem").read_text()
intermediate_ca_crl = Path("/path/to/intermediate_ca_crl.pem").read_text()
tcb_info = Path("/path/to/tcb_info.json").read_text()
tcb_signing_chain = Path("/path/to/tcb_signing_chain.pem").read_text()
quote = Path("/path/to/quote.dat").read_bytes()
qe_identity = Path("/path/to/qe_identity.json").read_text()
# Set the date used to check if the collateral (certificates,CRLs...) is still valid
# Except for test purposes it should be set to the current time as is done below
expiration_date = datetime.now()
# Use the package to check the validity of the quote
attestation_result = sgx_dcap_quote_verify.verify(
trusted_root_ca_certificate,
pck_certificate,
pck_signing_chain,
root_ca_crl,
intermediate_ca_crl,
tcb_info,
tcb_signing_chain,
quote,
qe_identity,
expiration_date,
)
assert attestation_result.ok
assert (
attestation_result.pck_certificate_status
== sgx_dcap_quote_verify.VerificationStatus.STATUS_OK
)
assert (
attestation_result.tcb_info_status
== sgx_dcap_quote_verify.VerificationStatus.STATUS_OK
)
assert (
attestation_result.qe_identity_status
== sgx_dcap_quote_verify.VerificationStatus.STATUS_OK
)
assert (
attestation_result.quote_status
== sgx_dcap_quote_verify.VerificationStatus.STATUS_OK
)
# The attestation result contains the report data, which includes the MR_ENCLAVE
print("mr_enclave =", attestation_result.enclave_report.mr_enclave)
Disclaimer : This package is not endorsed by Intel Corporation. It is provided as is, use it at your own risk.
License
The source code of the binding is provided under Apache-2.0 license.
This software also uses the SGX Quote Verification Library, which is licensed under BSD license. Distribution of the software as a whole, including the external library, may be subject to the terms of the external library's license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for sgx-dcap-quote-verify-python-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a776d14c16515dc692a08270e9c64e5887d82b1cfee8834f7d6857989125b669 |
|
MD5 | 7fc015736d2399a24e125f98584bcbfa |
|
BLAKE2b-256 | b63852cc883a47f09d99fddd9e537cba177c3769bc8c1da4126e8e2822663102 |
Hashes for sgx_dcap_quote_verify_python-0.0.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4342fe4a800a01233dfd4674f81b3826df46120737e15947df5534fe44f0571 |
|
MD5 | 295cc3040529d52aba775e1f12e4b25f |
|
BLAKE2b-256 | 9fa6ce0c8d4b9c6720b377b6174788ded6dfd0541222198da65d480a0ba156c3 |
Hashes for sgx_dcap_quote_verify_python-0.0.2-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94cf063483920115c086ec9ed1ea1ee3b44640bc4bc344dbda84f297f690736c |
|
MD5 | d7b39040feb9bdf08773fc8539152f93 |
|
BLAKE2b-256 | d1e23599ae5cfd4b8bb1b087159fee35b8f64ed2cadd2f6fecc5c22966ca76b5 |
Hashes for sgx_dcap_quote_verify_python-0.0.2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7d44288c44ce848c7891c35d2d455ad7b22a8cadc5be1456fee9fbb8c340816 |
|
MD5 | cba9dd2d9d706426498724bf1f995999 |
|
BLAKE2b-256 | c28576f9be6fd30c7b0b378ee71b42726313788330107de1f035a14270605a0c |
Hashes for sgx_dcap_quote_verify_python-0.0.2-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01a86a49689c0f85d4e2362540dac67df6424c7a0ef7d67bd4b3548658cc7233 |
|
MD5 | 03a575564e04cbc294774ce9c5c06348 |
|
BLAKE2b-256 | 45428e902bd14d37ef7b47a68b67a06f61876103c6a8a0a8fc561b0c72147146 |
Hashes for sgx_dcap_quote_verify_python-0.0.2-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e39f5a936e7610263f40ad64b0749b0f7612c1898f90f98cb8a099987eda22e |
|
MD5 | e40e5754672d348674f33a9de9a00a30 |
|
BLAKE2b-256 | afbf9b84ff2d22399c9fd10e489706f096b6a54bdbc28eb48ec3389cbb55329b |
Hashes for sgx_dcap_quote_verify_python-0.0.2-pp37-pypy37_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf3958453d5e50c64f6e147d6d754fda40801710d6d4941f8f3cafd2f87f460e |
|
MD5 | 6a5ae4552a74bb0c4deac8690728faca |
|
BLAKE2b-256 | 8d349c6cf57cc85532f296edcba2daa569700e83687a87e67d773b016ad751b5 |
Hashes for sgx_dcap_quote_verify_python-0.0.2-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f1c53bd3a6de87bf91d5ee0ad0251ddf73216aca3d91b11b6c681a7b34ed915 |
|
MD5 | 166da2346850e4f9130ed4487036e34a |
|
BLAKE2b-256 | dba9dfd13d6f4c9d88d09dd3f0c1b770e0346acde47fc635aa2518cf269548d0 |
Hashes for sgx_dcap_quote_verify_python-0.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d795c5062e6e367613ba2f1d3e6f1afadb8bacec50342f004d34a17991f5327 |
|
MD5 | c3614303cf826382a0747fd6d581a607 |
|
BLAKE2b-256 | cd6ff0ef9dd3d0c174e2ece7698302c2b9f84c4e83af1301ab573ebac2ecc0a8 |
Hashes for sgx_dcap_quote_verify_python-0.0.2-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bf6ec4314a8dc87a22b33ae42629eef475018c47bfe1ab5361cb3cebd0809ad |
|
MD5 | 587a0086ab03d7f5d22177de1ef7f59e |
|
BLAKE2b-256 | b90f5318beafefd4553c238dde8964f0bd1ba6d6972c26049153cebdbbb8b45b |
Hashes for sgx_dcap_quote_verify_python-0.0.2-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b02ef39cd69b7a2cdfe17c4942f45b98e7f6f20d5c06d07b3a843161800091a6 |
|
MD5 | 4a23037ce20ad264a038131eb6dbf71a |
|
BLAKE2b-256 | 3a8c4723bf4e68dc9ecbd3a2b3bc0f353da33d6c874835f3e5e09329dc1bba5b |
Hashes for sgx_dcap_quote_verify_python-0.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fbd7e91b369553ae957009cde827832a1428c29c42fa23dbf3940c001cd53ea0 |
|
MD5 | ff26b994a69e26f538e9219912b64afc |
|
BLAKE2b-256 | ab1cdb65a9e5511bdf24db5d3bb89bfb4423d6ac8116d42fc46c9fc8c2c76705 |
Hashes for sgx_dcap_quote_verify_python-0.0.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4625be2567ac03871eaefc295c6ea5e6e1e45921e7c8b068bd70d1b5d904b75 |
|
MD5 | d4f80f7c9c40b699697bb49d2869e3b6 |
|
BLAKE2b-256 | 29fe840003a7cc453352fa67bed9dfe23b93cedd361ad8d6069b844a90b22cc3 |
Hashes for sgx_dcap_quote_verify_python-0.0.2-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b87b7db00fa876051966ca57252709d2a84aba4622ca6802c0fe390fd36bb7c9 |
|
MD5 | f876e5e49c9f22bcb6b09d14a1d73758 |
|
BLAKE2b-256 | 2b28db914d04616c493de105b583a2e9ea727b60cfd68dd44f056a271b38259a |
Hashes for sgx_dcap_quote_verify_python-0.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 853d70c6294aeb14387cd35a3616ca2732062c2358d46ec40adc76304748fc10 |
|
MD5 | 864cc1a7dcd74716430c1b8c5880a32b |
|
BLAKE2b-256 | 07f9143e773564cec83cfebd5ba642f72743a53364792b592459e2d1a02f1042 |
Hashes for sgx_dcap_quote_verify_python-0.0.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b6bd5141ed5ea9c961d13c4489a3ad7b61107e6cdfd1d25bbc6cbafd878f24a |
|
MD5 | b5cd36821e5a25d0b23fe1d6117522f0 |
|
BLAKE2b-256 | 4f8fc595532e5a8a2a067823c30e4fe52685aa1e723990c1aa06ce3e80f48746 |
Hashes for sgx_dcap_quote_verify_python-0.0.2-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd64636ca21b0908320ae8eaa25178361df74bf93d9c98c7f7e9d189219ec0cc |
|
MD5 | 6a51d4c79a8e88dc3c0bb55c7f552980 |
|
BLAKE2b-256 | 067992d0194895f80860d51ceb9f6f640af433085f5a863d1e32f9e2434d03b5 |
Hashes for sgx_dcap_quote_verify_python-0.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8429509a134d7fce0f33de112f0c4b519ea0790965076935523e00a101622bdf |
|
MD5 | 161cffe5e8557e659f77e76be73bd3e9 |
|
BLAKE2b-256 | 4786b434248f74aa3f7bd390bb02181d218cee2752ff15571a03e8b33e23f5ad |
Hashes for sgx_dcap_quote_verify_python-0.0.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6376f2a19a9bc3a8f30bac2c66bda866115f57ad9d6dcfbe9583dd425617fb39 |
|
MD5 | 42fc89b7302d754f71dd5a4aead79a17 |
|
BLAKE2b-256 | 65eb62eb105f9d18809623b927bc62ff9ab1b58e34b107f20bd1f2153bbe40e9 |
Hashes for sgx_dcap_quote_verify_python-0.0.2-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e888ba1e7acd2ca94c6215abfe0c0b7eb23190be5b699b04a1334be945571cf4 |
|
MD5 | d70bc5ba8d7c889cd53c6f71146716f3 |
|
BLAKE2b-256 | 543c185cf6a6a145cfe56d702db8d451de9afa117298333b56f549838442d497 |
Hashes for sgx_dcap_quote_verify_python-0.0.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1fff6f47035b05de5bb69709eec8413e1c234ce4f65720f3319e56c10a641204 |
|
MD5 | f32d09d10003e8ee83591ae6adf7bacc |
|
BLAKE2b-256 | e2fb0798111de24dd78bcbd69e6cb64adb5e9f2de29ddf1b82fb73875989e545 |
Hashes for sgx_dcap_quote_verify_python-0.0.2-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebc0c7d09b40ded355f47dc738f8c68d3311d9c56549a76ee0c6d77cec2bfce0 |
|
MD5 | 4985674c9aebfa6d4efb2327f59ff7fa |
|
BLAKE2b-256 | 3e88537a1189fd3edb49d36598b76c5b834ea6b1f129b7e5f6fe75a7c2fbc1f4 |