gburca / ssss-js

Shamir's Shared Secred Scheme - JS version of B. Poettering's Linux CLI utility

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Test cases fail to pass (bigEndian)

codemaster101 opened this issue · comments

Hi @gburca, we were testing your library on Linux One, IBM Z series. The big difference I can see is that x86 Architectures (where your test cases pass) vs Z (IBM Linux One etc, where 4 of your test cases fail) is that x86 is little endian and Z series is big endian. I tried debugging and it seems that the array of v (in encodeMpz, ssss.js) is flipped every 2 places.
i.e. [1, 2, 3, 4, 5, 6] -> [2, 1, 4, 3, 6, 5]
and also the value of v16 before retrieving x (in encodeMpz, ssss.js) is different.