-
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
Alternative Primitive Polynomial #90
Comments
Hi. Glad you are finding this useful. I'm sorry to say I'm probably not the right person to answer your question, and to provide alternatives that are cryptographically safe to use. I'll leave this here though in case anyone else wants to chime in. Cheers. |
@danielstreit The problem that you face is that When we try to compute (From my home made Python polynomial division routine I have:) For the log tables you need a primitive polynomial, take a look at https://www.ece.unb.ca/tervo/ece4253/polyprime.shtml (red polynomials) for a list. |
First, thanks for the library! This has been very helpful!
I'm interested in using a different primitive polynomial and, while I'm able to get most alternatives to work, I'm having trouble getting Rijndael's polynomial to work: x^8 + x^4 + x^3 + x + 1 -> 283 -> 27. The initialization process fails to build the log table correctly, it seems. The resulting table has a large portion of null values.
I've tried a simple approach of replacing the primitive polynomial in
defaults.primitivePolynomials[8]
with 27 (or 283).I've tried using other primitive polynomials with this approach and it has worked. I was able to generate shares and recover them successfully.
Here are some alternative polynomials that I've tried and have worked as expected:
x^8 + x^4 + x^3 + x^2 + 1 -> 285
x^8 + x^5 + x^3 + x^1 + 1 -> 299
x^8 + x^6 + x^4 + x^3 + x^2 + x^1 + 1 -> 351
x^8 + x^6 + x^5 + x^1 + 1 -> 355
x^8 + x^6 + x^5 + x^2 + 1 -> 357
x^8 + x^6 + x^5 + x^3 + 1 -> 361
x^8 + x^7 + x^6 + x^1 + 1 -> 451
x^8 + x^7 + x^6 + x^5 + x^2 + x^1 + 1 -> 487
All of these are using the default 8 bits.
I expect that I'm doing something wrong or misunderstanding something fundamental about how this works.
Any thoughts or guidance on why it doesn't work or how to get it to work would be greatly appreciated!
The text was updated successfully, but these errors were encountered: