openssl_get_cipher_methods -- get per-cipher keylengths?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm deploying a php app that makes use of "openssl_get_cipher_methods"

Its config defaults to 

	$config['cipher_method'] = 'DES-EDE3-CBC';

and

	$config['des_key'] = '123456789012345678901234';

where

	"This key (generically named, 'des_key') is used to encrypt the users imap password which is stored
	 in the session record. For the default cipher method it must be exactly 24 characters long."

The project recommends

	$config['cipher_method'] = 'AES-256-CBC';

as a 'better option'.  IIUC, as it uses "openssl_get_cipher_methods", additional ciphers _are_ supported; as listed by 

	https://www.php.net/manual/en/function.openssl-get-cipher-methods.php

That list includes

	[23] => aes-256-cbc
	[32] => aes-256-gcm
	[93] => chacha20-poly1305

What, if any, are current recommendations -- either specifically for php, or in the general case -- for cipher usage of 'aes-256-cbc' vs 'aes-256-gcm' ?

How are required php-config keylengths, in characters, determined for any available/usable cipher? e.g., for 'chacha20-poly1305' ?



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux