Encryption algorithm Queue

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.