brave-experiments/frodo-pir

Errors in the example code in README.md

ndokmai opened this issue · 1 comments

Hello,

I have spotted two major errors in the example code that need to be fixed.

  1. A number of functions return a Result, but the code does not unwrap() them before use. This includes
  • Shard::from_base64_strings
  • QueryParams::new
  • query_params.prepare_query
  1. The comment "Public parameters downloaded by the client" seems to suggest that the client should download common_params. This is not true. Following the paper's notations, the client should only download base_params, which contains the PRG seed, μ, and the M matrix, and generate common_params or the A matrix from the PRG seed.

Thanks,
Ko

Hi,

Thank you for the comment! The example in the API serves as an example only. We have added the unwrap.

The comment "Public parameters downloaded by the client" seems to suggest that the client should download common_params. This is not true. Following the paper's notations, the client should only download base_params, which contains the PRG seed, μ, and the M matrix, and generate common_params or the A matrix from the PRG seed.

That depends on your use case. Both types can be downloaded if wanted, depending on the needs.