AES Key and RSA key

Source: Internet
Author: User
Tags decrypt
What is the AES key

Advanced Encryption Standard (English: Advanced encryption Standard, abbreviation: AES), is the current symmetric key encryption in a more general way of encryption.

What's the use of the AES key

Alipay Open Platform All OPENAPI support the AES encryption of the request content and response content of the interface, and some OPENAPI require AES encryption. After encryption, the content of the interface message transmitted on the network will be changed from plaintext content to ciphertext content, which can greatly improve the security of interface content transmission.

AES Encryption Finishing · /** * @param cipher (password type) mcrypt_rijndael_192, mcrypt_rijndael_256, mcrypt_rijndael_128 * @param k ey (key) such as custom ABCDEFGH Ijuklmno * @param data (data) * @param mode (encryption/decryption mode) MCRYPT_MODE_ECB, MCRYPT_MODE_CFB, MCRYPT_MODE_OFB, MCRYPT_MODE_NOFB, M CRYPT_MODE_CBC * @param IV (Initialization vectors/offsets) such as custom \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 **/encryption Base64_encode Mcrypt_encrypt ($ Cipher, $key, $ data, $ mode,$ IV) Decrypt Mcrypt_decrypt ($cipher, $key, Base64_decode ($data), $mode, $IV);


1.RSA Encryption Decryption:
(1) Obtain the key, here is the creation of the key, the actual application can be read from a variety of storage media key (2) encryption (3) decryption
2.RSA Signature and verification
(1) Obtain the key, where the key is generated, the actual application can be read from a variety of storage media key (2) to obtain the signature of the hash code (3) to obtain the signature of the string (4) validation

3. The public key and the private key understanding:
(1) The private key is used for decryption and signature, for its own use.
(2) The public key is made public by me, used for encrypting and verifying the signature, is for others.
(3) When the user sends the file, signed with the private key, others use his public key to verify the signature, you can guarantee that the information is sent by him. When the user accepts the file, the other person encrypts it with his public key, and he decrypts it with the private key to ensure that the information can only be received by him. #私钥

1. Signature/verification: Prevent data from being tampered with

2. Encrypt/Decrypt: Prevent information from being stolen


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.