Intel® Software Guard Extensions (Intel® SGX)
Discussion board focused on hardware-based isolation and memory encryption to provide extended code protection in solutions.

Adding Protobuf INSIDE the Enclave, possible? and how?

Shin__Billy
Beginner
1,260 Views

Hi folks, 

Just started working with SGX, so I am trying to figure out what's possible and what's not.

Basically, somewhere outside, is serializing, and encrypting their protobuf message. 

We receive it in the SGX app, send the encrypted data into Enclave, unencrypt, and deserialize INSIDE the enclave to do some data manipulation. Then we re-serialize and re-encrypt, and pass it back out.

In order to do the above, we need protobuf libraries in the libraries. Is this possible?

 

0 Kudos
5 Replies
Roshan_Mehta
Beginner
1,260 Views

I wanted to do the something if you get the know the answer or made it possible. Please do let me know.

0 Kudos
Hoang_N_Intel
Employee
1,260 Views

There is an open source example at https://bitbucket.org/P2PUsingSGX/p2pusingsgx that shows you how to use openssl for encryption, boost library to implement the communications and Google protobuf libraries and rapidjson to serialize transferred data. Please take a look at its source code and see whether it helps with your implementation or not.

0 Kudos
l__dd
Beginner
1,260 Views

emmm I also want to do the same job,but I have no idea about that.

enclave doesnot support any serialization library

maybe metadata and json could help.anyone has idea about that?

0 Kudos
you_w_
New Contributor III
1,260 Views

Hi everyone,  if  someone want to use protobuf inside sgx, you can use protobuf-c  which can be static linked inside sgx enclave.

Reguards you.w

0 Kudos
yu_d_
Beginner
1,260 Views

Welcome to try rust-sgx-sdk which include a full functional memory-safe protobuf implementation in Rust. Here is the code example:

https://github.com/baidu/rust-sgx-sdk/tree/master/samplecode/protobuf

0 Kudos
Reply