Skip to content

SgxCryptoFile - App for Encrypting and Decrypting Files using Intel SGX

Notifications You must be signed in to change notification settings

LeoneChen/SGXCryptoFile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Jun 25, 2023
8b40fd0 · Jun 25, 2023

History

13 Commits
Jun 25, 2023
Jun 25, 2023
Jun 25, 2023
Jun 25, 2023
Jun 25, 2023
Jun 25, 2023
Jun 25, 2023
Jun 24, 2017
Jun 25, 2023
Jun 25, 2023
Jun 25, 2023

Repository files navigation

SgxCryptoFile

Introduction

SgxCryptoFile is an application for encrypting and decrypting HLS chunks using Intel SGX.

The encryption and decryption are implemented based on T_CRYPTO library provided by Intel SGX SDK.

It uses AES-128-GCM algorithm and it was written in pure C language.

In addition, it generates an encryption/decryption benchmark time.

Actually, the key is hardcoded inside the enclave.

Build the SgxCryptoFile

Prerequisites:

  • Ensure that you have the following required operating systems: Ubuntu* Desktop-14.04-LTS 64bits

  • Install Intel(R) SGX SDK for Linux* OS and follow all the instructions;

  • Use the following command to install the required tools to build SgxCryptoFile application:

  $ sudo apt-get install nasm

Build the SgxCryptoFile

The following steps describe how to build the SgxCryptoFile application.

  • Build the project with the prepared Makefile:

  • Hardware Mode, Debug build:

  $ make SGX_MODE=HW SGX_DEBUG=1
  • Hardware Mode, Pre-release build:
  $ make SGX_MODE=HW SGX_PRERELEASE=1
  • Hardware Mode, Release build:
  $ make SGX_MODE=HW
  • Simulation Mode, Debug build:
  $ make SGX_DEBUG=1
  • Simulation Mode, Pre-release build:
   $ make SGX_PRERELEASE=1
  • Simulation Mode, Release build:
   $ make
  • To clean the files generated by previous make command, enter the following command:
  $ make clean

Run the SgxCryptoFile

Encrypt File

To encrypt a file, enter the following command:

$ ./sgxCryptoFile -e -i [INPUT_FILE] -o [OUTPUT_FILE]

Decrypt File

To decrypt a file, enter the following command:

$ ./sgxCryptoFile -d -i [INPUT_FILE] -o [OUTPUT_FILE]

About

SgxCryptoFile - App for Encrypting and Decrypting Files using Intel SGX

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Makefile 30.8%
  • C++ 29.4%
  • C 19.1%
  • Assembly 10.9%
  • Shell 9.8%