Skip to content

Latest commit

 

History

History
40 lines (30 loc) · 2.48 KB

README.md

File metadata and controls

40 lines (30 loc) · 2.48 KB

SecureGame

This is a simple game inspired by the classic video game Pong, but with a special twist - its game logic is implemented inside a VBS enclave.

Read the blog post to learn more:

screenshot

Project

Project contains a single solution with two projects:

  • SecureGame - The main process responsible for hosting the enclave, creating the window, querying player input and rendering using SDL2
  • SecureCore - VBS enclave library (.DLL) implementing the core game functionality and storing the game runtime data

Compiling

You will need:

Then just open SecureGame.sln and compile both SecureCore and SecureGame.

Testing

You will need:

config

The enclave library must be signed with a testing certificate. You can create and use a self-signed certificate:

New-SelfSignedCertificate -CertStoreLocation Cert:\\CurrentUser\\My -DnsName "MyTestEnclaveCert" -KeyUsage DigitalSignature -KeySpec Signature -KeyLength 2048 -KeyAlgorithm RSA -HashAlgorithm SHA256 -TextExtension "2.5.29.37={text}1.3.6.1.5.5.7.3.3,1.3.6.1.4.1.311.76.57.1.15,1.3.6.1.4.1.311.97.814040577.346743379.4783502.105532346"

And then use SignTool to sign the library:

signtool sign /ph /fd SHA256 /n "MyTestEnclaveCert" SecureCore.dll

Please note that you must create the certificate with the above command on your test machine (or test VM), or you'll need to export it and import it into the trusted certificate store on that machine.