TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Encryption algorithm with *multiple* decryption keys?

5 点作者 rrnechmech9 个月前
Sorry for what might be a dumb question but, does there exist an encryption algo that allows something to be encrypted in such a way that any number of n keys or passwords or the like might decrypt? (Obviously to obtain the same cleartext)

8 条评论

throwaway0192549 个月前
You encode the cleartext with a single master key. Then you encrypt the master key with multiple keys and store it together with the encrypted cleartext.<p>This will not take much more space as only the master key is encrypted multiple times.<p>Now anybody who has one of the keys can decrypt the master key and subsequently decrypt the cleartext.
评论 #41326615 未加载
solardev9 个月前
I took the OP to mean &quot;any one of n keys can decrypt&quot;, not &quot;you need at least n of x keys to decrypt&quot;.<p>In that case... dumb answer... but couldn&#x27;t you just encrypt it twice (or n times), with n separate keys? Or encrypt the actual thing with a symmetric key, then separately encrypt the symmetric key with a public keypair for each of n users, such that any one of them could regain the symmetric key for that one thing (but not anyone else&#x27;s private keys).
Terr_9 个月前
&gt; encrypted in such a way that any number of n keys or passwords or the like might decrypt<p>I&#x27;m assuming you mean &quot;it requires 2 or more keys but less than all of them&quot;, so I&#x27;d check variations of: <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Secret_sharing" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Secret_sharing</a><p>The cases for &quot;any individual key is enough&quot; or &quot;all keys required&quot; are much simpler.
raincom9 个月前
Look at a similar question on the crypto stack exchange: &quot;One Encryption, Many Decryption Keys&quot;:<p><a href="https:&#x2F;&#x2F;crypto.stackexchange.com&#x2F;questions&#x2F;39397&#x2F;one-encryption-many-decryption-keys" rel="nofollow">https:&#x2F;&#x2F;crypto.stackexchange.com&#x2F;questions&#x2F;39397&#x2F;one-encrypt...</a>
aborsy9 个月前
LUKS has several key slots. As someone said, it’s quite simple, the data encryption key is encrypted with multiple keys and stored in different slots.<p>You can encrypt the data encryption key with, say, any 2 keys out of 3. You concatenate any two keys into a single key, and encrypt the master key with that. That gives you Shamir scheme, that used in crypto currencies.
randompeach9 个月前
age-encryption.org their project has a good documentation &#x2F; standard of how age encryption works. Helped me to understand this topic better.
stop509 个月前
That would be the holy grail of encryption. The best we can do is an encryption method that needs an k amount of keys of n total keys to get the key that decrypts the data.
评论 #41323833 未加载
samrolken9 个月前
Threshold cryptography might be what you&#x27;re looking for.