没有项目描述
multi-party-schnorr的Python项目详细描述
多方schnorr签名(python扩展)
聚合签名:{n,n}基于simple_schnorr_multi_signatures_with_applications_to_bitcoin的方案和compact_multi_signatures_for_smaller_blockchains的离散日志方案(第5节)
不实现基于micali-ohta-reyzin:Accountable-Subgroup Multisignatures的多重签名方案。此代码当前用于2p-Schnorr key management。
基于provably secure distributed schnorr signatures and a {t,n} threshold scheme的阈值schnorr方案。为了更有效地实现,我们使用了Fast Multiparty Threshold ECDSA with Fast Trustless Setup中的dkg。代价是健壮性:如果在dkg的n个参与方中有一个恶意参与方,则协议停止;如果在用于签名协议的t个参与方中有一个恶意参与方,则将停止。
实现的目标是bip-schnorr兼容。
免责声明:
(1)本规范目前不应用于生产。
(2)此代码不安全,无法抵御旁道攻击
(3)代码不包含网络层(如果您感兴趣,请检查white-city以了解正在进行的工作,欢迎作出贡献)
开始
threshold 3 out of 5 with 4 parties in signing
安装
请使用python3.5或以上
通过pip安装pip3 install --user multi-party-schnorr
如何使用?请看示例*.py
无法在Windows上使用?请阅读issue/39
压缩密钥前缀
0x02, 0x03, 0x04
=>;对于1个签名中的1个0x05, 0x06, 0x07
=>;对于n个聚合签名中的n个0x08, 0x09, 0x0a
=>;对于n个阈值签名中的t
性能
type | secp256k1(~0.1.7) | libsecp256k1-rs(0.1.8) | emerald-city(0.1.9~) | test code link |
---|---|---|---|---|
1 of 1 aggregate | 112ms | 3ms | 1ms | aggregate_1_of_1.py |
n of n aggregate | 458ms | 7ms | 3ms | aggregate_n_of_n.py |
t of n threshold | 2475ms | 68ms | 33ms | thresholdbig_t_of_n.py |
开发过程
此贡献工作流在CONTRIBUTING.md中描述。
联系人
随时可以reach out或加入kzen研究Telegram讨论代码和研究。
许可证
库是根据gpl-3.0许可证的条款发布的。有关详细信息,请参见LICENSE。