Intel® Software Guard Extensions (Intel® SGX)
Use hardware-based isolation and memory encryption to provide more code protection in your solutions.

How to Return a Randomly Generated Enclave Number to Main

Giovanni_Plascencia
356 Views

Hello, I am really new to SGX and I need to be able to create and return a randomly generated number that was made in an enclave for a research project. I have figured out how to randomly generate a number in an enclave but I cannot figure out how to return the value for it to be used in the applications main. Thanks in advance.

0 Kudos
1 Solution
JesusG_Intel
Moderator
341 Views

Hello Giovanni,


You have two options:


  1. Create an ecall from the untrusted application to the enclave. The ecall will have an "out" pointer argument which the enclave will use to return the random number to the untrusted application.
  2. Create an ocall within the enclave. The ocall will pass the random number to the untrusted application using an "in" pointer argument.


This article will help, How do I call an Intel® Software Guard Extensions (Intel® SGX) Trusted Function from an Untrusted Ap...


Sincerely,

Jesus G.

Intel Customer Support



View solution in original post

3 Replies
JesusG_Intel
Moderator
342 Views

Hello Giovanni,


You have two options:


  1. Create an ecall from the untrusted application to the enclave. The ecall will have an "out" pointer argument which the enclave will use to return the random number to the untrusted application.
  2. Create an ocall within the enclave. The ocall will pass the random number to the untrusted application using an "in" pointer argument.


This article will help, How do I call an Intel® Software Guard Extensions (Intel® SGX) Trusted Function from an Untrusted Ap...


Sincerely,

Jesus G.

Intel Customer Support



JesusG_Intel
Moderator
327 Views

Hello Giovanni,


Do you still need help with this issue?


Sincerely,

Jesus G.

Intel Customer Support


JesusG_Intel
Moderator
299 Views

Hello Giovanni,


I hope the information I provided was helpful to you. Since we haven't heard from you we will no longer monitor this thread. If you need further assistance with this issue, please open a new thread.


Sincerely,

Jesus G.

Intel Customer Support


Reply