This script allows you to execute a proof of concept of an Oblivious Turing Machine with various configurations.
You need to install Rust and Cargo to use tfhe-rs.
First, install the needed Rust toolchain:
rustup toolchain install nightly
Then, you can either:
- Manually specify the toolchain to use in each of the cargo commands: For example:
cargo +nightly build
cargo +nightly run
- Or override the toolchain to use for the current project:
rustup override set nightly
Cargo will use the nightly
toolchain.
cargo build
- Navigate to the project directory:
cd oblivious-tm-rs
- Make sure the
otm.sh
script is executable:
chmod +x otm.sh
- Run the script with the desired options:
./otm.sh -s=7 -p=1 -i=10
-
-s
or--step
: Specifies the number of steps the Turing Machine will execute. -
-p
or--program
: Chooses the program to execute:0
: Binary multiplication by 2.1
: Bit inversion.2
: Binary subtraction.
-
-i
or--input
: Provides the integer to be evaluated by the Turing Machine.
Example:
./otm.sh -s=7 -p=1 -i=10
This command will execute the Oblivious Turing Machine with the following configurations:
- 7 steps
- Bit inversion program
- Input value of 10