I understand that it is more secure provided you use different keys. But don't take my word for it. I'm not a crypto-analyst. I don't even play one on TV.
The reason I understand it to be more secure is that you're using extra information for encoding (both multiple keys and an unknown number of keys (unless you publish the fact that there's two)).
Double encryption using the same key makes many codes easier to crack. I've heard this for some codes but I know it to be true for ROT13 :-)
I think the security scheme used by Kerberos is a better one than simple double encryption.
They actually have one master key whose sole purpose is to encrypt the session key and that's all the master key is used for. The session key is what's used to encrypt the real traffic and it has a limited lifetime. This has two advantages.
Evil dudes don't have time to crack the session key since, by the time they've managed to do it, those session keys are no longer in use.
Those same evil dudes don't get an opportunity to crack the master key simply because it's so rarely used (they would need a great many encrypted packets to crack the key).
But, as I said, take that with a big grain of salt. I don't work for the NSA. But then I'd have to tell you that even if I did work for the NSA. Oh, no, you won't crack me that easily, my pretty.
Semi-useful snippet: Kerberos (or Cerberus, depending on your lineage) is the mythological three-headed dog that guards the gates of Hell, a well-chosen mascot for that security protocol. That same dog is called Fluffy in the Harry Potter world (I once had a girlfriend whose massive German Shepherd dog was called Sugar, a similarly misnamed beast).
It is more secure, but not much. The analogy with physical locks is pretty good. By putting two physical locks of the same type on a door, you ensure that a thief that can pick one lock in five minutes now need to spend ten minutes. But you might be much better off by buying a lock that was twice as expensive, which the thief could not pick at all.
In cryptography it works much the same way: in the general case, you cannot ensure that encrypting twice makes it more than twice as hard to break the encryption. So if NSA normally can decrypt your message in five minutes, with double encryption, they need ten minutes. You would probably be much better off by instead doubling the length of the key, which might make them need 100 years to break the encryption.
In a few cases, it makes sense to repeat the encryption - but you need to work the math with the specific algorithm to prove it. For instance, Triple-DES is basically DES repeated three times with three different keys (except that you encrypt-decrypt-encrypt, instead of just encrypting three times). But this also shows how unintuitive this works, because while Triple-DES triples the number of encryptions, it only has double the effective key-length of the DES algorithm.
Encryption with multiple keys is more secure than encryption with a single key, it's common sense.
My vote is that it is not adding any additional security
No.
other than having to compromise two different private keys.
Yes, but you see, if you encrypt something with two ciphers, each using a different key, and one of the ciphers are found to be weak and can be cracked, the second cipher also must be weak for the attacker to recover anything.
There are two modes of using PGP: asymmetric (public key, with a private key to decrypt), and symmetric (with a passphrase). With either mode the message is encrypted with a session key, which is typically a randomly generated 128-bit number. The session key is then encrypted with the passphrase or with the public key.
There are two ways that the message can be decrypted. One is if the session key can be decryped. This is going to be either a brute-force attack on the passphrase or by an adversary that has your private key. The second way is an algorithmic weakness.
If the adversary can get your private key, then if you have two private keys the adversary will get both.
If the adversary can brute-force your passphrase or catch it with a keystroke logger, then the adversary can almost certainly get both of them.
If there is an algorithmic weakness, then it can be exploited twice.
So although it may seem like double encryption helps, in practice it does not help against any realistic threat.
The answer, like most things, is "it depends". In this case, it depends on how the encryption scheme is implemented.
In general, using double encryption with different keys does improve security, but it does not square the security, due to the meet-in-the-middle attack.
Basically, the attacker doesn't HAVE to break all possible combinations of the first key and the second key (squared security). They can break each key in turn (double security). This can be done in double the time of breaking the single key.
Doubling the time it takes isn't a significant improvement however, as others have noted. If they can break 1 in 10mins, they can break two in 20mins, which is still totally in the realm of possibility. What you really want is to increase security by orders of magnitude so rather than taking 10mins it takes 1000 years. This is done by choosing a better encryption method, not performing the same one twice.
The wikipedia article does a good job of explaining it.
Using brute force to break encryption, the only way they know they got the key, is when the document they've decrypted makes sense. When the document is double encrypted, it still looks like garbage, even if you have the right key - hence you don't know you had the right key.
For those who gave poor comparison like "locks on doors", think twice before you write something. That example is far from the reality of encryption. Mine is way better =)
When you wrap something, you can wrap it with two diferent things, and it becomes more secure from the outside... true. Imagine that to get to your wrapped sandwitch, instead of unwrap, you cut the wrapping material. Double wrapping now makes no sense, you get it???
WinRAR is VERY secure. There's a case where the goverment couldnt' get into files on a laptop a guy was carrying from Canada. He used WinRAR. They tried to make him give them the password, and he took the 5th. It was on appeal for 2 years, and the courts finally said he didn't have to talk (every court said that during this process). I couldn't believe someone would even think he couldn't take the 5th. The government dropped the case when they lost their appeal, because they still hadn't cracked the files.
发布评论
评论(8)
据我所知,如果您使用不同的密钥,它会更安全。。 但不要相信我的话。 我不是加密货币分析师。 我什至不在电视上玩过一场。
我理解它更安全的原因是您使用额外的信息进行编码(多个密钥和未知数量的密钥(除非您发布了有两个密钥的事实))。
使用相同密钥的双重加密使许多代码更容易被破解。 我在某些代码中听说过这一点,但我知道对于 ROT13 来说也是如此:-)
我认为 Kerberos 使用的安全方案比简单的双重加密更好。
他们实际上有一个主密钥,其唯一目的是加密会话密钥,这就是主密钥的全部用途。 会话密钥用于加密真实流量,并且其生命周期有限。 这有两个优点。
但是,正如我所说,对此要持保留态度。 我不为国家安全局工作。 但我必须告诉你,即使我确实为国家安全局工作。 哦,不,你不会那么容易让我崩溃的,我的美人。
半有用的片段: Kerberos(或 Cerberus,取决于您的血统)是神话中守卫地狱之门的三头狗,是该安全协议精心挑选的吉祥物。 在《哈利·波特》的世界里,这只狗被称为“蓬松”(我曾经有一个女朋友,她的巨大德国牧羊犬被称为“糖”,也是一种同样被错误命名的野兽)。
I understand that it is more secure provided you use different keys. But don't take my word for it. I'm not a crypto-analyst. I don't even play one on TV.
The reason I understand it to be more secure is that you're using extra information for encoding (both multiple keys and an unknown number of keys (unless you publish the fact that there's two)).
Double encryption using the same key makes many codes easier to crack. I've heard this for some codes but I know it to be true for ROT13 :-)
I think the security scheme used by Kerberos is a better one than simple double encryption.
They actually have one master key whose sole purpose is to encrypt the session key and that's all the master key is used for. The session key is what's used to encrypt the real traffic and it has a limited lifetime. This has two advantages.
But, as I said, take that with a big grain of salt. I don't work for the NSA. But then I'd have to tell you that even if I did work for the NSA. Oh, no, you won't crack me that easily, my pretty.
Semi-useful snippet: Kerberos (or Cerberus, depending on your lineage) is the mythological three-headed dog that guards the gates of Hell, a well-chosen mascot for that security protocol. That same dog is called Fluffy in the Harry Potter world (I once had a girlfriend whose massive German Shepherd dog was called Sugar, a similarly misnamed beast).
它更安全,但也不是很多。 与物理锁的类比非常好。 通过在门上安装两把相同类型的物理锁,您可以确保在五分钟内撬开一把锁的小偷现在需要花费十分钟。 但如果你买一把贵一倍的锁,小偷根本无法撬开它,情况可能会好得多。
在密码学中,它的工作方式大致相同:在一般情况下,您无法确保加密两次会使破解加密的难度增加两倍以上。 因此,如果 NSA 通常可以在五分钟内解密您的消息,而使用双重加密,他们需要十分钟。 如果将密钥长度加倍,情况可能会好得多,这可能会让他们需要 100 年才能破解加密。
在某些情况下,重复加密是有意义的 - 但您需要使用特定算法进行数学计算来证明这一点。 例如,Triple-DES 基本上是使用三个不同密钥重复三次的 DES(除了加密-解密-加密,而不仅仅是加密三次)。 但这也表明了它的工作原理是多么不直观,因为虽然 Triple-DES 使加密数量增加了三倍,但它的有效密钥长度却只有 DES 算法的两倍。
It is more secure, but not much. The analogy with physical locks is pretty good. By putting two physical locks of the same type on a door, you ensure that a thief that can pick one lock in five minutes now need to spend ten minutes. But you might be much better off by buying a lock that was twice as expensive, which the thief could not pick at all.
In cryptography it works much the same way: in the general case, you cannot ensure that encrypting twice makes it more than twice as hard to break the encryption. So if NSA normally can decrypt your message in five minutes, with double encryption, they need ten minutes. You would probably be much better off by instead doubling the length of the key, which might make them need 100 years to break the encryption.
In a few cases, it makes sense to repeat the encryption - but you need to work the math with the specific algorithm to prove it. For instance, Triple-DES is basically DES repeated three times with three different keys (except that you encrypt-decrypt-encrypt, instead of just encrypting three times). But this also shows how unintuitive this works, because while Triple-DES triples the number of encryptions, it only has double the effective key-length of the DES algorithm.
使用多个密钥加密比使用单个密钥加密更安全,这是常识。
。
是的,但是你看,如果你用两个密码加密某些东西,每个密码使用不同的密钥,并且其中一个密码被发现很弱并且可以被破解,那么第二个密码也必须很弱,攻击者才能恢复任何东西。
Encryption with multiple keys is more secure than encryption with a single key, it's common sense.
No.
Yes, but you see, if you encrypt something with two ciphers, each using a different key, and one of the ciphers are found to be weak and can be cracked, the second cipher also must be weak for the attacker to recover anything.
双重加密并不能提高安全性。
使用 PGP 有两种模式:非对称(公钥,用私钥解密)和对称(使用密码)。 无论哪种模式,消息都会使用会话密钥进行加密,会话密钥通常是随机生成的 128 位数字。 然后使用密码或公钥对会话密钥进行加密。
有两种方法可以解密该消息。 一是会话密钥是否可以解密。 这要么是对密码的暴力攻击,要么是由拥有您的私钥的对手发起的。 第二种方法是算法的弱点。
如果对手可以获得您的私钥,那么如果您有两个私钥,对手将获得两个私钥。
如果对手可以暴力破解您的密码或使用击键记录器捕获它,那么对手几乎肯定可以同时获得这两个密码。
如果存在算法弱点,那么它就可以被利用两次。
因此,虽然双重加密看起来似乎有帮助,但实际上它无助于抵御任何现实的威胁。
Double encryption does not increase the security.
There are two modes of using PGP: asymmetric (public key, with a private key to decrypt), and symmetric (with a passphrase). With either mode the message is encrypted with a session key, which is typically a randomly generated 128-bit number. The session key is then encrypted with the passphrase or with the public key.
There are two ways that the message can be decrypted. One is if the session key can be decryped. This is going to be either a brute-force attack on the passphrase or by an adversary that has your private key. The second way is an algorithmic weakness.
If the adversary can get your private key, then if you have two private keys the adversary will get both.
If the adversary can brute-force your passphrase or catch it with a keystroke logger, then the adversary can almost certainly get both of them.
If there is an algorithmic weakness, then it can be exploited twice.
So although it may seem like double encryption helps, in practice it does not help against any realistic threat.
与大多数事情一样,答案是“视情况而定”。 在这种情况下,就取决于加密方案是如何实现的。
一般来说,使用不同密钥的双重加密确实可以提高安全性,但由于 中间相遇攻击。
基本上,攻击者不必破解第一个密钥和第二个密钥的所有可能组合(平方安全性)。 他们可以依次破解每个密钥(双重安全)。 这可以用破坏单个密钥的两倍的时间来完成。
然而,正如其他人指出的那样,将所需时间加倍并不是一个显着的改进。 如果他们能在10分钟内破掉1球,那么他们就能在20分钟内破掉2球,这仍然是完全有可能的。 您真正想要的是将安全性提高几个数量级,这样就不需要 10 分钟,而是需要 1000 年。 这是通过选择更好的加密方法而不是执行两次相同的加密方法来完成的。
维基百科的文章很好地解释了这一点。
The answer, like most things, is "it depends". In this case, it depends on how the encryption scheme is implemented.
In general, using double encryption with different keys does improve security, but it does not square the security, due to the meet-in-the-middle attack.
Basically, the attacker doesn't HAVE to break all possible combinations of the first key and the second key (squared security). They can break each key in turn (double security). This can be done in double the time of breaking the single key.
Doubling the time it takes isn't a significant improvement however, as others have noted. If they can break 1 in 10mins, they can break two in 20mins, which is still totally in the realm of possibility. What you really want is to increase security by orders of magnitude so rather than taking 10mins it takes 1000 years. This is done by choosing a better encryption method, not performing the same one twice.
The wikipedia article does a good job of explaining it.
使用暴力破解加密,他们知道自己获得密钥的唯一方法是当他们解密的文档有意义时。 当文档经过双重加密时,即使您拥有正确的密钥,它仍然看起来像垃圾 - 因此您不知道自己拥有正确的密钥。
这太明显了还是我错过了什么?
Using brute force to break encryption, the only way they know they got the key, is when the document they've decrypted makes sense. When the document is double encrypted, it still looks like garbage, even if you have the right key - hence you don't know you had the right key.
Is this too obvious or am I missing something?
这取决于具体情况。
对于那些给出“门锁”之类的糟糕比喻的人,在写东西之前请三思而后行。 这个例子与加密的现实相去甚远。 我的好多了 =)
当你包裹一些东西时,你可以用两种不同的东西包裹它,并且从外面看它变得更安全......是的。 想象一下,为了拿到包裹好的三明治,你不是打开包装,而是切割包装材料。 双重包装现在没有任何意义,你明白了吗???
Its depends on the situation.
For those who gave poor comparison like "locks on doors", think twice before you write something. That example is far from the reality of encryption. Mine is way better =)
When you wrap something, you can wrap it with two diferent things, and it becomes more secure from the outside... true. Imagine that to get to your wrapped sandwitch, instead of unwrap, you cut the wrapping material. Double wrapping now makes no sense, you get it???
WinRAR 非常安全。 有一个案例,政府无法获取一个人从加拿大携带的笔记本电脑上的文件。 他使用WinRAR。 他们试图让他给出密码,他选择了第五个。 上诉了2年,法院最后说他不用说话(这个过程中每个法院都这么说)。 我简直不敢相信有人会认为他拿不到第五名。 当他们上诉失败后,政府撤销了此案,因为他们仍然没有破解档案。
WinRAR is VERY secure. There's a case where the goverment couldnt' get into files on a laptop a guy was carrying from Canada. He used WinRAR. They tried to make him give them the password, and he took the 5th. It was on appeal for 2 years, and the courts finally said he didn't have to talk (every court said that during this process). I couldn't believe someone would even think he couldn't take the 5th. The government dropped the case when they lost their appeal, because they still hadn't cracked the files.