All Projects → ctz → sgx-pwenclave

ctz / sgx-pwenclave

Licence: other
Using SGX to harden password hashing

Programming Languages

c
50402 projects - #5 most used programming language
C++
36643 projects - #6 most used programming language

Using SGX to harden password hashing

SGX is a way of running security-sensitive user-mode code in an 'enclave'. Code running in an enclave has its memory encrypted and authenticated, and cannot be observed by code running anywhere else. It's able to use device-specific keys to encrypt ('seal') data to future executions of itself or enclaves signed by the same key.

This project does PBKDF2 password hashing inside an SGX enclave. Password hashes are only available to enclaves which have been enrolled in a 'region', and therefore no amount of database leakage will jeopardise user passwords. Your stack of GPUs are useless here.

A region is represented with a AES key, and enclaves in a region have a copy of it sealed to them. The key itself can be kept offline and only used when enrolling new enclaves or doing disaster recovery.

See my corresponding blog post here.

Warning

This is extremely experimental. Use at your own risk. There is no warranty.

This repo includes a trivial region key, the enclave signing private key and the enclave runs in debug mode, so this in fact provides no meaningful security.

Tour

Interesting files:

Building

You will need:

  • The Intel SGX SDK.
  • Visual Studio 2012 (a prerequisite of the SGX SDK).
  • The Intel SGX Platform Software (comes with SDK) along with SGX-supporting hardware (a Skylake CPU and working BIOS). The SDK supports a simulator; I haven't tried that.

As a fairly obvious result of all this, this is Windows only for the moment.

Once you've got all that sorted, you should merely be able to load the solution and hit run.

I've tested this on a Dell Inspiron 5559 laptop.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].