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