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

Protected File System Library

yg1
Beginner
1,176 Views

Hi,
I'm using Intel protected file system library. When I create a file using sgx_fopen_auto_key(), where is it exactly getting stored, and how can I locate it in the untrusted part?
Also, is it possible to get the path of the file?

Thanks.

0 Kudos
1 Solution
JesusG_Intel
Moderator
1,142 Views

Hello Yg1,


The declaration of sgx_fopen_auto_key is:

 

sgx_fopen_auto_key

The sgx_fopen_auto_key function creates or opens a protected file.

Syntax

SGX_FILE* sgx_fopen_auto_key(

const char* filename,

const char* mode

);

Parameters

filename [in]

The name of the file to be created or opened.

 

You specify the file path, which is where the file is located, in the first argument, const char* filename. The API for sgx_fopen behaves like its counterpart in C, fopen.

 

The protected file cannot be opened for reading or writing by the untrusted application since the file is encrypted with an enclave sealing key. The section Intel® Protected File System Library in the SGX Developer Reference Guide has more details.

 

Related Information:


Sincerely,

Jesus G.

Intel Customer Support


View solution in original post

0 Kudos
4 Replies
JesusG_Intel
Moderator
1,143 Views

Hello Yg1,


The declaration of sgx_fopen_auto_key is:

 

sgx_fopen_auto_key

The sgx_fopen_auto_key function creates or opens a protected file.

Syntax

SGX_FILE* sgx_fopen_auto_key(

const char* filename,

const char* mode

);

Parameters

filename [in]

The name of the file to be created or opened.

 

You specify the file path, which is where the file is located, in the first argument, const char* filename. The API for sgx_fopen behaves like its counterpart in C, fopen.

 

The protected file cannot be opened for reading or writing by the untrusted application since the file is encrypted with an enclave sealing key. The section Intel® Protected File System Library in the SGX Developer Reference Guide has more details.

 

Related Information:


Sincerely,

Jesus G.

Intel Customer Support


0 Kudos
yg1
Beginner
1,117 Views

Hello Jesus,

Thanks for your information, but should I need to take backup of the file created by sgx_fopen_auto_key function, so where can I find the file content?​

0 Kudos
JesusG_Intel
Moderator
1,091 Views

Hello Yg1,


You specify the location of the file in the filepath argument: const char* filename.


If you don't specify a full path, the file will be created in the same directory where your app is executed.


Sincerely,

Jesus G.

Intel Customer Support


0 Kudos
JesusG_Intel
Moderator
1,060 Views

This thread has been marked as answered and Intel will no longer monitor this thread. If you want a response from Intel in a follow-up question, please open a new thread.


0 Kudos
Reply