konidev20 / pyshamir

Shamir key Split and Combine methods.
Mozilla Public License 2.0
140 stars 9 forks source link

Duplicates in EXP_TABLE in _constants.py #26

Closed Pankul94 closed 1 year ago

Pankul94 commented 1 year ago

I am looking at https://github.com/konidev20/pyshamir/blob/main/pyshamir/_constants.py#L39C7-L39C7 and found some duplicates. The value for EXP_TABLE[0x00] and EXP_TABLE[0xFF] both point to 0x01. Is this by design?

If you dont mind, can I get the reduction polynomial used for generating these tables.

konidev20 commented 1 year ago

Hey @Pankul94,

We had ported this code from the Golang implementation of Shamir Secrecy Sharing available in the HashiCorp Vault code base.

I see that you have pushed a fix with the latest implementation provided by HashiCorp.

Thank you for providing the insights on the risks of using lookup tables.

Thanks, @konidev20