An asymmetric encryption algorithm for Java encryption and decryption symmetric encryption MD5 BASE64 AES RSA

Source: Internet
Author: User
Tags base64 base64 encode md5 asymmetric encryption

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

Related Article

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.