>> Encryption comes in two forms, as do the keys.
>>加密有两种形式,密钥也是。Symmetric encryption uses one key, the same key for encrypting and decrypting.
对称加密使用一个密钥,加密和解密使用同一个密钥。
It's very fast, but there's a key distribution security problem:How do you distribute a secure key over an insecure medium?
它非常快,但是有一个密钥分发安全问题:如何在不安全的介质上分发安全密钥?
If a man in the middle gets the key as it's transmitted, that person can use it to decryptand maybe even change and re-encrypt the messages that flow between two parties.
如果中间的人在密钥传输时获得密钥,那么这个人可以使用它来解密,甚至可能更改和重新加密在双方之间流动的消息。One might think an out of band method by calling someone with the keyor emailing it would address the issue, but that's not scalable.
有人可能会认为使用带外方法(out - of - band)调用密钥或发送电子邮件就可以解决这个问题,但这是不可伸缩的。Older symmetric encryption algorithms include DES, 3DES, and RC4.
较早的对称加密算法包括DES、3DES和RC4。Advanced Encryption Standard, AES, is the government-adoptedand worldwide symmetric encryption algorithm used today.
高级加密标准(Advanced Encryption Standard, AES)是当今世界各国政府采用的对称加密算法。Asymmetric encryption uses two keys, one called a public key,the other one called a private key.
非对称加密使用两个密钥,一个称为公钥,另一个称为私钥。There's no key distribution security problem,but asymmetric encryption is much slower than symmetric encryption.
不存在密钥分发安全问题,但是非对称加密比对称加密慢得多。When you encrypt with the public key,the ciphertext can only be decrypted with the private key.
当您使用公钥加密时,密文只能使用私钥解密。When you encrypt with a private key,the ciphertext can only be decrypted with the public key.
当您使用私钥加密时,密文只能使用公钥解密。We'll see examples of each in a little bit.
我们会看到每个例子。RSA -- named after its inventors Rivest, Shamir, and Adleman --is the most widely used asymmetric encryption algorithm.
RSA——以其发明者Rivest、Shamir和Adleman的名字命名——是使用最广泛的非对称加密算法。It's used for SSL/TLS -- secure sockets layer/transport layer security --for protecting information you transmit and receive over the Internet, for instance,when you do your online banking or simply log into a website.
它用于SSL/TLS——安全套接字层/传输层安全性——用于保护您在Internet上传输和接收的信息,例如,当您进行在线银行业务或简单地登录网站时。
转载于:https://www.cnblogs.com/sec875/articles/10321311.html
相关资源:JAVA上百实例源码以及开源项目