Decryption results in incorrect value.
Closed this issue · 4 comments
ch3njust1n commented
Write unit tests for each function.
Functions to check
- sampleShamirPolynomial
- shamirShare
- shamirAdd (python backend)
- evaluateAtPoint
- interpolateAtPoint
- lagrangeConstantsForPoint
- shamirReconstruct
- modularInverse
- power
- gcd
ch3njust1n commented
Something's wrong with the evaluateAtPoint() unit tests in encryption.test.ts
on feat/csv-shares
branch
ch3njust1n commented
Nvm evaluateAtPoint()
is working. The issue I was facing had to do with how to set globals in multiple Jest tests.
ch3njust1n commented
Also just checked that the frontend and backend are both using the same prime number.
ch3njust1n commented
Fixed in commit d14d27e