-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unnecessary ruling out of zero in (CS)PRNG #107
Comments
@scrovy Did you ever get this solved? Do you have a working version in Python? Is available? Cross-compatibility is important! |
As far as I know it's a non crucial issue, especially for a large number of bits. Typically |
@jeffkitson-music I just finished working on my own cross-compatible port of |
To answer the non-zero question... I am sure it was a conscious decision. If random provided
|
What you're saying is that if all the coefficients |
Dividing a secret into pieces, with the simplified method, without the galileo field
Interpolation doesn't use With a galileo field Technically, according to the original paper... the polynomials used for Because |
Thanks for your implementation. Since this is audited, I'm using it as a basis for a (simplified) Python implementation of my own. Nevertheless I don't understand one thing: why do you restrict the cryptographically secure pseudo-random number generator to spit out non-zero coefficients for the polynomials? This reduces the search space slightly by
1/2^bits
for each coefficient (for largebits
this is not an issue but it is for smallbits
(forbits=1
the algorithm would break down completely since the coefficients would always be equal to1
, but fortunately you only allowbits>=3
)).secrets.js/secrets.js
Lines 228 to 231 in 14a4b68
Here, the
construct
function returns null on all-zeros (i.e., the zero vector)secrets.js/secrets.js
Lines 252 to 255 in 14a4b68
secrets.js/secrets.js
Lines 273 to 280 in 14a4b68
In these two, you keep generating new PRNG numbers until they are not the zero vector. For$1, 2, 3, \ldots, 7 \in GF(8)$ , but not 0.
bits=3
this means that the only coefficients allowed areThe text was updated successfully, but these errors were encountered: