The Homomorphic Properties of Shamir Secret Sharing

If I want to get the value of s 1 − s 2 s_1 - s_2 s1s2, can I just use the minus operation for the secrets s 1 s_1 s1 and s 2 s_2 s2.
No, subtraction is not directly supported by the homomorphic properties of Shamir Secret Sharing. While addition of shares yields the shares of the sum of secrets, simply subtracting shares does not yield the shares of the difference of secrets.

To compute the shares of s 1 − s 2 s_1 - s_2 s1s2, you would need to do the following:

  1. Reconstruct s 1 s_1 s1 and s 2 s_2 s2 from their shares.
  2. Compute s 1 − s 2 s_1 - s_2 s1s2 to get the actual difference.
  3. Share the difference s 1 − s 2 s_1 - s_2 s1s2 using the secret sharing scheme to get new shares for the participants.

So subtraction requires reconstructing the original secrets, unlike addition which can be done directly on the shares while keeping the secrets encrypted. The homomorphic properties only support addition and scalar multiplication, not general subtraction.

The reason is that secret sharing schemes like Shamir’s are designed to make it difficult to reconstruct the actual secret values from shares alone. So operations that require knowing the secret values, like subtraction, cannot be done directly on the shares. Only operations that preserve the algebraic structure, like addition and scalar multiplication, are supported homomorphically.

Does this make sense? Let me know if you have any other questions!

How can I achieve the swap operation for two secrets such as s 1 , s 2 s_1,s_2 s1,s2 in one vector via its homomorphic properties of Shamir Secret Sharing?
You’re right that the basic homomorphic properties of Shamir secret sharing do not directly support a “swap” operation on two shares. However, there is a technique to achieve this using additive homomorphism. Here is the basic idea:

  1. Represent the two secrets s 1 s_1 s1 and s 2 s_2 s2 as vectors: s 1 = [ s 11 , s 12 , . . . , s 1 n ] s_1 = [s_{11}, s_{12}, ..., s_{1n}] s1=[s11,s12,...,s1n] and s 2 = [ s 21 , s 22 , . . . , s 2 n ] s_2 = [s_{21}, s_{22}, ..., s_{2n}] s2=[s21,s22,...,s2n] where s i j s_{ij} sij is the share of secret s i s_i si held by participant j j j.

  2. Define a “swapping” vector w = [ w 1 , w 2 , . . . , w n ] w = [w_1, w_2, ..., w_n] w=[w1,w2,...,wn] where w j = s 2 j − s 1 j w_j = s_{2j} - s_{1j} wj=s2js1j for all j j j. This vector represents the difference between the shares of the two secrets for each participant.

  3. Compute the shares of the vector s 1 + w s_1 + w s1+w using the additivity property. This gives a new set of shares [ s 11 + w 1 , s 12 + w 2 , . . . , s 1 n + w n ] [s_{11} + w_1, s_{12} + w_2, ..., s_{1n} + w_n] [s11+w1,s12+w2,...,s1n+wn].

  4. Distribute the new shares [ s 11 + w 1 , s 12 + w 2 , . . . , s 1 n + w n ] [s_{11} + w_1, s_{12} + w_2, ..., s_{1n} + w_n] [s11+w1,s12+w2,...,s1n+wn] to the participants.

  5. Each participant can now subtract their individual w j w_j wj value from their new share to recover the share they should have received for secret s 2 s_2 s2.

  6. The end result is that the shares for s 1 s_1 s1 have been transformed into the shares for s 2 s_2 s2, thereby achieving a “swap” of the two secrets in a homomorphic fashion.

The keys are: (1) Representing the secrets as vectors, (2) Defining a “difference” vector that represents swapping the secrets, (3) Using additive homomorphism to compute and distribute new shares, and (4) Having each participant locally subtract the difference to recover the swapped share.

Does this make sense? Let me know if you have any other questions!

The Answer from Perplexity

Shamir’s Secret Sharing scheme is an efficient secret sharing algorithm for distributing private information among a group so that the secret is split into multiple shares, which individually do not give any information about the secret. The shares are of the form ( x 0 , f ( x 0 ) ) , ( x 1 , f ( x 1 ) ) , … , ( x n − 1 , f ( x n − 1 ) ) (x_0,f(x_0)), (x_1,f(x_1)), \ldots , (x_{n-1},f(x_{n-1})) (x0,f(x0)),(x1,f(x1)),,(xn1,f(xn1)) where the x i x_i xi are n n n distinct nonzero elements of a finite field F \mathbb F F, and f ( x ) f(x) f(x) is a polynomial of degree k − 1 k-1 k1 with coefficients in F \mathbb F F [1].

To achieve the swap operation for two secrets such as s 1 , s 2 s_1,s_2 s1,s2 in one vector via the homomorphic properties of Shamir Secret Sharing, we can use the fact that Shamir’s Secret Sharing is ( + , + ) (+,+) (+,+)-homomorphic, which means that the addition of two polynomial secrets equals the Lagrange’s interpolation of the sum-of-shares for the same subset of shares[2].

To swap s 1 s_1 s1 and s 2 s_2 s2, we can add s 1 s_1 s1 and s 2 s_2 s2 to obtain s 1 + s 2 s_1+s_2 s1+s2, and then subtract s 1 s_1 s1 from s 2 s_2 s2 to obtain s 2 − s 1 s_2-s_1 s2s1. We can then use Shamir’s Secret Sharing to split s 1 + s 2 s_1+s_2 s1+s2 and s 2 − s 1 s_2-s_1 s2s1 into shares and distribute them among the parties. The parties can then locally compute the sum and difference of the shares, respectively, to obtain the shares for s 2 s_2 s2 and s 1 s_1 s1, respectively[1].

In summary, we can use Shamir’s Secret Sharing scheme to achieve the swap operation for two secrets such as s 1 , s 2 s_1,s_2 s1,s2 in one vector via its homomorphic properties. We can add s 1 s_1 s1 and s 2 s_2 s2 to obtain s 1 + s 2 s_1+s_2 s1+s2, and then subtract s 1 s_1 s1 from s 2 s_2 s2 to obtain s 2 − s 1 s_2-s_1 s2s1. We can then use Shamir’s Secret Sharing to split s 1 + s 2 s_1+s_2 s1+s2 and s 2 − s 1 s_2-s_1 s2s1 into shares and distribute them among the parties. The parties can then locally compute the sum and difference of the shares, respectively, to obtain the shares for s 2 s_2 s2 and s 1 s_1 s1, respectively[1].

Citations:
[1] https://crypto.stackexchange.com/questions/1483/how-do-you-find-a-single-cheater-in-shamir-secret-sharing
[2] https://crypto.stackexchange.com/questions/102465/shamirs-secret-sharing-homomorphism-for-different-degree-polynomials

By Perplexity at https://www.perplexity.ai/search/a1fda1b1-f078-48cd-93bd-efb478d8cbc0

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
同态加密和秘密分享都是保障数据隐私的加密技术,下面我会详细介绍它们的步骤、原理和实现方法。 1. 同态加密技术 同态加密是一种特殊的加密技术,它可以在密文的状态下,对其进行计算并输出结果,而无需解密。同态加密具有以下三种类型: - 完全同态加密(Fully Homomorphic Encryption,FHE):在密文状态下,可以进行任意的计算,包括加法和乘法等。 - 部分同态加密(Partially Homomorphic Encryption,PHE):只能进行一种运算,如加法或乘法等。 - 有限同态加密(Somewhat Homomorphic Encryption,SHE):可以进行有限次的加法和乘法计算。 同态加密的实现方法包括以下几个步骤: - 密钥生成:生成公钥和私钥。 - 加密:将明文进行加密,生成密文。 - 同态运算:在密文状态下,对密文进行同态计算,得到结果。 - 解密:使用私钥对结果进行解密,得到明文。 同态加密的原理是基于数学中的群论和模运算等数学概念。在同态加密中,密文的加法和乘法运算等同于明文的加法和乘法运算,但是在密文状态下进行,可以保护数据的隐私和安全。 2. 秘密分享技术 秘密分享是一种将秘密信息分成多份,并分配给多个人,只有在满足一定条件时,才能恢复出原始秘密信息的技术。秘密分享的实现方法包括以下几个步骤: - 秘密分割:将原始秘密信息分成多份,并分配给多个人。 - 分配密钥:将密钥分配给参与者,使得只有在满足一定条件时,才能恢复出原始秘密信息。 - 恢复秘密:在满足一定条件时,参与者合作,使用各自的密钥恢复出原始秘密信息。 秘密分享的原理是基于拉格朗日插值法和多项式求值等数学概念,通过将原始秘密信息进行拆分和分配,从而实现对秘密信息的安全保护。 总的来说,同态加密和秘密分享都是保障数据隐私的加密技术,它们的实现方法和原理都基于数学和密码学等学科的基础理论和算法。同态加密可以在密文状态下进行计算,而秘密分享可以将秘密信息分割和分配,从而保障数据的安全性和隐私性。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值