- Enclave (C)
- EnclaveLink (C++)
- ManagedEnclave (C++/CLI)
- App (C#)
- Auction (Solidity)
- Visual Studio 2017 (make sure to mark on C/C++, C#, and Windows SDK 8.1)
- Truffle Ganache
- Solc
- Intel SGX-SDK
- Open Trustee.sln with Visual Studio 2017
- Set App as the startup project
- Extract Solc archive into the directory Trustee\Win32
- Build the solution
Run Ganache with more than 50 accounts and set port on 8545 Run the App which starts the following scenario
- Trustee deploys the smart contract on Ganache
- It initializes the enclave, generating new keys and account
- The auctioneer account (first account) will send a deposit (5 eth) to the Enclave account
- The auctioneer starts the auction specifying the intervals and initial deposit
- 50 bidders will randomly generate bids and submit the encrypted bids to the smart contract
- The Enclave will retrieve the encrypted bids, determine the winner, and send a transaction
- The smart contract verifies the hash on the input submitted by the Enclave for consistency
- The winner is set and the losing bidder and the auctioneer start refunding their initial deposit
- Another stage (Future work) is set to reclaim the bid value from the winner