Skip to content

Commit

Permalink
On chain DCAP verification (#134)
Browse files Browse the repository at this point in the history
* Initial version of on chain verification

* Rename from report to quote

* Add unit tests for decoding

* Implement signature check for TcbInfo and QeIdentity

* Cleanup

* Documentation

* Use size_of from core instead of std

* Deserialize EnclaveIdentity

* Refactor into smaller methods

* Add collateral data and improve tests

* Improve test

* Work on CRL parsing

* Make hex compatible to no_std

* Change license just in case...

* Cleanup

* Cleanup

* Cleanup

* Add data structures for TcbInfo collateral

* Work towards registering the quoting enclave

* Work towards registering the tcb info

* Adjust weights to polkadot-v0.9.29

* Switch to ring-xous

* Improve error handling and logging

* Cleanups and documentation

* Get rid of dangerous unwrap

* Error handling and cleanup

* Switch to collateral version v4

* Switch to DateTime instead of String

* Move collateral data to separate file

* Add more validation logic and tests

* Improve collateral handling and work towards registering the quoting enclave

* Switch license to GPL-3.0

* Register quoting enclave

* Add check for mrenclave

* More checks and error-handling

* Deserialize more parts of the collateral

* Remove unneccessary check

* Expand checks for quoting enclave

* Add dummy support to register TCB info

* Add code to extract certificate information

* Rename ias-verify crate to sgx-verify as it verifies dcap as well

* Work towards storing TCB info on chain

* Store TCB info on chain

* Store TCB info on chain

* Define fmspc as byte array

* Store the correct FMSPC

* Verify TCB info

* Verify TCB info

* Add register_quoting_enclave unittest

* Add register_tcb_info unittest

* Make the add_and_remove_dcap_enclave_works test work again

* Add a check to prevent out of memory issues

* Cleanup

* Clippy fixes

* Deal with potential errors that happen during DER encoding

* Separate verification and putting collateral on chain more strictly

* Cleanup log messages

* Add some fuzz tests

* Remove unnecessary pub

* Update Cargo.lock after merge and fix clippy issues

* Fix clippy issue

* Fix test issues

* Remove unused code

* Move the code for the unfinished CRL handling into a unit test

* Make clippy happy

* Add comment on how to extract the code for a certificate anchor

* Add fuzz test for extract_tcb_info

* Cleanup and documentation

* Incorporate review feedback

* Introduce type alias for mrsigner and mrenclave

* Incorporate review feedback

* Incorporate review feedback

* Incorporate review feedback

* Add another fuzz test

* Enable std features for std-compilation

* Cleanup

* Incorporate review feedback

* Add clarifying comment
  • Loading branch information
Niederb authored Jan 26, 2023
1 parent a820bed commit 20f7318
Show file tree
Hide file tree
Showing 57 changed files with 5,507 additions and 442 deletions.
227 changes: 177 additions & 50 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ members = [
"teerex",
"parentchain",
"sidechain",
"teerex/ias-verify",
"teerex/sgx-verify",
"teeracle",
"test-utils",
"xcm-transactor",
Expand Down
Loading

0 comments on commit 20f7318

Please sign in to comment.