Closed creemama closed 3 years ago
just a note, you have -DNORANDOM and -DTRACE on, this is only for development, since everything is predictable. if you want to deploy this in production remove -DNORANDOM at least from the makefile cflags.
looking into the rest.
the voprf branch does work. so the fix must be in the diff between master and voprf. will look at this after dinner.
eh, actually 50% of the tests fail also on the voprf branch. but that is great news, so it's all not broken, only a certain code path.
so the problem is when cfg->pkS is not packaged.
The µnit test started failing at the commit (https://github.com/stef/libopaque/commit/3ef6a113fbd0cf2b5334f38414f8162e5d20d164) that zeroes the size of notpackaged idU and idS in unpack. Running
make test
produces the following output:This appears to be the code that causes the test to fail:
I originally thought that replacing
ids->idU_len=0
withids->idS_len=0
in thecfg->idS == NotPackaged
conditional would fix the problem, but it did not.After commenting out the lines, the test passed again.
I also needed to make this change to the
makefile
to get tests to work:Without this change, I got the following error: