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

Protected File System Library

yg1
Beginner
572 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
538 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

4 Replies
JesusG_Intel
Moderator
539 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


yg1
Beginner
513 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?​

JesusG_Intel
Moderator
487 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


JesusG_Intel
Moderator
456 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.


Reply