对称密码和非对称密码体系
Cryptography is a study of different techniques used for encryption and decryption of the text to convert the plain text into ciphertext and vice-versa. There are many different cryptographic techniques and algorithm which have been developed so far.
密码术是对用于文本加密和解密以将纯文本转换为密文,反之亦然的不同技术的研究。 到目前为止,已经开发了许多不同的密码技术和算法。
These are broadly classified into two types,
这些大致分为两种类型,
Symmetric key cryptography
对称密钥加密
Asymmetric key cryptography
非对称密钥加密
The sole difference between lies between the pair of keys used for encryption and decryption process.
两者之间唯一的区别在于用于加密和解密过程的一对密钥之间。
1)对称密钥加密 (1) Symmetric key cryptography)
In the symmetric key cryptography, the same key is used for encryption as well as decryption. To maintain the security levels, this key is kept private so that no third party or unauthorized member can access the data.
在对称密钥密码术中,相同的密钥用于加密和解密。 为了维持安全级别,此密钥保持私密,因此任何第三方或未经授权的成员都无法访问数据。
There are further two types of symmetric key encryption techniques,
还有另外两种类型的对称密钥加密技术,
Substitution technique
替代技术
In the substitution technique, the letters of the plain text are substituted by some other letters. This substitution is done with the help of a key and a suitable algorithm, and the decryption is also performed using the same key and just by reversion of the order of steps performed in the algorithm.
在替换技术中,纯文本字母被其他一些字母替换。 借助于密钥和适当的算法来完成该替换,并且还使用相同的密钥并且仅通过还原算法中执行的步骤的顺序来执行解密。
The substitution technique may also not be consistent throughout in all cases, i.e. the letter which is used for substituting any letter say
替代技术在所有情况下也可能不一致,例如,用于替换任何字母的字母
'm' at a position may or may not be the same letter for substituting 'm' at some different position of the plain text. According to this, there are 2 ways in which the substitution technique can be performed.
“M”的位置可以是或者可以不是用于在纯文本的一些不同位置取代的“m”相同的字母。 据此,有两种可以执行替换技术的方式。
- Mono-alphabetic Cipher: Here, in this case, a single cipher alphabet for each plain text alphabet throughout the text.单字母密码 :在这种情况下,这里是整个文本中每个纯文本字母的单个密码字母。 Eg. If we are substituting 例如。 如果我们用'm' by “ z”代替'z', then this substitution will take place throughout the encryption process.“ m” ,那么这种替换将在整个加密过程中进行。 Example: Caeser cipher 示例 :Caeser密码
- Poly-alphabetic Cipher: Here, in the case of a poly-alphabetic cipher, no fixed cipher alphabet is used for substituting the plain text alphabets. Different alphabets can substitute the same alphabet of plain text at different places.多字母密码 :在此情况下,对于多字母密码,不使用固定密码字母来代替纯文本字母。 不同的字母可以在不同的地方替换相同的纯文本字母。 Eg. If we are substituting 例如。 如果我们在某个位置用'm' by “ z”替换'z' at a place, then it may happen that “ m” ,则可能在其他位置用'm' is being substituted by some other letter say “ y”替换其他字母'y' at some other place.“ m” 。 Example: 示例 : Playfair cipher Playfair密码
Transposition technique
换位技术
The transposition technique includes performing some sort of permutation on the plain text letters. It should be noted that the length of plain text and cipher text remains the same in this technique.
换位技术包括对纯文本字母执行某种置换。 应该注意的是,在这种技术中,纯文本和密文的长度保持不变。
Eg. 'NAME' can be encrypted as 'MNAE' or 'EANM' etc.
例如。 可以将“ NAME”加密为“ MNAE”或“ EANM”等。
Examples: Rail-fence cipher
示例 : 围栏密码
2)非对称密钥加密 (2) Asymmetric key cryptography)
In the asymmetric key cryptography, a pair of different keys are used for encryption and decryption process. Usually, one of these keys is kept public, i.e. which is made available to all and the other is kept private, i.e. is available only to the authorized members. To maintain confidentiality and authentication, it is a convention that the encryption is done by the public key and the decryption with the help of the private key.
在非对称密钥加密中,一对不同的密钥用于加密和解密过程。 通常,这些密钥中的一个保持公开状态,即对所有人开放,而另一个保持私有,即仅对授权成员可用。 为了保持机密性和身份验证,一种惯例是,加密由公钥完成,并在私钥的帮助下进行解密。
Examples: Diffie Hellman Cipher, Elliptic curve cryptography
示例: Diffie Hellman密码 , 椭圆曲线密码学
翻译自: https://www.includehelp.com/cryptography/types-of-cryptography-symmetric-and-asymmetric.aspx
对称密码和非对称密码体系