pkmoore / pph-opensgx

PPH with OpenSGX

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PPH-OPENSGX

#Contains SGX Implementation and PPH

##Download and boot ubuntu 14.04

###Commands to build and install PPH:

$ sudo apt-get update

$ sudo apt-get install git

$ git clone https://github.com/APPSEC-HedgeHog/PPHTestCode.git

$ sudo apt-get install openssl

$ sudo apt-get install libtool

$ sudo apt-get install check

$ sudo apt-get install libssl-dev libelf-dev

$ sudo apt-get build-dep qemu

build Open SGX
$ cd pph-opensgx

$ cd qemu

$ ./configure-arch

$ make -j $(nproc)

$ cd ../

$ make -C libsgx

$ make -C user

build pph
$ cd PolyPasswordHasher-C

$ autoreconf --install

$ ./configure

$ make

$ sudo make install //this will install library and copy the headers to /usr/local**

Run Python Ref: //Before running make sure above commands are executed and the OpenSGX is started. // make sure to install libssl

$ sudo apt-get install openssl //one time
$ sudo apt-get install libssl-dev //one time
$ cd ROOT REPOSITORY / PolyPasswordHasher
$ sudo apt-get install python-pip //one time
$ pip install crypto //one time
$ export PYTHONPATH=$PWD/python-reference-implementation
$ cd python-reference-implementation
$ python setup.py test

run test: Open two terminals

$ In One terminal cd PolyPasswordHasher-C/src and run ./polypasswordhasher

$ Second terminal goto root directory of repository and run

$ ./opensgx -k

$ ./opensgx -c user/pph_enclave/pph_enclave.c

$ ./opensgx -s user/pph_enclave/pph_enclave.sgx --key sign.key

$ ./opensgx -i user/pph_enclave/pph_enclave.sgx user/pph_enclave/pph_enclave.conf TO_ENCLAVE TO_HOST

You should see the messages exchanged between libpph and opensgx

Steps before pushing a commit to Git. $ 1. cd polypasswordhasher-src and do a make clean $ 2. cd user and do a make clean $ 3. cd libsgx and do a make clean $ 4. rm *.sgx and *.conf files generated in user/pph_enclave folder $ 5. rm sign.key file in root of repository. $ 6. remove temporary files that end with a ~(tilde) $ 7. rm -rf PolyPasswordHasher-C/m4 $ 8. rm -rf PolyPasswordHasher-C/config.log $ 9. rm user/enclu.c

do a git status in root of repository to find out what changes are done and what are the untracked files if you find still some changes after this that you havent done, then delete them.

Now git add individual files that you have changed $ git add //dont do git add --all

if you accidentally add in a commit then do $ git reset HEAD to remove that file from staging area

$ git commit //write something meaningful and save

$ git push origin master

About

PPH with OpenSGX

License:Other


Languages

Language:C 85.5%Language:C++ 5.1%Language:Perl 2.4%Language:Assembly 1.6%Language:Makefile 1.4%Language:Shell 1.0%Language:Python 0.7%Language:Forth 0.6%Language:Objective-C 0.6%Language:TeX 0.3%Language:DIGITAL Command Language 0.2%Language:Haxe 0.2%Language:M4 0.1%Language:PHP 0.1%Language:Batchfile 0.0%Language:Protocol Buffer 0.0%Language:Prolog 0.0%Language:Perl 6 0.0%Language:XSLT 0.0%Language:CMake 0.0%Language:Yacc 0.0%Language:Groff 0.0%Language:HTML 0.0%Language:NSIS 0.0%Language:Lex 0.0%Language:GDB 0.0%Language:eC 0.0%Language:XS 0.0%Language:Scheme 0.0%Language:CSS 0.0%Language:Gnuplot 0.0%Language:Ruby 0.0%Language:Emacs Lisp 0.0%Language:QMake 0.0%Language:Tcl 0.0%Language:Awk 0.0%