我可以保留“公钥”吗?一个秘密
我想使用非对称加密过程而不使“公钥”真正公开。
我的世界包含 3 个角色:A、B、C 和一个公共消息库。
我希望 A 成为唯一能够加密(和解密)银行中的短消息(例如 AES 密钥)的人,并且我希望 A 能够稍后选择谁可以访问银行中的加密数据,而无需重新加密或将消息添加到银行。
它会像这样:
A 生成一个带有 RSA 的密钥对:(p1,p2),p1 是“私有”密钥(此处仅用于加密),p2 是“公共”密钥(此处仅用于解密)
A用 p1 加密消息并将其存储在公共银行中:A、B 和 C 可以访问存储的加密消息。目前,只有 A 可以解密消息。
后来,A 希望 B(并且只有 B)能够读取消息(但不能以他的名义在银行中写入更多消息),因此他以某种安全的方式将 p2 给 B。
RSA算法的使用是否正确? RSA 是否确保 B 和 C 在没有“公钥”p2 的情况下无法读取 M? 为什么有关非对称加密的词汇似乎阻止我这样做?有没有更好的方法来实现相同的功能?
任何建议将不胜感激
编辑: 我知道我没有以通常的方式使用 RSA 协议(公钥加密/私钥解密),但其背后的数学(据我所知)应该允许以相反的方式工作。
I would like to use an asymmetric encryption process without making the "public" key really public.
My world contains 3 actors : A, B, C and a public message bank.
I want A to be the only one able to encrypt (and decrypt) short messages in the bank (for example AES keys), and I want A to be able to later chose who gains access to the encrypted data in the bank without the need to re-encrypt or add messages to the bank.
It would go like this:
A generates a key pair with RSA : (p1,p2), p1 being the "private" key (used here only for encryption) and p2 being the "public" key (used here only for decryption)
A encrypts the messages with p1 and stores them in the public bank : A, B and C can access the stored encrypted messages. For now, only A can decrypt the messages.
Later, A wants B (and only B) to be able to read the messages (but not to write more messages in his name in the bank), so he gives p2 to B in some secure way.
Is it a correct use of the RSA algorithm ? Does RSA ensure that B and C will not be able to read M without the "public" key p2?
Why does the vocabulary around asymmetric encryption seem to deter me from doing so? Is there a better way to achieve the same functionality ?
Any advice would be much appreciated
EDIT :
I know that I'm not using the RSA protocol in the usual way (public key encryption/ private key decryption), but the math behind it (as I understand it) should allow working the other way around.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论