Shamir秘密共享中质量数的大小是否会影响碎片的安全性?
我一直在努力实施Shamir的秘密共享,并且想知道所选质数是否会对安全性产生影响。这主要是因为我使用257在GitHub上看到了一些实现,并且使用大型Mersenne Primes(例如2^53-1)进行了一些实现。
感谢您的输入,谢谢!
I've been working on an implementation of Shamir's Secret Sharing, and was wondering if the prime number selected will impact on the security. This is mainly because I've seen some implementations on GitHub using 257, and some implementations using large Mersenne primes like 2^53 - 1.
Appreciate input on this, thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从数学的角度来看,保密是完美的:只要您至少要低于门槛,每个可能的秘密都可能同样可能,而您一无所知。
选择更大素数的主要原因是分享更大的秘密。您需要将秘密变成比Prime小的数字,如果您的秘密是一个大的计算机文件,那显然会失败。如果共享的秘密是一些对称密码加密实际消息的关键,那么您就会失去完美的保密性,而打破密码的风险与钥匙的大小密切相关。
出于实际目的,还要注意,如果您在秘密之后选择素数,那么您的选择可能会揭示有关秘密大小的内容。另外,请注意,只需一眼就可以折磨一个份额,而对于大质量来说,股份包含过多的细节,以至于人类无法快速记住。
当然,您总是可以将一个大秘密分为许多较小的秘密,并使用一个小素数独立编码它们。因此,以这种方式,素数的大小并不重要,但是特定的选择仍然可以决定您可以轻松地分解秘密和股票的表示。
From a mathematical perspective the secrecy is perfect: as long as you are at least one share below threshold every possible secret is equally probable, and you know nothing.
The main reason for choosing bigger primes is to share bigger secrets. You need to turn the secret into a number smaller than the prime, and if your secret were a big computer file, that would obviously fail. If the shared secret is the key to some symmetric cypher encrypting the actual message, then you loose the perfect secrecy and the risk of breaking the cypher correlates strongly with the size of the key.
For practical purposes also note that if you pick the prime after the secret, your choice might reveal something about the size of the secret. And also note that with a small prime a single share might get compromised with just a glance, while for a large prime a share wold contain too much detail for a human to memorize quickly.
Of course you can always split one big secret into many smaller secrets, and encode each of them independently using a small prime. So in that way the size of the prime doesn't matter so much, but the specific choice might still dictate how easily you can do the splitting of the secret and the representation of the shares.