Objective
This paper briefly introduces the concept of encryption technology, finally summarizes the existing encryption technology in Java and the usage and sample
"The simplest encryption"
1. Simple concept
PlainText: Pre-encryption information
Ciphertext: Information after a secret
Algorithms: Algorithms for encryption or decryption
Key: The key used by the algorithm (read as Miyao. Right should be miyue, but everyone read Miyao)
2. Simple examples
Add 1 123456 per digit and get 234567.
123456 of them are clear text. 234567 is the cipher. The cryptographic key is 1, and the encryption algorithm is each plus
3. Symmetric encryption and asymmetric encryption
The above example.
123456-->234567 encryption key is 1, encryption algorithm is per bit +
The decryption key of the 234567-->123456 is also 1, and the decrypt algorithm is every bit-
The encryption Algorithm (+) and decryption algorithm (-) are referred to as symmetric encryption,
The same, it is assumed that the encryption algorithm and decryption algorithm are called asymmetric encryption incorrectly.
4. Algorithm examples
Symmetric encryption algorithm: DES algorithm. 3DES algorithm, Tdea algorithm. Blowfish algorithm. RC5 algorithm, Idea algorithm,AES algorithm .
Asymmetric encryption algorithm:RSA, Elgamal, knapsack algorithm, Rabin, D-h, ECC.
Classic hashing algorithms: MD2, MD4,MD5 , and SHA-1 (the purpose is to change the arbitrary length input through the algorithm into a fixed long output, and to ensure that the input changes a little output is different, and can not be reversed)
5. The classic algorithm
AES (symmetric). RSA (asymmetric), md5,sha-1 (hash)
"Algorithm Example"
1.base64
is not an encryption algorithm, is a way of encoding, because after the encryption is byte[], for readability. Generally byte[] to base64 encoding
Example:Java encryption base64 encode
2.md5
Nor is it an algorithm. is the message digest algorithm version fifth, is a hashing algorithm, generally used for one-way encryption
Example:Java encryption MD5
3.AES
Symmetric encryption algorithm, des substitution
Example:Java encryption AES symmetric encryption algorithm
4.RSA
Pending update
An asymmetric encryption algorithm for Java encryption and decryption symmetric encryption MD5 BASE64 AES RSA