The sealed-bid-auction is a Java application designed to demonstrate how to confidentially submit bids to an auction by leveraging Conclave Beta 3.
All bids submitted are delievered as Conclave Mail via HTTP to the Spring Host which is running an Enclave.
Each of these bids are confidentially decrypted by the Enclave to not let the host or anyone else know of the value. Once The enclave has received all five bids, it calculates which of the five is the highest and sends the winning encrypted bid back to host.
This winning bid is saved in host memory so that it can be queired to reveal the winning bid using the reveal_winner GET endpoint.
- Install Docker
docker run --name blind-auction -p 8080:8080 -it -d -v C:\ws\blind-auction\:/sdk -w /sdk ubuntu bash
docker exec -ti blind-auction apt update
docker exec -ti blind-auction apt install -y openjdk-8-jdk
- Clone this project to your local machine.
- Open the project in IntelliJ and run the Webserver->Host->Tasks->build->assemble configuration to create the Spring Server jar file.
docker exec -ti blind-auction cp /sdk/Webserver/host/build/libs/host.jar /tmp/
docker exec -ti blind-auction java -jar /tmp/host.jar
Run Client.main()
(If you receive an InvalidEnclaveException
, copy the key hash that is "acceptable" and overwrite the existing one on line 37 of Client.java)