Skip to content
The circuit virtual machine for the Faerieplay project
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
card
common
host
.gitignore
ChangeLog
INSTALL.html
LICENSE.txt
Makefile
README
README.html
TODO
config.make
doxygen.project
footer.make
header.make
notes.txt

README

* The architecture

The Faerieplay circuit virtual machine (CVM) is intended to be run in two
pieces: a small piece in secure hardware, and a larger piece (in terms of how
much data it stores) on the standard host. The secure hardware we support is the
IBM 4758 secure coprocessor (SCop). The SCop program is called cvm.

The SCop piece can also run on the host, communicating to the storage server
over UDP. This is decided before compiling, see INSTALL file.

* Running

- First obtain a circuit file from the compiler, eg. prog.runtime.

- Generate inputs for the program in the C-Json format. Example C-Json files can
  be found in sfdl/, eg. gcd-input.cjs and insert-sort-input.cjs. Note that the
  C-Json format has some support for concatenating data files. Eg. The inputs
  for gcd could be the monolithic "{a=35, b=28}", or the concatenation of
  "{a=25}" and "{b=35}".

- Start the storage server on the host, eg:
  $ card_server -d store
  to use the directory 'store' for writing the data.
  The running server can be used for many runs of the CVM. It responds to two
  signals: - SIGINT: delete all the data (arrays/containers) it has written,
	   - SIGQUIT: exit

- Run the circuit over the inputs:
  $ cvm prog.runtime < inputs.cjs
  This will print the results on standard output.


* Logging

The CVM, as well as our other modules, use the flexible log4cpp logging package.
Logging is configured dynamically using a configuration file. We have set up the
logging system to look for a file called log4cpp.properties in the current
directory by default. The configuration file can be specified by providing an
environment variable log4cpp_config_file. If no config file is found, the
logging system prints a warning, and uses a default logging level. This will
probably be too verbose for most users.

An example log4cpp.properties file is in the pir/common/ directory.

The names of the loggers currently in the system can be optained with the
get-logger-names.sh script, run from the root code directory. Currently they
are:

circuit-vm.card.batcher-network
circuit-vm.card.batcher-permute
circuit-vm.card.circuit-progress
circuit-vm.card.cvm
circuit-vm.card.enc-circuit
circuit-vm.card.gate-logger
circuit-vm.card.prep-circuit
circuit-vm.card.prep-circuit.test
circuit-vm.card.run-circuit
circuit-vm.card.run-circuit
circuit-vm.card.run-circuit.test
circuit-vm.card.stream-processor
circuit-vm.common.gate
json.get-path
json.get-path.test
mips.cpu
mips.mem
mips.runmips
mips.syscall
pir.card.configs
pir.card.lr-permutation
pir.common.test-logging
pir.common.utils
pir.host.hostcall

You can’t perform that action at this time.