hbs / PySSSS

Python Shamir Secret Sharing Scheme
53 stars 22 forks source link

GF256elt.py is not flexible enough #5

Closed DonaldTsang closed 3 years ago

DonaldTsang commented 9 years ago

Could you allow the customization of other suitable modulo polynomials except x^8+x^4+x^3+x+1 ? Because that will create a wider variety of "Cipher text" or "Salt" so it will be harder to crack.

hbs commented 9 years ago

Provide a PR, I'll consider it.

DonaldTsang commented 9 years ago

PR?

hbs commented 9 years ago

Pull Request

DonaldTsang commented 9 years ago

I don't know how to do that...

hbs commented 9 years ago

cf https://help.github.com/articles/using-pull-requests/

DonaldTsang commented 9 years ago

https://github.com/PolyPassHash/PolyPassHash/blob/master/python-reference-implementation/shamirsecret.py https://gowalker.org/github.com/steveruckdashel/sss

I found some resources that might work, but it uses the same polynomial

hbs commented 9 years ago

you fork hbs/PySSSS, make your change and submit a PR, or simply use you modified version.

That's what github is for

DonaldTsang commented 9 years ago

https://github.com/BED822/PySSSS

DonaldTsang commented 9 years ago

From http://www.samiam.org/galois.html

Exponents and logarithms

Exponentiation is done by repeated multiplication of the same number. With some, but not all, numbers in Rijndael's galois field, it is possible to traverse all possible values in the galois field except zero via exponentiation. Numbers for which this is possible are called generators. Rijndael's galois field has the following generators: 3 5 6 9 11 14 17 18 19 20 23 24 25 26 28 30 31 33 34 35 39 40 42 44 48 49 60 62 63 65 69 70 71 72 73 75 76 78 79 82 84 86 87 88 89 90 91 95 100 101 104 105 109 110 112 113 118 119 121 122 123 126 129 132 134 135 136 138 142 143 144 147 149 150 152 153 155 157 160 164 165 166 167 169 170 172 173 178 180 183 184 185 186 190 191 192 193 196 200 201 206 207 208 214 215 218 220 221 222 226 227 229 230 231 233 234 235 238 240 241 244 245 246 248 251 253 254 255

These same numbers can also be expressed in hexadecimal:

03 05 06 09 0b 0e 11 12 13 14 17 18 19 1a 1c 1e 1f 21 22 23 27 28 2a 2c 30 31 3c 3e 3f 41 45 46 47 48 49 4b 4c 4e 4f 52 54 56 57 58 59 5a 5b 5f 64 65 68 69 6d 6e 70 71 76 77 79 7a 7b 7e 81 84 86 87 88 8a 8e 8f 90 93 95 96 98 99 9b 9d a0 a4 a5 a6 a7 a9 aa ac ad b2 b4 b7 b8 b9 ba be bf c0 c1 c4 c8 c9 ce cf d0 d6 d7 da dc dd de e2 e3 e5 e6 e7 e9 ea eb ee f0 f1 f4 f5 f6 f8 fb fd fe ff

http://www.samiam.org/logtables.txt

hbs commented 3 years ago

GF256 was modified to accept generator as input.