Questions about using the Shamir secret sharing protocol #94
-
Discussed in #92Originally posted by sda427 May 20, 2024
Continuing from sda427 first question, I now have secret shares generated under a specified field (e.g., |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Well, if you want to work with a prime field modulo +7 (?), you first create a secure finite field type for that modulus: secfld = mpc.SecFld(7) And then you let each party "import" their share in this secure field. If a party has a share a = secfld(s) Note that for party print(await mpc.output(a)) |
Beta Was this translation helpful? Give feedback.
Well, if you want to work with a prime field modulo +7 (?), you first create a secure finite field type for that modulus:
And then you let each party "import" their share in this secure field. If a party has a share
s
(represented as an integer), then it executes:Note that for party$i$ , with $0\leq i < m$ , this means that $s$ should correspond to the value on the Shamir polynomial at $x=i+1$ . That's because the numbering of the parties starts at $0$ , but at $x=0$ we have the secret itself as value on the Shamir polynomial.
Then afterwards you can check if the value for the secret is correct like this: