yuvraj1803 / green_tee

Green TEE is a Trusted Execution Environment for ARM TrustZone enabled machines.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Green TEE: A Trusted Execution Environment (ARM TrustZone)

Green TEE is a Trusted OS designed to run in Secure-EL1 (S-EL1) mode on processors supporting ARM Trustzone. This project has 8 components which put together gives a working Linux Kernel in NS-EL1 and Green TEE running in S-EL1.

  • Arm Trusted Firmware: arm-trusted-firmware/
  • Green TEE Secure Payload Dispatcher (inside TF-A as EL3 runtime service): arm-trusted-firmware/services/spd/green_teed/
  • Buildroot: buildroot/
  • U-Boot: u-boot/
  • Linux Kernel: linux/
  • Linux Kernel TEE Driver: linux/drivers/green_tee
  • Green TEE Core: /tee
  • Linux Userspace Client: /client

Screenshot from 2024-09-18 13-58-45

The build system is designed to highly simplify the compilation process as these components have various build-time configurations.

The userspace client can use ioctl() to issue requests to the Linux Kernel which passes relevant information to TF-A through an SMC call. TF-A then switches context to Green TEE where the request is processed.

Services currently supported by TEE

  • GREEN_TEE_PRINT: Print a string in the Secure World terminal sent by NS-EL0 application.
  • GREEN_TEE_ENCRYPT: Encrypt a buffer passed from NS-EL0 using the One Time Pad cryptographic algorithm.
  • GREEN_TEE_DECRYPT: Decrypt a buffer passed from NS-EL0 using the One Time Pad cryptographic algorithm.

Building

chmod +x ./install.sh

./install.sh

make

Running

QEMU forwards S-EL1's serial device data to localhost:12345. A netcat connection has to be established on another terminal.

make nc (another terminal)

make run

Example

Upper Terminal: Linux Kernel

Lower Terminal: Green TEE

Screenshot from 2024-09-18 14-33-06

About

Green TEE is a Trusted Execution Environment for ARM TrustZone enabled machines.

License:GNU General Public License v3.0


Languages

Language:C 98.2%Language:Assembly 0.8%Language:Shell 0.4%Language:Makefile 0.3%Language:Python 0.2%Language:Perl 0.1%Language:Rust 0.0%Language:C++ 0.0%Language:Roff 0.0%Language:SmPL 0.0%Language:Yacc 0.0%Language:Lex 0.0%Language:Awk 0.0%Language:UnrealScript 0.0%Language:JavaScript 0.0%Language:Gherkin 0.0%Language:M4 0.0%Language:MATLAB 0.0%Language:sed 0.0%Language:Clojure 0.0%Language:Handlebars 0.0%Language:XS 0.0%