Systemsicherheit/7-SGX_Hands-on
saschato 341d128b27
Some checks failed
Latex Build / build-latex (Assignment 5 - Software Security - Teil 1) (push) Waiting to run
Latex Build / build-latex (Assignment 6 - Software Security - Teil 2) (push) Waiting to run
Latex Build / build-latex (Assignment 4 - Protokollsicherheit (Praxis)) (push) Has been cancelled
Latex Build / build-latex (Assignment 4 - Protokollsicherheit (Praxis)) (pull_request) Successful in 1m2s
Latex Build / build-latex (Assignment 5 - Software Security - Teil 1) (pull_request) Successful in 1m6s
Latex Build / build-latex (Assignment 6 - Software Security - Teil 2) (pull_request) Successful in 1m1s
Merge pull request 'Assignment-7-sgximpl' (#13) from Assignment-7-sgximpl into Assignment-7
Reviewed-on: #13
2024-07-08 11:03:26 +02:00
..
doc Assignment 7: abgabe neue formulierung 2024-07-07 22:13:20 +02:00
employee_keys [Assignment-7] add keys of Bob and Oskar 2024-07-06 17:52:46 +02:00
src [Assignment-7] Add License / Copy Notices 2024-07-08 09:41:14 +02:00
.gitkeep [Assignment-7] Flake + App base 2024-07-03 16:16:24 +02:00
flake.lock [Assignment-7] Flake + App base 2024-07-03 16:16:24 +02:00
flake.nix [Assignment-7] update flake and add missing enclave files 2024-07-06 17:42:39 +02:00
LICENSE Assignment 7 sgximpl: GNU GPLv3 License 2024-07-07 22:48:24 +02:00
README.md [Assignment-7] fixed README.md 2024-07-08 11:01:19 +02:00

Signature Relay for firmware

Documentation of the Assignment 7 in Systems Security at Ruhr-Universität Bochum. This is a program, that uses a TEE to build a signature relay to sign firmware with a master key. For more informationm, read the project description.

We recommend viewing the [repository](https://git.pfzetto.de/RubNoobs/Systemsicherheit/src/branch/master/Assignment 7 - SGX Hands-on) we worked on together at.

Requirements

You will need the latest version of OpenSSL. Execute the following command inside the src directory to automatically meet all requirements.

$ ./setup

Compiling

This project can be compiled for simulation environments or directly on the hardware.

  1. Simulated environment

In the src directory type the command

$ make SGX_MODE=SIM
  1. Hardware

In the src directory type the command

$ make

That creates all the necessary objects and binaries to execute. The executable binary will be src/signatureproxy.

Running

Running story

To execute an example usage of the project, execute ./simulate in src directory. Note, that this will only work, if you sucessfully compiled the project.

Manual Usage

Setup

Go to the src directory.

Initialize the Enclave keypair by executing: ./signatureproxy proxysetup -pkey <sealed_proxy_key.bin> > <proxy_public_key.pem>

Sign

  1. Create employee signature using ./signatureproxy employee -firm <firmware.bin> -ekey <employee_privat_key.pem> > <employee_signature.der> This step can also be done using OpenSSL: openssl dgst -sha256 -sign <employee_private_key.pem> -out <employee_signature.der> -in <firmware.bin>
  2. Use the signature proxy to resign the firmware using ./signatureproxy proxy -pkey <sealed_proxy_key.bin> -epub <employee_public_key.der> -firm <firmware.bin> > <proxy_signature.der> The enclave verifies the employee signature and signs the firmware if the signature is valid.
  3. Verify signature using cat <proxy_signature.der> | ./signatureproxy embedded -firm <firmware.bin> -ppub <proxy_public_key.pem> This step can also be done using OpenSSL: openssl dgst -sha256 -verify <proxy_public_key.pem> -signature <proxy-signature.der> <firmware.bin>

License

Everything we did ourselves is licensed under the GNU GPLv3 License

Contributors

  • Benjamin Haschka
  • Sascha Tommasone
  • Paul Zinselmeyer