PHP - encrypting/ decrypting data

Asked

Viewed 28 times

0

I am using AES-128 encryption for user messages, but I intended to encrypt with more Layers. Example :

        Layer 1: encryptacao aes-128
        Layer 2: “outra encryptacao”.

Do you think it’s a good idea to protect it this way? If so, what encryption can I use to encrypt and decrypt

1 answer

0

There is no reason to do this, no one does it since the AES is safe.

If you do not want to use AES-128 use the AES-256 or AES-192. If you don’t trust AES, especially if you don’t have an AES-NI-supported processor, use another cipher, such as Serpent-256, Salsa20 or Chacha20.

The only security gain it would have is if the algorithm alone is vulnerable to exhaustive searches, as is the case with DES. In this case there is 3DES which does exactly 2 encryption and 1 decryption, but there is still the problem of Meet-in-the-Middle.

3DES was created because DES is vulnerable to exhaustive search. Using the same process for AES is useless, AES does not have the same problem. Even, AES is safe even against quantum computers, if you prefer flow ciphers Salsa20 is also, according to Pqcrypto.


I believe that there are other problems that you may be worried about, such as the integrity of information or the storage of keys, for example.

  • Exactly, I want the encryption to be super secure. Because the purpose of the messages is to be anonymous. By the way, what kind of checks should I do to protect a Form?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.