lib/
contains main PDID procedures including the implementation of modified OPAQUE and HMQV protocolslib/ecc.{c,h}
are from Easy-ECC. It is modified (to be compatible with Intel SGX and its SDK) and extended by PDID-related functions (prefixed withpdid_
)lib/tweetnacl.{c,h}
are from TweetNaClchaincode/
is the GPM smart contract to be deployed with Hyperledger Fabric Private Chaincode (FPC)
Local (emulation) test should work out of box: make && ./local_test
For better performance, you can use NaCl instead of TweetNaCl. Install NaCl, change the build path to yours
export NACL_PATH=../../nacl-20110221/build/Latitude5280
and compile with the following flags (for x86_64)
-I${NACL_PATH}/include/amd64 -L${NACL_PATH}/lib/amd64 -lnacl -DWITH_NACL
The integration test requires FPC deployment.
export GOPATH=~/
export FPC_PATH=$GOPATH/src/github.com/hyperledger/fabric-private-chaincode
git clone --recursive https://github.com/hyperledger/fabric-private-chaincode.git $FPC_PATH
cd $FPC_PATH/utils/docker
make pull-dev // download image
make run-dev // enter container
cd $FPC_PATH
make // Build Fabric Private Chaincode
- Delete original chaincode/ in the container
- Copy
chaincode/
andlib/
to FPC'ssamples/
(i.e., in the container). Then (in the container)cd samples/chaincode && make clean && make
. - In another terminal, run
./integration_test
and follow its instructions (do not directly run ./test.sh in samples/chaincode after the above step. Some parameter should be defined via ./integration_test)