确保来源的身份
Alice 想从 Bob 那里知道敏感资源的位置。鲍勃好心地告诉爱丽丝位置,但爱丽丝如何确定鲍勃的身份呢?
Bob是一个OpenBSD服务器,数据源是一个Python/C++ App。
我的想法是:
爱丽丝知道鲍勃的公钥。
Alice 用 Bob 的公钥加密随机字符串,并将其发送给 Bob。
Bob 恢复随机字符串,并对其进行哈希处理。 Bob 发回敏感资源以及哈希值。
这种方法的问题是:我可以安全地将私钥存储在Bob(服务器)上吗?如何?有更好的解决方案吗?
Alice wants to know from Bob the location of a sensitive resource. Bob Kindly tells Alice the location, but how can Alice be sure of the identity of Bob?
Bob is a OpenBSD server, and the source of data is a Python/C++ App.
My Idea was:
Alice Knows Bob's public Key.
Alice encrypt a random string with Bob's Public Key, and send it to Bob.
Bob recover the random string, and hash it. Bob send back the sensitive resource, along with the hash.
The problem of this method is: Can I safely store a private key on Bob (the server)? How? Is there a better solution?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果 Bob 没有私钥,那么 Bob 还知道什么可以用来识别自己的身份?如果你不能相信鲍勃会保证其私钥的安全,那么无论你做什么,你都会陷入困境。
如果值得花额外的钱,您可以做的一件事是拥有另一台不在线的机器(称为 Cipherclerk),它只能与 Bob 通信,并且只能进行某些类型的通信。密码员持有私钥,并用它为鲍勃解密。那么,即使鲍勃被远程破坏,至少私钥不会受到破坏。
对您的想法的增强是让鲍勃使用爱丽丝的随机字符串作为对称密钥来加密资源。
If Bob doesn't have a private key, then what else does Bob uniquely know that it can use to identify itself? And if you can't trust Bob to keep its private key safe, you're sunk no matter what you do.
If it's worthwhile spending the extra money, one thing you could do is have another machine (call it Cipherclerk) that is not online, can communicate only with Bob, and will only make certain kinds of communications. Cipherclerk holds the private key, and uses it to decrypt things for Bob. Then, even if Bob is compromised remotely, at least the private key isn't compromised with it.
An enhancement to your idea would be to have Bob use Alice's random string as a symmetric key to encrypt the resource.
如果有人可以发动中间人攻击,那么这种方法是完全不安全的。攻击者 Mallory 可以简单地剥离敏感信息,用她的信息替换,然后将其转发给 Alice。
解决方案是使用 TLS 或 SSH。无论哪种情况,请确保 Alice 拥有 Bob 的公钥或密钥指纹。这是一种广泛使用的解决方案,假设没有人可以更改 Alice 存储的数据或读取 bob 存储的数据,那么它是安全的。
This method is completely insecure if someone can mount a man in the middle attack. Mallory, the attack, can simply strip the the sensitive information out, substitute it with hers, and forward it on to Alice.
The solution is to use TLS or SSH. In either case, make sure Alice has bob's public key or key fingerprint. This is a widely used solution and is secure assuming no one can change the data Alice stores or read the data bob stores.