This is a creation in Article, where the information may have evolved or changed.
Recently in the Golang standard library, see in,,, and crypto aes des ars sha so on, suddenly feel familiar and unfamiliar, usually when the development of the need to encrypt the decryption when always look at the document copy come over, superficial understanding, it is time to put them in line, sub-classification.
Symmetric encryption
Same key
Common algorithms: DES, 3DES, DESX, RC4, RC5, RC6, and AES
DES (Data Encryption Standard) class: The first batch of encryption algorithms, mainly for financial and embedded devices, but because the key (56-bit) too short, so security is questioned.
Note: In fact, the programming world is very focused on naming, especially protocols and specifications, so we can not only look at abbreviations, or to understand the abbreviation for which the number of words.
AES (Advanced encryption) can be seen in the name as a more secure way to encrypt.
RC (Rivest Cipher) class: Ron Rivest is an American cipher, this class is a stream encryption algorithm, the key length is variable.
Asymmetric encryption
The two sides use different secret keys, two keys have a certain mathematical relationship
Common algorithms: RSA, DSA, ECC
RSA: Because of its importance, it is named after the initials of three inventors.
DSA (Digital Signature algorithm): Signature algorithm.
ECC (Elliptic Curve Digital Signature algorithm): Commonly used algorithms for mobile devices.
Hash encryption
Generate fixed-length summaries, irreversible
Common algorithms: MD2, MD4, MD5, SHA, SHA1, SHA2, SHA256, SHA512, HMAC, HMAC-SHA1
MD (MESSAGE-DIGEST): Message digest class, hashing algorithm, after encryption is fixed-length string, generally used for data consistency check, MD followed by the number of the version upgrade.
SHA (Secure Hash Algorithm): Secure Hash Algorithm class, evolved by the MD class encryption algorithm.
Note: MD5 and SHA have been cracked, of course, the crack does not mean that there is no use but the possibility of being cracked.
HMAC (Keyed-hash message authentication code): Message hash authentication code, need a secret key, data encryption and can verify the identity.
And HMAC-SHA1 hmac-sha256 These are nothing more than will be used to HAMC the secret key first for SHA encryption and then use.