MPC-TSS lib
https://github.com/okx/threshold-lib/blob/main/docs/Threshold_Signature_Scheme.md
1、Background
Currently, there are two main types of protocols for ECDSA threshold signatures. The first type is the 2/2 signature proposed in the Lindell 17’ paper[1], and the second is the t/n signature represented by GG18[2] and GG20[3]. The t/n threshold signature protocol is relatively complex, requiring multiple rounds of communication between the parties during the generation and signing phases. It is not fast enough to meet the needs of high-traffic web3 use cases. In contrast, the 2/2 signature scheme proposed in the Lindell 17’ paper has a higher signing efficiency. However, if a key share is accidentally lost, the user’s asset will be unrecoverable. In view of this, we propose a 2/n signature scheme as an improvement on the Lindell 17’ protocol to balance signing efficiency and meet the business requirement of web3 use cases.
目前,ECDSA 门限签名协议主要有两种类型。第一种是 Lindell 17’论文[1]中提出的 2/2 签名,第二种是以 GG18[2]和 GG20[3]为代表的 t/n 签名。 t/n 门限签名协议相对复杂,在生成和签名阶段需要各方之间进行多轮通信。它的速度不够快,无法满足高流量 web3 用例的需求。相比之下,Lindell 17’论文中提出的 2/2 签名方案具有更高的签名效率。然而,如果密钥共享意外丢失,用户的资产将无法恢复。鉴于此,我们提出了 2/n 签名方案作为 Lindell 17’协议的改进,以平衡签名效率和满足 web3 用例的业务需求。
2、Overview of the Solution
We propose an ECDSA 2/n signature scheme based on Feldman's Verifiable Secret Sharing scheme (Feldman's VSS) and the Lindell 17’ protocol. When generating private key shares, we use the Feldman's VSS to generate individual private key share. During the signing phase, we use the Lindell 17’ protocol for two-party signatures to ensure the efficiency of the signing process. In the event of a lost or leaked key share, the user's assets will remain secure. Additionally, we support bip32 non-hardened key derivation, which only requires one key generation and can support multiple cryptocurrencies. If a key share is lost or leaked by one party, or if a new participant joins, we support resetting the key share to a new set of private key shares.
我们提出了一种基于 Feldman 可验证秘密共享方案(Feldman's VSS)和 Lindell 17' 协议的 ECDSA 2/n 签名方案。
- 在生成私钥共享时,我们使用 Feldman 的 VSS 来生成单独的私钥共享。
- 在签名阶段,我们使用 Lindell 17’协议进行两方签名,以保证签名过程的效率。
- 如果密钥共享丢失或泄露,用户的资产将保持安全。
- 此外,我们还支持 bip32 非强化密钥派生,只需生成一次密钥即可支持多种加密货币。
- 如果密钥共享丢失或被一方泄露,或者有新参与者加入,我们支持将密钥共享重置为一组新的私钥共享。
3、Supported Functionalities
This library implements the following functions:
- Key generation: Generates
{2,n}key shares using Feldman's VSS. In the case of ECDSA signing, additional key negotiation between the two parties is required to meet the Lindell 17’ two-party signature rule. - Key share refresh: If a key share is lost or leaked by one party, or if a new participant joins, all parties regenerate new random shares of the existing shared key and void the old shares.
- Bip32 key derivation: None of the parties know the complete private key. Only non-hardened key derivation is supported. Chaincode is jointly generated by multiple parties in the keygen phase.
- 2-party ECDSA signing: Uses the Lindell 17’ protocol to perform 2-party signatures according to the key generation rule. Neither party alone can generate a complete signature.
- 2-party ed25519 signing: A variant of EdDSA and Schnorr, where both parties jointly compute the complete signature.
该库实现了以下功能:
- 密钥生成:使用 Feldman 的 VSS 生成
{2,n}密钥共享。在 ECDSA 签名的情况下,需要双方进行额外的密钥协商,以满足 Lindell 17 的两方签名规则。 - 密钥共享刷新:如果一方丢失或泄露密钥共享,或者有新参与者加入,则所有各方都会重新生成现有共享密钥的新随机共享,并使旧共享失效。
- Bip32 密钥派生:各方都不知道完整的私钥。仅支持非强化密钥派生。 Chaincode 是在 keygen 阶段由多方共同生成的。
- 2 方 ECDSA 签名:使用 Lindell 17'协议根据密钥生成规则进行 2 方签名。任何一方都无法单独生成完整的签名。
- 2 方 ed25519 签名:EdDSA 和 Schnorr 的变体,双方共同计算完整签名。
2-party ECDSA signing 和 2-party ed25519 signing 之间是替代方案?
在描述的库中,"2-party ECDSA signing"和"2-party ed25519 signing"确实可以视为替代方案,因为它们都是用于生成数字签名的协议,但是使用的加密算法不同。这两种签名方法都是基于两方计算协议,如 Lindell 17’协议,来实现的,确保没有任何一方能够独立地生成完整的签名。下面是关于这两种签名方法的更多细节:
2-party ECDSA signing
- 算法基础: ECDSA(椭圆曲线数字签名算法)是一种广泛使用的数字签名算法,基于椭圆曲线密码学。
- 适用场景: 适用于大多数现有的区块链技术,如比特币和以太坊,这些系统内置了对 ECDSA 的支持。
- 特点: ECDSA 签名过程涉及随机数生成、椭圆曲线点的乘法等计算密集型操作。
- 安全性: 在 Lindell 17’协议下,两方共同生成签名,增强了密钥管理的安全性。
2-party ed25519 signing
- 算法基础: ed25519 是一种基于 Schnorr 签名的变体,它使用 EdDSA(Edwards-curve Digital Signature Algorithm)进行签名。EdDSA 是一种更现代的签名算法,设计时考虑了更高的安全性和更好的性能。
- 适用场景: 适用于需要高安全性和高性能的应用场景,如某些新的区块链平台和安全敏感的通信协议。
- 特点: ed25519 优化了计算过程,签名生成和验证速度快,同时对侧信道攻击具有较强的抵抗力。
- 安全性: 在两方协议下,同样保证了没有单一方能够控制完整的私钥或独立生成签名。
替代关系
这两种签名方法在功能上是相似的,都是为了在不共享完整私钥的情况下,通过两方合作生成数字签名。选择哪一种方法主要取决于特定的应用需求、目标平台的兼容性以及对安全性和性能的要求。例如,如果目标平台是以太坊,可能更倾向于使用 ECDSA;而如果安全性和性能是首要考虑,可能会选择 ed25519。
因此,这两种方法可以视为针对不同需求和环境的替代方案,开发者可以根据具体的应用场景和需求来选择最适合的签名技术。