You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@teaclave.apache.org by Blaine Malone <no...@github.com.INVALID> on 2021/03/18 23:15:59 UTC

[apache/incubator-teaclave-sgx-sdk] Local attestation Examples (#328)

I'd like to use the local attestation example and pair it with a Rust `app`. Currently making ammendments to the Makefile to try and support this. 

Have we got an example of this already done somewhere? 

Also, have we got an example of sending messages between enclaves? The example doesn't seem to show this. 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave-sgx-sdk/issues/328

Re: [apache/incubator-teaclave-sgx-sdk] Local attestation Shared library (#328)

Posted by Yu Ding <no...@github.com.INVALID>.
@blmalone no worries. i'll get this done in 1~2 days :-)

but i don't have the latest "localattestation" similar to Intel's sample right now. the current local attestation is a Rust implementation of a very early version of Intel's local attestation sample. I'll have a summer intern who will work on the upgrade but i guess it's late for you :-(

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave-sgx-sdk/issues/328#issuecomment-804536064

Re: [apache/incubator-teaclave-sgx-sdk] Local attestation Shared library (#328)

Posted by Blaine Malone <no...@github.com.INVALID>.
@dingelish 
I'd like to use the localattestation project just have the app written in rust. I've been wrestling with this for a while now. I'm getting tripped up on ensuring that the Makefile is configured correctly. Do you have any examples of this already done? 

It's the source of the issue above. Thanks

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave-sgx-sdk/issues/328#issuecomment-804350531

Re: [apache/incubator-teaclave-sgx-sdk] Local attestation Shared library (#328)

Posted by Yu Ding <no...@github.com.INVALID>.
Regarding to the missing macro definition `println!` please add `#[macro_use]` before you do `extern crate sgx_tstd as std`. reference: https://github.com/apache/incubator-teaclave-sgx-sdk/blob/master/samplecode/hello-rust/enclave/src/lib.rs#L26

the reason is that by default, rust brings these on a regular `.rs` file (without `no_std` or `no_core`)

```rust
#[macro_use]
extern crate std;
use std::prelude::v1::*;
```

to import `sgx_tstd` you need to (on a 2015-styled crate) and using cargo (not xargo):
1. `#[macro_use] extern crate sgx_tstd as std` in `lib.rs` only
2. `use std::prelude::v1::*` in every `.rs` where you need functions exported by std;

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave-sgx-sdk/issues/328#issuecomment-804329584

Re: [apache/incubator-teaclave-sgx-sdk] Local attestation Examples (#328)

Posted by Blaine Malone <no...@github.com.INVALID>.
Example, 

```
######## APP Settings ########

App_Rust_Flags := --release
App_SRC_Files := $(shell find app/ -type f -name '*.rs') $(shell find app/ -type f -name 'Cargo.toml')
App_Include_Paths := -I ./app -I./include -I$(SGX_SDK)/include -I$(CUSTOM_EDL_PATH)
App_C_Flags := $(SGX_COMMON_CFLAGS) -fPIC -Wno-attributes $(App_Include_Paths)

App_Rust_Path := ./app/target/release
App_Enclave_u_Object :=lib/libEnclave_u.a
App_Name := bin/app
```

I'd like to add another enclave but want to ensure the /app knows that it exists.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave-sgx-sdk/issues/328#issuecomment-804135767

Re: [apache/incubator-teaclave-sgx-sdk] Local attestation Shared library (#328)

Posted by Blaine Malone <no...@github.com.INVALID>.
@dingelish that would be great! 

Not worried about the latest localattesation version. More concerned with being able to use a Rust all with multiple enclaves configured.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave-sgx-sdk/issues/328#issuecomment-804536771

Re: [apache/incubator-teaclave-sgx-sdk] Local attestation Shared library (#328)

Posted by Blaine Malone <no...@github.com.INVALID>.
@dingelish have you any ideas? 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave-sgx-sdk/issues/328#issuecomment-804267139