Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can teaclave completely replace the SGX SDK? #444

Open
digitalinformation opened this issue Aug 26, 2023 · 1 comment
Open

Can teaclave completely replace the SGX SDK? #444

digitalinformation opened this issue Aug 26, 2023 · 1 comment

Comments

@digitalinformation
Copy link

Hello, I have recently been researching blockchain privacy protection based on Trusted Execution Environment (SGX), can teaclava be a complete replacement for SGX SDK, and what are the advantages over SGX SDK? What languages does teaclave support for trusted blockchain-related development? And where should I start learning about teaclave about developing trusted blockchains? Do you have any examples of this? In addition to replacing the SGX SDK, does teaclave have other functions? Thank you

@yangfh2004
Copy link

yangfh2004 commented Nov 30, 2023

My understanding is that the Teaclave SGX SDK is essentially a port of rust std and SGX SDK wrapper. If you are writing C++, you might want to use this https://github.com/intel/linux-sgx

The low-level implementation is done by Intel. So it is just a Rust wrapper but you can write Rust and port existing Rust code into the TEE with much less effort. I suggest you write the Makefile, which shows the exact steps to make it work with Rust. The Rust code is compiled into a static library. It will be linked with the edge routine codes (auto-generated wrappers for ECALL and OCALL) as a dynamic library and signed by the SGX enclave signer. Then, your untrusted app can call this shared library to work with the TEE.

You see that the language does not matter, you can use any version of C++ or C to do the same work as long as it can be compiled as a static library and linked with the edge routine codes. The major part of this library is to provide the SGX version of Rust STD, which is similar to the regular Rust STD so that you can easily port your existing Rust code into the TEE and you have many convenient wrappers to call the Intel's SGX SDK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants