[Preface]
This article briefly introduces the concepts related to encryption technology, and finally summarizes the existing encryption technology in java as well as its usage and examples.
[Simple encryption]
1. Simple concept
Plaintext: the information before encryption
Ciphertext: Confidential Information
Algorithms: encryption or decryption algorithms
Key: The key used by the algorithm (read as miyao, correct should be miyue, but everyone reads miyao)
2. Simple Example
Set 123456Add 1 to each number.234567,
123456 is the plaintext, 234567 is the ciphertext, And the encryption key is 1. the encryption algorithm is
3. symmetric encryption and asymmetric encryption
For example,
123456 --> 234567 of the encryption key is 1, and the encryption algorithm is for each +
234567 --> 123456 the decryption key is also 1, and the decryption algorithm is for each-
The encryption algorithm (+) and the decryption algorithm (-) are called symmetric encryption,
Likewise, asymmetric encryption is called an asymmetric encryption algorithm.
4. algorithm example
Symmetric encryption algorithms: DES algorithm, 3DES algorithm, TDEA algorithm, Blowfish algorithm, RC5 algorithm, IDEA algorithm,AES Algorithm.
Asymmetric encryption algorithm:RSA, Elgamal, backpack algorithm, Rabin, D-H, ECC.
Typical hash algorithms: MD2, MD4,MD5And SHA-1 (the purpose is to convert any long input to a fixed long output by using an algorithm, and ensure that the input changes slightly and the output is different, and reverse decryption is not allowed)
5. Classic Algorithms
AES (symmetric), RSA (asymmetric), MD5, SHA-1 (hash)
[Algorithm example]
1. base64
It is not an encryption algorithm, but an encoding method. Because the encrypted data is byte [], for readability, byte [] is generally converted into base64 encoding.
Example: Java-encrypted base64 encode
2. md5
It is not an algorithm. It is the fifth version of the message digest algorithm. It is a hash algorithm and is generally used for unidirectional encryption.
Example: Java-based MD5 Encryption
3. AES
Symmetric encryption algorithm, the receiver of DES
Example: Java-encrypted AES symmetric encryption algorithm
4. RSA
To be updated