oasisprotocol / oasis-core

Performant and Confidentiality-Preserving Smart Contracts + Blockchains
https://oasisprotocol.org
Apache License 2.0
332 stars 109 forks source link

no way to add two bivariates polynomials (esp w/ different max degrees) #5832

Open bennetyee opened 3 weeks ago

bennetyee commented 3 weeks ago

https://github.com/oasisprotocol/oasis-core/blob/18da8bc49d92a543795246b8bb7fb574df070eec/secret-sharing/src/poly/bivariate.rs#L15

while we don't need to do proactive verifiable secret sharing by adding zero holed bivariate polynomials since we can do churp dimension switching and get the same effect, it will be useful to be able to add a zero holed bivariate polynomial to a bivariate used for churp, esp with the max degree(s) growing.

the rationale for wanting this ability is this: we would like to be able to optionally grow the reconstruction threshold (as well as the number of shareholders for availability) as the value of the secrets being protected grows. in the context of a blockchain system, this would correspond to something like the total value locked increasing over time as the usage increases.

peternose commented 3 weeks ago

Agree, adding add functionality will be needed in the future once we support changing the threshold. The current version doesn't do that, so I would postpone this to later.