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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc995ae9d117266aafce5f834171dd235209d5a80cbdf64d996c544278a4e5a3 |
|
MD5 | d918863239947282c13b53ace66de4a8 |
|
BLAKE2b-256 | 9848d2dbc8a24ffe4bc3b13cf88c09f95246f3eb3d72639e0d3c7db36adb532d |
Hashes for sgx_dcap_quote_verify_python-0.0.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6443298f7bf41b3ec3a6e270b58811598f8612b22ba0ffa3d0bedc9560a3ef6d |
|
MD5 | 4e112c44dc4a0ced7f17a750a9dcd97b |
|
BLAKE2b-256 | 909e510a2e811bfd38eff4abc0dfa369bf712e3ecff920deb3ac660ea92030bf |
Hashes for sgx_dcap_quote_verify_python-0.0.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae83f58f8b5ce1af2b7f8f48e0fffd4ecd543f3be6040f6d26bfded26888c490 |
|
MD5 | 9ab1ca90a2adc5c79aca1c2b4a3cad2b |
|
BLAKE2b-256 | 21b7228d9bb82e7934c7e19821db349ad98e5a26ee66189c0c40998194a0e1eb |
Hashes for sgx_dcap_quote_verify_python-0.0.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7855122ae6a8eef57182a82b45aa284faca05027e2947376590f006bf9cb2c8 |
|
MD5 | 7a46203a954ac118c6f5f67e9f0e1d65 |
|
BLAKE2b-256 | c293858e49a3b93036dbcfaf4fd724f54d25c1391abc4a1df38c768f35698de8 |
Hashes for sgx_dcap_quote_verify_python-0.0.1-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8703889c7675059711bb9d45166e71b617f499374c83252d0724f4d6f86b0c7 |
|
MD5 | 52e43aca07f2b612b6ad8f43b2348d7e |
|
BLAKE2b-256 | 0d37336c5f9a067985b2323bcefd0a3e7bce4f3958f2cfdfae26ad61b32f0ae2 |
Hashes for sgx_dcap_quote_verify_python-0.0.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 103480170469c160f665adc6d7d31128dcfac6e4cfa539d0bc409d5d9b94c163 |
|
MD5 | 082398dec9e32ccf2e08f8bba1097d0d |
|
BLAKE2b-256 | c2e6ee630c5caa63b93ebf5535190dedc34c4b37cd04eba6f5bbe64ee6ad77a0 |
Hashes for sgx_dcap_quote_verify_python-0.0.1-pp37-pypy37_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca9a9d0fb68ca3ff0efe3b397b05411051121d4e4c4d51875a807b7ff13fc984 |
|
MD5 | e63ba1a2e27692994321f8fdde3e07c9 |
|
BLAKE2b-256 | 0a7e556f06faecda716f9d562cb58c2f13377f05aa1319ab893e0853d682fd08 |
Hashes for sgx_dcap_quote_verify_python-0.0.1-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5153dcf64f01e6723fe779442e345b426709d3028b46374f457df4dc26e677af |
|
MD5 | cacf741355ece54a14eacda30c0dfad7 |
|
BLAKE2b-256 | 41b7c09548ab9d0f0c0e6205db420916989efc413183e2cfc125a559149aed7d |
Hashes for sgx_dcap_quote_verify_python-0.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 785ae7a5811cd3a49ef822a1dd50a990c8139917189d812faf9033feb80a7875 |
|
MD5 | 1112984e3c96fc690386215fdd4bc662 |
|
BLAKE2b-256 | 3fe302c8aa9eca7ac18547cc36224ffa77231ffe149cd07031cd3b58cc9cfc13 |
Hashes for sgx_dcap_quote_verify_python-0.0.1-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7731436d3dc94ccc05fbd2ba9fc05038e99876300e7c7eb3dabd1d277a45c443 |
|
MD5 | 9c1720751de1c2d3c3be09ce26b7c7e1 |
|
BLAKE2b-256 | e61a16776b80115540445595ba156fd99ac814b02edb6b5cdfb2da26aff7d896 |
Hashes for sgx_dcap_quote_verify_python-0.0.1-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55b3b95657e622a648ad292254b6d2dbaed90026a99aacdd0e852f72a5c4b783 |
|
MD5 | 1df2d86eaa523f6f0533e66435644483 |
|
BLAKE2b-256 | 1672393bbd519ac22e009370faff7ac674e2d0ae4589b8dda4b77f9be9706061 |
Hashes for sgx_dcap_quote_verify_python-0.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b87e300b100f80ba2bbae649c0b0dc1a0213591cc507e7f6a15bfbce0b98ea63 |
|
MD5 | 3cf9045da798bbdda4e0cd237479285d |
|
BLAKE2b-256 | b88e529023d67de9e7c55d8722e8c43309adbf6959359288acf692d1aee28182 |
Hashes for sgx_dcap_quote_verify_python-0.0.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49bfc2ebb61e97c7805b187d5dc85ef272d69946dbfa06615987a64467742b07 |
|
MD5 | 8d642298eabebe3e88b25b4127e6bc33 |
|
BLAKE2b-256 | 3385b9e6a63018f038d0cf0269ce8cefd0e54412b058d54d53e28143bdc9e81e |
Hashes for sgx_dcap_quote_verify_python-0.0.1-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5aef9ac12fb4797d9095302a0d65261e4f558e18215ce1a9e0ae609115043dee |
|
MD5 | 5b083466c63053a839f0eca834569fe4 |
|
BLAKE2b-256 | e10557128bdd37150ff512aaf15b615f8691ff4dd51bf276e83f08ce552182e8 |
Hashes for sgx_dcap_quote_verify_python-0.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 746a43ccb3683621e5765b6e0a6da4e00270d4788dda1dfffe633c9adcb6ee42 |
|
MD5 | fd9012d5c3ff24b7b86a98553ea309dc |
|
BLAKE2b-256 | fd11e42e90eee5f8aebfcbabba8be1e0d1456e86b3063724c792301bae088543 |
Hashes for sgx_dcap_quote_verify_python-0.0.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21012895aabcb31e8c93a8725b018a27cd85e05b32104ba9bbbd6f3419976cdf |
|
MD5 | e4e7138cddded877b83709008b5af7b8 |
|
BLAKE2b-256 | 0136c2d2d44d8d00cc7cf6ca5e9e39d358f383a42bdd22c3252ecb913ab76809 |
Hashes for sgx_dcap_quote_verify_python-0.0.1-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c309ad2a84403d02e87c2366700afc4f5d007f3d3a334ced35f2eb2e1590d304 |
|
MD5 | 62c8f25fdb2ff5afbcc585b7f9053462 |
|
BLAKE2b-256 | 049e655a5709a6e60450f9273a9cae63bc3f3a16aa1de2213b7dfde5f3cf1d72 |
Hashes for sgx_dcap_quote_verify_python-0.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6059c5476b4a459a8b999c2669ef5749beb757b9c403ef1d549bcd355b99faa5 |
|
MD5 | 352efe209496e3d2bd601e8f5df2ec53 |
|
BLAKE2b-256 | 6461b8cc2cf7fc52019c242da90e7e286ee6acef791ffe23e47976825997f24a |
Hashes for sgx_dcap_quote_verify_python-0.0.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab99ea50092d02e9df9060ae43dedf0062aa518316d17e8ec7a10608df89e193 |
|
MD5 | 12ff34b24e78d957e55a2532ff8f1164 |
|
BLAKE2b-256 | 27569e93057f1aa1ecb91e391c3c63969c40c9b6c37ca52c7a76ad968f066597 |
Hashes for sgx_dcap_quote_verify_python-0.0.1-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 828d55ef62fd56b30d707bd7662a48544d66e84bf1b799dc94cdfe775a374dc7 |
|
MD5 | 4950ce8c77d661aab345610f08aa8b18 |
|
BLAKE2b-256 | 26e15a0265150919004ec5bee2037d14edf2d31a8000c8b4a42f7ef7ebd4c7e5 |
Hashes for sgx_dcap_quote_verify_python-0.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 612d74946cb51205ef1ed05419a84fa7e2a44e2f375e4cecd0e417267e679368 |
|
MD5 | fdb6428ee045e877adbc9ff25dcbb717 |
|
BLAKE2b-256 | f8aacda530848a2b2732698f2396013233fd8661504d2c66f6e934e249745d8a |
Hashes for sgx_dcap_quote_verify_python-0.0.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5fc8790725430570cb73a77bfca6fe317f7ce31179c46e5f7f41a40c770f479 |
|
MD5 | 2897b9489ed7b18153cfea2888b3f145 |
|
BLAKE2b-256 | e65ed9b759fa8f0db63d09b118bb1cd9b8da49802b47727d6a2df54bc9114104 |