Since the beacon value does not influence the performance of the implementation, we omitted it for simplicity.
The trusted setup established by the Ethereum community in their KZG ceremony can only support beholder signatures for files up to 4096 chunks, i.e., 131072 bytes. Since we aim to support bigger files, the setup should be generated as:
cargo run --bin setup --release -- --secrets N secrets.bin
Where
To generate a keypair, run
cargo run --bin kgen --release -- --secret-key=sk.bin --public-key=pk.bin
In order to generate a beholder signature on the file data.bin, execute the following command:
cargo run --bin prover --release -- --secret-key sk.bin --setup-file secrets.bin data.bin com.bin sig.bin
In this case, the setup is read from secrets.bin, the signature is saved as sig.bin,
and the commitment is written to com.bin.
In order to verify the signature generated as above, run:
cargo run --bin verifier --release -- --public-key pk.bin --setup-file secrets.bin --data-len $(du -b data.bin | cut -f 1) com.bin sig.bin
cargo nextest run