This fixes the Pedersen padding bug #76. To do this, I simply pad the input bits rather than bytes, so that the padding length check succeeds. I've also changed the tests slightly so that they're regression tests. I wasn't sure the best way to do it so let me know if you'd rather the parameters be different. To demonstrate the bug, you just need NUM_WINDOWS * WINDOW_SIZE to not be divisible by 8.
closes: #76
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
[X] Targeted PR against correct branch (main)
[X] Linked to Github issue with discussion and accepted design OR have an explanation in the PR that describes this work.
[X] Wrote unit tests
[X] Updated relevant documentation in the code
[X] Added a relevant changelog entry to the Pending section in CHANGELOG.md
[X] Re-reviewed Files changed in the Github PR explorer
Description
This fixes the Pedersen padding bug #76. To do this, I simply pad the input bits rather than bytes, so that the padding length check succeeds. I've also changed the tests slightly so that they're regression tests. I wasn't sure the best way to do it so let me know if you'd rather the parameters be different. To demonstrate the bug, you just need
NUM_WINDOWS * WINDOW_SIZE
to not be divisible by 8.closes: #76
Before we can merge this PR, please make sure that all the following items have been checked off. If any of the checklist items are not applicable, please leave them but write a little note why.
Pending
section inCHANGELOG.md
Files changed
in the Github PR explorer