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

How to Return a Randomly Generated Enclave Number to Main

Giovanni_Plascencia
783 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
768 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 Application?


Sincerely,

Jesus G.

Intel Customer Support



View solution in original post

0 Kudos
3 Replies
JesusG_Intel
Moderator
769 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 Application?


Sincerely,

Jesus G.

Intel Customer Support



0 Kudos
JesusG_Intel
Moderator
754 Views

Hello Giovanni,


Do you still need help with this issue?


Sincerely,

Jesus G.

Intel Customer Support


0 Kudos
JesusG_Intel
Moderator
726 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


0 Kudos
Reply