alxdavids / voprf-poc

Proof-of-concept implementation of the (V)OPRF protocol in https://datatracker.ietf.org/doc/draft-irtf-cfrg-voprf/
23 stars 8 forks source link

Process (V)OPRF test vectors as part of unit tests #21

Open alxdavids opened 4 years ago

alxdavids commented 4 years ago

Problem

Currently test vector outputs for a full VOPRF invocation have to be verified manually by running both a HTTP server & client for both the rust and go versions of the code.

Task summary

Generate expected values for each of the test vector inputs on full VOPRF executions between a server and a client. The unit tests should verify that the expected values are correct. In other words, the tests should emulate a full VOPRF execution and then check that the outputs in the test are equivalent to the expected values.

The expected values should include the finalized outputs of the protocol, as well as the proof values. In particular, we define the output of the protocol to be the output of the Finalize algorithm. The proof values are defined as part of the Eval algorithm when running the VOPRF functionality.

These values should be stored in the test vectors files as new members of each of the JSON objects.

Note: we do not necessarily have to define test vectors for the simpler OPRF case (non-verifiable), as the functionality is strictly weaker. Thus it is checked when running the more expressive VOPRF.

Milestones

Extensions

Useful links

alxdavids commented 4 years ago

Thanks for your work @mskd12! I've updated the issue with what has been completed. I'm going to take a stab at writing similar tests in golang.

@mskd12 If you were interested in integrating your program for updating the expected values in the test vectors into this repository in a way that we could update the vectors periodically, that would be really useful.

mskd12 commented 4 years ago

@alxdavids, sure, I will add that file to the test-vectors directory!