How PHP-Secure-Session works
masterPHP-Secure-Session adds an encryption layer to existing PHP session handlers (like 'file', 'sqlite', 'memcache', or 'memcached') using the OpenSSL extension.
It provides:
- Encryption: AES-256
- Authentication: HMAC-SHA-256
Key Management:
Session data is encrypted using a random key and a random authentication key. These keys are stored in a cookie variable prefixed with KEY_. The value in the KEY_ cookie is the Base64 representation of the encryption key concatenated with the authentication key. The keys are generated using random_bytes() (or the paragonie/random_compat polyfill for PHP 5).