This is a threshold SM2 signature program. It still need to be tested before they can be used, only for learning and communication.
Abstract
A threshold signature is a special digital signature in which the N-signer share the private key x and can construct a valid signature for any subset of the included t-signer, but less than
2022/10/30 Its time to renew this program, the main priniple is not, the point is the paillier encryption. and we should build the object, not one and one function. and the big problem is safenet to bigint, everything is changed. we can do it. come on. one and one function to modify.
2022/4/13
Now, we have optimized the paillier encryption, and the speed has increased by 7 times, but it is still far from enough. The main changes are as follows
- My level is limited, and I haven't written great code. Regarding the paillier encryption module, I refer to github.com/roasbeef/go-go-gadget-paillier, and copied part of it (because the function is written differently, it cannot be called directly ). In the original paillier encryption, (N+1)^mmod N^2 is changed to Nm+1modN^2. In addition, the decryption uses the Chinese remainder theorem (CRT), the ExpI of point multiplication is replaced.
- Please refer to https://journal.hep.com.cn/fcs/EN/10.1007/s11704-022-2288-x DOI: 10.1007/s11704-022-2288-x for theoretical running time
现在,我们对paillier加密做了优化,速度提高了7倍,但是仍然远远不够. 主要改动如下
- 本人水平有限,没有写出很棒的代码,关于paillier加密模块,我参考了github.com/roasbeef/go-go-gadget-paillier,并复制了其中一部分(因为函数写法不同,无法直接调用)。对原有的paillier 加密中 (N+1)^mmod N^2变为Nm+1modN^2,另外,解密用了**剩余定理(CRT),对点乘的ExpI进行了替换。
- 理论运行时间请看https://journal.hep.com.cn/fcs/EN/10.1007/s11704-022-2288-x