Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths. laravel 5.3

I installed a new fresh copy of Laravel 5.3 using composer but I'm getting this error:

The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths. Even though my app.php file in config directory specify
'cipher' => 'AES-128-CBC'

like image 729
Emmanuel Mariki Avatar asked Sep 26 '16 00:09

Emmanuel Mariki


People also ask

What is AES 128 CBC encryption?

AES-128 uses a 128-bit key length to encrypt and decrypt a block of messages. AES-192 uses a 192-bit key length to encrypt and decrypt a block of messages. AES-256 uses a 256-bit key length to encrypt and decrypt a block of messages.

What is AES-CBC 256?

What is 256-bit AES encryption? 256-bit AES encryption refers to the process of concealing plaintext data using the AES algorithm and an AES key length of 256 bits. In addition, 256 bits is the largest AES key length size, as well as its most mathematically complex. It is also the most difficult to crack.

What is the difference between AES 256 CBC and AES 256 GCM?

The AES-GCM mode of operation can actually be carried out in parallel both for encryption and decryption. The additional security that this method provides also allows the VPN to use only a 128-bit key, whereas AES-CBC typically requires a 256-bit key to be considered secure. CBC ciphers were removed in May of 2021.

Does AES support CBC?

So if you could get counter directly, you can encrypt/decrypt data in parallel. A Mallory can change some bits of ciphertext to break the plaintext. In the database encryption, we can use CBC to encrypt all the files. To ensure security, the key in this mode need to be changed for every 2^(n/2) encryption blocks.


2 Answers

You need to have .env on your appication folder then run:

$ php artisan key:generate 

If you don't have .env copy from .env.example:

$ cp .env.example .env 
like image 186
Mugoma J. Okomba Avatar answered Oct 05 '22 08:10

Mugoma J. Okomba


Run php artisan key:generate.

Do php artisan config:clear,

Then php artisan config:cache

And things will start working!

like image 27
Cengkuru Michael Avatar answered Oct 05 '22 09:10

Cengkuru Michael