需要加密和完整性吗?

发布于 2024-09-28 20:32:28 字数 56 浏览 5 评论 0原文

为什么有些场景需要加密和完整性,而有些场景只需要加密?在网络领域的情况下,决定这一点的因素是什么?

Why do some scenarios require both ciphering and integrity whereas some scenarios require only ciphering ? What are the factors that decide this in the case of networking domain ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

呆萌少年 2024-10-05 20:32:28

大多数进行加密的系统也会一路提供消息完整性,因此您的问题实际上提出了错误的二分法。

Most systems that do ciphering also provide message integrity along the way, so your question is really posing a false dichotomy.

濫情▎り 2024-10-05 20:32:28

当您希望只有授权人员才能访问查看数据时,就需要加密。完整性是指授权人员可以访问并修改数据。

如您所见,加密和完整性之前都需要身份验证和授权阶段。

例如:数据可以使用不同的私钥进行加密,并使用相对不同的公钥进行解密。这些阶段取决于身份验证和验证。授权阶段。

例如:当您通过 HTTPS 连接时,第一阶段是协商正确的证书。通常,客户端授权服务器检查证书链的信任度。

例如:您必须访问中央数据库中的数据。数据可以加密也可以不加密,但是对密钥和/或数据的访问必须仅在身份验证和授权检查之后进行。

希望我的考虑对你有帮助

Ciphering is needed when you want that only authorized people can ACCESS TO SEE the data. Integrity is when authorized people can ACCESS TO MODIFY the data.

As you can see, both ciphering and integrity need an authentication and authorization phase before.

Ex: Data could be chipered with different private keys and deciphered with the relative different public keys. These phases depend onto the authentication & authorization phase.

Ex: when you connect via HTTPS, the first phase is a negotiation of the correct certificate. Typically the client authorize the server checking the trust of the certificate chain.

Ex: You have to access to data in your central DB. Data could be ciphered or not, but the access to the key and/or the data must be done only after an authentication and authorization check.

I hope my considerations help you

葬心 2024-10-05 20:32:28

加密可以保护您传输中的文本,但它并不能证明您是谁。添加完整性控制还可以证明您的身份。

场景:

我可以加密 ATM 和银行服务器之间的数据。没有人可以嗅探此流量并将其解密,因此您可以假设它是“安全的”。但没有什么可以阻止中介重播这些交易。或者通过重放在不同 ATM 位置看到的流量,即使攻击者不知道交易实际包含什么内容。交易不作为实体链接到任何特定的 ATM。因此,如果我提取 100 美元,那么中介可以从多个位置重播流量交换 10 次,并导致我提取 1000 美元。

在交换中添加完整性控制可以将交易锁定到仅单个系统,并且还可以证明交易没有被修改。例如,我可以让 ATM 签署每笔交易的数字时间戳副本。现在,当重放加密流量时,服务器可以判断这是一个错误交易,因为时间戳将是旧的。或者,如果重放来自不同位置的类似 ATM 的交易,那么服务器还可以确定它正在与与实际预期不同的身份进行通信。因此,虽然加密可以保护交易通道的安全,但完整性可以确保解密流量的两个端点实际上正在与他们期望的一方进行通信。

Encryption protects your text in transport, but it doesn't prove who you are. Adding an integrity control also proves your identity.

A scenario:

I can encrypt data between an ATM and a bank's server. No-one can sniff this traffic and decrypt it, so you can assume that it's "secure". But there's nothing to stop an intermediary from replaying those transactions. Or from replaying traffic seen at a different ATM location, even if the attacker doesn't know what the transaction actually contains. The transactions are not linked to any specific ATM as an entity. So if I withdraw $100 then an intermediary can replay the traffic exchange 10 times from multiple locations and cause me to withdraw $1000.

Adding an integrity control to the exchange can lock the transaction to only a single system and also prove that the transaction was not modified. So, for example, I can get the ATM to sign a digitally timestamped copy of each transaction. Now when the encrypted traffic is replayed, the server can tell that it's a false transaction as the timestamp will be old. Or if the a transaction from a similar ATM at a different location is replayed, then the server can also ascertain that it's talking to a different identity than the one actually expected. So while encryption secures the transaction channel, integrity makes sure that the two end-point decrypting the traffic are actually talking to the party that they expect.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文