Errors in the example code in README.md
ndokmai opened this issue · 1 comments
ndokmai commented
Hello,
I have spotted two major errors in the example code that need to be fixed.
- A number of functions return a
Result
, but the code does notunwrap()
them before use. This includes
Shard::from_base64_strings
QueryParams::new
query_params.prepare_query
- The comment "
Public parameters downloaded by the client
" seems to suggest that the client should downloadcommon_params
. This is not true. Following the paper's notations, the client should only downloadbase_params
, which contains the PRG seed, μ, and the M matrix, and generatecommon_params
or the A matrix from the PRG seed.
Thanks,
Ko
claucece commented
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.