RUST + TEE (trusted execution environment)


#1

Is there any on-going effort to use rust to write TEE code?

Are people interested in some collaborative effort?


#2

would be a great match for Rust, at the moment this code tends to be written in C, often with the classic vulnerabilities that go along with that.

however, last time I checked, there is a maze of different proprietary APIs for trusted execution, so say, targeting the trusted enclave on an Intel processor is significantly different from AMD, en yet again different for ARM (and then there’s OS specific APIs for Android/Linux/Windows…).

so doing this generally would be no small feat !

there are specific projects like https://github.com/baidu/rust-sgx-sdk
this seems relevant too (ARM) https://www.evenchick.com/dl/slides/bh-asia-18-rustzone.pdf


#3

Thanks for the links. The Baidu framework is very interesting.


#4

Try Rust -> Risc-V compilation. I’d like to take a look at this myself in the next couple of months.


#5

happen to have done this a while ago, works pretty well with current nightly
(though there are some limitations, like no floating point support, but likely that’s not important for TEE)