Sodium Compat is a pure PHP polyfill for the Sodium cryptography library (libsodium)

Overview

Sodium Compat

Build Status Psalm Status Windows Build Status Latest Stable Version Latest Unstable Version License Downloads

Sodium Compat is a pure PHP polyfill for the Sodium cryptography library (libsodium), a core extension in PHP 7.2.0+ and otherwise available in PECL.

This library tentativeley supports PHP 5.2.4 - 8.x (latest), but officially only supports non-EOL'd versions of PHP.

If you have the PHP extension installed, Sodium Compat will opportunistically and transparently use the PHP extension instead of our implementation.

IMPORTANT!

This cryptography library has not been formally audited by an independent third party that specializes in cryptography or cryptanalysis.

If you require such an audit before you can use sodium_compat in your projects and have the funds for such an audit, please open an issue or contact security at paragonie dot com so we can help get the ball rolling.

However, sodium_compat has been adopted by high profile open source projects, such as Joomla! and Magento. Furthermore, sodium_compat was developed by Paragon Initiative Enterprises, a company that specializes in secure PHP development and PHP cryptography, and has been informally reviewed by many other security experts who also specialize in PHP.

If you'd like to learn more about the defensive security measures we've taken to prevent sodium_compat from being a source of vulnerability in your systems, please read Cryptographically Secure PHP Development.

Installing Sodium Compat

If you're using Composer:

composer require paragonie/sodium_compat

Install From Source

If you're not using Composer, download a release tarball (which should be signed with our GnuPG public key), extract its contents, then include our autoload.php script in your project.


require_once "/path/to/sodium_compat/autoload.php";

PHP Archives (Phar) Releases

Since version 1.3.0, sodium_compat releases include a PHP Archive (.phar file) and associated GPG signature. First, download both files and verify them with our GPG public key, like so:

gpg --fingerprint 7F52D5C61D1255C731362E826B97A1C2826404DA if [ $? -ne 0 ]; then echo -e "\033[31mCould not download PGP public key for verification\033[0m" exit 1 fi fi # Verifying the PHP Archive gpg --verify sodium-compat.phar.sig sodium-compat.phar ">
# Getting our public key from the keyserver:
gpg --fingerprint 7F52D5C61D1255C731362E826B97A1C2826404DA
if [ $? -ne 0 ]; then
    echo -e "\033[33mDownloading PGP Public Key...\033[0m"
    gpg  --keyserver pgp.mit.edu --recv-keys 7F52D5C61D1255C731362E826B97A1C2826404DA
    # Security 
   
    gpg --fingerprint 7F52D5C61D1255C731362E826B97A1C2826404DA
    if [ $? -ne 0 ]; then
        echo -e "\033[31mCould not download PGP public key for verification\033[0m"
        exit 1
    fi
fi

# Verifying the PHP Archive
gpg --verify sodium-compat.phar.sig sodium-compat.phar

Now, simply include this .phar file in your application.


require_once "/path/to/sodium-compat.phar";

Support

Commercial support for libsodium is available from multiple vendors. If you need help using sodium_compat in one of your projects, contact Paragon Initiative Enterprises.

Non-commercial report will be facilitated through Github issues. We offer no guarantees of our availability to resolve questions about integrating sodium_compat into third-party software for free, but will strive to fix any bugs (security-related or otherwise) in our library.

Support Contracts

If your company uses this library in their products or services, you may be interested in purchasing a support contract from Paragon Initiative Enterprises.

Using Sodium Compat

True Polyfill

If you're using PHP 5.3.0 or newer and do not have the PECL extension installed, you can just use the standard ext/sodium API features as-is and the polyfill will work its magic.


require_once "/path/to/sodium_compat/autoload.php";

$alice_kp = \Sodium\crypto_sign_keypair();
$alice_sk = \Sodium\crypto_sign_secretkey($alice_kp);
$alice_pk = \Sodium\crypto_sign_publickey($alice_kp);

$message = 'This is a test message.';
$signature = \Sodium\crypto_sign_detached($message, $alice_sk);
if (\Sodium\crypto_sign_verify_detached($signature, $message, $alice_pk)) {
    echo 'OK', PHP_EOL;
} else {
    throw new Exception('Invalid signature');
}

The polyfill does not expose this API on PHP < 5.3, or if you have the PHP extension installed already.

General-Use Polyfill

If your users are on PHP < 5.3, or you want to write code that will work whether or not the PECL extension is available, you'll want to use the ParagonIE_Sodium_Compat class for most of your libsodium needs.

The above example, written for general use:


require_once "/path/to/sodium_compat/autoload.php";

$alice_kp = ParagonIE_Sodium_Compat::crypto_sign_keypair();
$alice_sk = ParagonIE_Sodium_Compat::crypto_sign_secretkey($alice_kp);
$alice_pk = ParagonIE_Sodium_Compat::crypto_sign_publickey($alice_kp);

$message = 'This is a test message.';
$signature = ParagonIE_Sodium_Compat::crypto_sign_detached($message, $alice_sk);
if (ParagonIE_Sodium_Compat::crypto_sign_verify_detached($signature, $message, $alice_pk)) {
    echo 'OK', PHP_EOL;
} else {
    throw new Exception('Invalid signature');
}

Generally: If you replace \Sodium\ with ParagonIE_Sodium_Compat::, any code already written for the libsodium PHP extension should work with our polyfill without additional code changes.

Since this doesn't require a namespace, this API is exposed on PHP 5.2.

Since version 0.7.0, we have our own namespaced API (ParagonIE\Sodium\*) to allow brevity in software that uses PHP 5.3+. This is useful if you want to use our file cryptography features without writing ParagonIE_Sodium_File every time. This is not exposed on PHP < 5.3, so if your project supports PHP < 5.3, use the underscore method instead.

To learn how to use Libsodium, read Using Libsodium in PHP Projects.

PHP 7.2 Polyfill

As per the second vote on the libsodium RFC, PHP 7.2 uses sodium_* instead of \Sodium\*.


require_once "/path/to/sodium_compat/autoload.php";

$alice_kp = sodium_crypto_sign_keypair();
$alice_sk = sodium_crypto_sign_secretkey($alice_kp);
$alice_pk = sodium_crypto_sign_publickey($alice_kp);

$message = 'This is a test message.';
$signature = sodium_crypto_sign_detached($message, $alice_sk);
if (sodium_crypto_sign_verify_detached($signature, $message, $alice_pk)) {
    echo 'OK', PHP_EOL;
} else {
    throw new Exception('Invalid signature');
}

Help, Sodium_Compat is Slow! How can I make it fast?

There are three ways to make it fast:

  1. Use PHP 7.2.
  2. Install the libsodium PHP extension from PECL.
  3. Only if the previous two options are not available for you:
    1. Verify that the processor you're using actually implements constant-time multiplication. Sodium_compat does, but it must trade some speed in order to attain cross-platform security.
    2. Only if you are 100% certain that your processor is safe, you can set ParagonIE_Sodium_Compat::$fastMult = true; without harming the security of your cryptography keys. If your processor isn't safe, then decide whether you want speed or security because you can't have both.

How can I tell if sodium_compat will be slow, at runtime?

Since version 1.8, you can use the polyfill_is_fast() static method to determine if sodium_compat will be slow at runtime.


if (ParagonIE_Sodium_Compat::polyfill_is_fast()) {
    // Use libsodium now
    $process->execute();
} else {
    // Defer to a cron job or other sort of asynchronous process
    $process->enqueue();
}

Help, my PHP only has 32-Bit Integers! It's super slow!

Some features of sodium_compat are incredibly slow with PHP 5 on Windows (in particular: public-key cryptography (encryption and signatures) is affected), and there is nothing we can do about that, due to platform restrictions on integers.

For acceptable performance, we highly recommend Windows users to version 1.0.6 of the libsodium extension from PECL or, alternatively, simply upgrade to PHP 7 and the slowdown will be greatly reduced.

This is also true of non-Windows 32-bit operating systems, or if somehow PHP was compiled where PHP_INT_SIZE equals 4 instead of 8 (i.e. Linux on i386).

Documentation

First, you'll want to read the Libsodium Quick Reference. It aims to answer, "Which function should I use for [common problem]?".

If you don't find the answers in the Quick Reference page, check out Using Libsodium in PHP Projects.

Finally, the official libsodium documentation (which was written for the C library, not the PHP library) also contains a lot of insightful technical information you may find helpful.

API Coverage

Recommended reading: Libsodium Quick Reference

  • Mainline NaCl Features
    • crypto_auth()
    • crypto_auth_verify()
    • crypto_box()
    • crypto_box_open()
    • crypto_scalarmult()
    • crypto_secretbox()
    • crypto_secretbox_open()
    • crypto_sign()
    • crypto_sign_open()
  • PECL Libsodium Features
    • crypto_aead_aes256gcm_encrypt()
    • crypto_aead_aes256gcm_decrypt()
    • crypto_aead_chacha20poly1305_encrypt()
    • crypto_aead_chacha20poly1305_decrypt()
    • crypto_aead_chacha20poly1305_ietf_encrypt()
    • crypto_aead_chacha20poly1305_ietf_decrypt()
    • crypto_aead_xchacha20poly1305_ietf_encrypt()
    • crypto_aead_xchacha20poly1305_ietf_decrypt()
    • crypto_box_xchacha20poly1305()
    • crypto_box_xchacha20poly1305_open()
    • crypto_box_seal()
    • crypto_box_seal_open()
    • crypto_generichash()
    • crypto_generichash_init()
    • crypto_generichash_update()
    • crypto_generichash_final()
    • crypto_kx()
    • crypto_secretbox_xchacha20poly1305()
    • crypto_secretbox_xchacha20poly1305_open()
    • crypto_shorthash()
    • crypto_sign_detached()
    • crypto_sign_ed25519_pk_to_curve25519()
    • crypto_sign_ed25519_sk_to_curve25519()
    • crypto_sign_verify_detached()
    • For advanced users only:
      • crypto_stream()
      • crypto_stream_xor()
    • Other utilities (e.g. crypto_*_keypair())
      • add()
      • base642bin()
      • bin2base64()
      • bin2hex()
      • hex2bin()
      • crypto_kdf_derive_from_key()
      • crypto_kx_client_session_keys()
      • crypto_kx_server_session_keys()
      • crypto_secretstream_xchacha20poly1305_init_push()
      • crypto_secretstream_xchacha20poly1305_push()
      • crypto_secretstream_xchacha20poly1305_init_pull()
      • crypto_secretstream_xchacha20poly1305_pull()
      • crypto_secretstream_xchacha20poly1305_rekey()
      • pad()
      • unpad()

Cryptography Primitives Provided

  • X25519 - Elliptic Curve Diffie Hellman over Curve25519
  • Ed25519 - Edwards curve Digital Signature Algorithm over Curve25519
  • Xsalsa20 - Extended-nonce Salsa20 stream cipher
  • ChaCha20 - Stream cipher
  • Xchacha20 - Extended-nonce ChaCha20 stream cipher
  • Poly1305 - Polynomial Evaluation Message Authentication Code modulo 2^130 - 5
  • BLAKE2b - Cryptographic Hash Function
  • SipHash-2-4 - Fast hash, but not collision-resistant; ideal for hash tables.

Features Excluded from this Polyfill

  • \Sodium\memzero() - Although we expose this API endpoint, we can't reliably zero buffers from PHP.

    If you have the PHP extension installed, sodium_compat will use the native implementation to zero out the string provided. Otherwise it will throw a SodiumException.

  • \Sodium\crypto_pwhash() - It's not feasible to polyfill scrypt or Argon2 into PHP and get reasonable performance. Users would feel motivated to select parameters that downgrade security to avoid denial of service (DoS) attacks.

    The only winning move is not to play.

    If ext/sodium or ext/libsodium is installed, these API methods will fallthrough to the extension. Otherwise, our polyfill library will throw a SodiumException.

    To detect support for Argon2i at runtime, use ParagonIE_Sodium_Compat::crypto_pwhash_is_available(), which returns a boolean value (TRUE or FALSE).

PHPCompatibility Ruleset

For sodium_compat users and that utilize PHPCompatibility in their CI process, there is now a custom ruleset available which can be used to prevent false positives being thrown by PHPCompatibility for the native PHP functionality being polyfilled by this repo.

You can find the repo for the PHPCompatibilityParagonieSodiumCompat ruleset here on Github and on Packagist.

Comments
  • Issue with latest version and missing constants

    Issue with latest version and missing constants

    I currently cannot update versions of this library, and am stuck on v1.8.1.

    If I update to 1.11.1, then the file "php72compat.php" fails to find the correct constants passed to "constant()"

    This issue will then generate a warning for EVERY constant needed, even if my PHP version is v7.1 or v7.2.

    Can this be investigated?

    I can reproduce it by using Certainty, and updating to the latest, and then trying to execute RemoteFetch->getLatestBundle().

    opened by 1337GameDev 43
  • Undefined constant 'CRYPTO_AEAD_XCHACHA20POLY1305_IETF_KEYBYTES'

    Undefined constant 'CRYPTO_AEAD_XCHACHA20POLY1305_IETF_KEYBYTES'

    Hey there, after updating to php7.3 I get these stragne errors in error.log maybe you could help me... PHP Fatal error: Uncaught Error: Undefined constant 'CRYPTO_AEAD_XCHACHA20POLY1305_IETF_KEYBYTES' in /home/homepages/myhomepage/httpdocs/libraries/vendor/paragonie/sodium_compat/lib/constants.php:22\nStack trace:\n#0 /home/homepages/myhomepage/httpdocs/libraries/vendor/paragonie/sodium_compat/lib/sodium_compat.php(834): require_once()\n#1 /home/homepages/myhomepage/httpdocs/libraries/vendor/paragonie/sodium_compat/autoload.php(45): require_once('/home/homepages...')\n#2 /home/homepages/myhomepage/httpdocs/libraries/vendor/composer/autoload_real.php(66): require('/home/homepages...')\n#3 /home/homepages/myhomepage/httpdocs/libraries/vendor/composer/autoload_real.php(56): composerRequire205c915b9c7d3e718e7c95793ee67ffe('3109cb1a231dcd0...', '/home/homepages...')\n#4 /home/homepages/myhomepage/httpdocs/libraries/vendor/autoload.php(7): ComposerAutoloaderInit205c915b9c7d3e718e7c95793ee67ffe::getLoader()\n#5 /home/homepages/myhomepage/httpdocs/libraries/cms.php(36): require('/home/homepages...')\n in /home/homepages/myhomepage/httpdocs/libraries/vendor/paragonie/sodium_compat/lib/constants.php on line 22, referer: https://myhomepage/groups?start=108

    opened by Kulturnilpferd 15
  • PHP 8.1 x86 deprecation: Implicit conversion from float 4294967295 to int loses precision

    PHP 8.1 x86 deprecation: Implicit conversion from float 4294967295 to int loses precision

    Seen on PHP 8.1 x86, eg: https://ci.appveyor.com/project/fabpot/symfony/builds/42721332#L1682

    2060x: Implicit conversion from float 4294967295 to int loses precision 1036x in SodiumVaultTest::testEncryptAndDecrypt from Symfony\Bundle\FrameworkBundle\Tests\Secrets 1024x in SodiumVaultTest::testGenerateKeys from Symfony\Bundle\FrameworkBundle\Tests\Secrets

    The deprecation disappears when I enable ext-sodium.

    opened by nicolas-grekas 11
  • Invalid MAC with i386

    Invalid MAC with i386

    For specific reasons , I have to work with an i386 computer running debian testing without iibsodium installed. While giving a try to Paseto, I was hit with an "Invalid MAC" error when parsing the token, which lead me to #38.

    After running the phpunit tests on current master HEAD, here is the final output:

    Time: 1.8 hours, Memory: 18.00MB
    
    There was 1 error:
    
    1) FileTest::testSeal
    SodiumException: Invalid MAC
    
    /srv/www/local/sodium_compat/src/Crypto32.php:1003
    /srv/www/local/sodium_compat/src/Crypto32.php:664
    /srv/www/local/sodium_compat/src/Crypto32.php:519
    /srv/www/local/sodium_compat/src/Compat.php:983
    /srv/www/local/sodium_compat/tests/unit/FileTest.php:147
    
    --
    
    There was 1 failure:
    
    1) FileTest::testBox
    Failed asserting that two strings are identical.
    --- Expected
    +++ Actual
    @@ @@
    -d1be33c603b2363bc2cda62795b458d34aba8d03a9c190fa5fe0c14603f57eb6b0db46a322a21fdef20498304d2fbc9d
    +46679e2378061e778f9b1cf4f796f59822cf39d3017fc62464d5be2e2dbabd5648593477ef571af3732ff33dacf116af
    
    /srv/www/local/sodium_compat/tests/unit/FileTest.php:43
    
    ERRORS!
    Tests: 173, Assertions: 6699, Errors: 1, Failures: 1, Skipped: 58.
    

    I know that i386 targets are not high priority, but would it be possible for someone to have a look at these tests. Hopefully, it may result in a quick and easy fix.

    thanks

    opened by pmaziere 11
  • Third Party Cryptography Audit

    Third Party Cryptography Audit

    After I'm confident that this library is...

    • Secure, even against sophisticated attackers
    • Correctly implemented
    • Adequately pedantic about types, etc.
    • Perfectly API compatible with the relevant libsodium features we're bringing over

    ...then the next step will be to obtain an independent third party security assessment.

    SECURITY 
    opened by paragonie-scott 11
  • Class 'ParagonIE_Sodium_Core_Util' not found

    Class 'ParagonIE_Sodium_Core_Util' not found

    With preloading, I'm getting the following error

    Class 'ParagonIE_Sodium_Core_Util' not found
    

    It seems this lib is in dire need of being updated to PSR-4 compatibility.

    opened by oojacoboo 7
  • Fix PHPStan Level 4-5

    Fix PHPStan Level 4-5

    @paragonie-scott I am out of fuel :)

    One of the remaining ones:

    src/Compat.php:2556 Trying to invoke '\Sodium\increment' but it's not a callable.

    increment() is a static method of ParagonIE_Sodium_Compat


    I suggest you to increase level one-by-one: vendor/bin/phpstan analyze -l 5 up to 7

    PHPStan can be installed by: composer require --dev --prefer-dist --no-suggest phpstan/phpstan

    opened by szepeviktor 6
  • Wrong sodium-compat.phar.sig file in release 1.6.0

    Wrong sodium-compat.phar.sig file in release 1.6.0

    wrong sodium-compat.phar.sig file in release 1.6.0 on here

    sodium-compat.phar.sig file in release 1.6.0 is identical to release 1.5.6

    Release 1.6.0

    gpg --verify sodium-compat.phar.sig sodium-compat.phar
    
    gpg: Signature made Tue Jan 30 07:21:23 2018 CST using RSA key ID 826404DA
    gpg: BAD signature from "Security <[email protected]>"
    

    Release 1.5.6

    gpg --verify sodium-compat.phar.sig sodium-compat.phar
    
    gpg: Signature made Tue Jan 30 07:21:23 2018 CST using RSA key ID 826404DA
    gpg: Good signature from "Security <[email protected]>"
    gpg: WARNING: This key is not certified with a trusted signature!
    gpg:          There is no indication that the signature belongs to the owner.
    Primary key fingerprint: 7F52 D5C6 1D12 55C7 3136  2E82 6B97 A1C2 8264 04DA
    

    It looks like the file sodium-compat.phar.sig in release 1.5.6 got copied to release 1.6.0 by mistake on here (...so it does not work for 1.6.0 gpg verification)

    opened by elingerojo 6
  • Argument 1 must be at least CRYPTO_SIGN_BYTES long

    Argument 1 must be at least CRYPTO_SIGN_BYTES long

    SodiumException Argument 1 must be at least CRYPTO_SIGN_BYTES long. /var/www/html/limesurvey/application/third_party/sodium_compat/src/Compat.php(2069)

    PHP version: 7.4.15 We get this error when using Limesurvey with new PHP 7.4.15. Any ideas what we could be missing here?

    opened by akjeldsen 5
  • sodium_crypto_aead_xchacha20poly1305_ietf_encrypt doesn't take null as Argument 2

    sodium_crypto_aead_xchacha20poly1305_ietf_encrypt doesn't take null as Argument 2

    This probably doesn't happen if sodium is installed natively with PHP but sodium_compat is giving the error that the function needs argument 2 as not null.

    opened by superpoincare 5
  • Incompatibility between 1.12.0 and earlier version(s)

    Incompatibility between 1.12.0 and earlier version(s)

    It appears there is an incompatibility between the latest version of the library and earlier versions, where, if an earlier version is loaded first, the checks performed by the library will not suffice to detect this, and attempt to load elements anew.

    The specific issue at hand is caused by a WordPress plugin connecting to a different software that utilizes the latest version of the library, causing WordPress to emit notices and thus breaking the page output: 7bTCTBz

    Potentially related to #101

    opened by LukasWieditz 5
Releases(v1.19.0)
Owner
Paragon Initiative Enterprises
Technology should support your ambitions, not hinder them. We are a team of technology consultants that specialize in application security.
Paragon Initiative Enterprises
High-level cryptography interface powered by libsodium

Halite Halite is a high-level cryptography interface that relies on libsodium for all of its underlying cryptography operations. Halite was created by

Paragon Initiative Enterprises 1.1k Dec 22, 2022
Fast, general Elliptic Curve Cryptography library. Supports curves used in Bitcoin, Ethereum and other cryptocurrencies (secp256k1, ed25519, ..)

Fast Elliptic Curve Cryptography in PHP Information This library is a PHP port of elliptic, a great JavaScript ECC library. Supported curve types: Sho

Simplito 178 Dec 28, 2022
Strong cryptography tools and password hashing

laminas-crypt ???? Русским гражданам Мы, участники Laminas, родились и живем в разных странах. У многих из нас есть друзья, родственники и коллеги как

Laminas Project 29 Dec 15, 2022
php-chmod is a PHP library for easily changing permissions recursively.

PHP chmod php-chmod is a PHP library for easily changing the permissions recursively. Versions & Dependencies Version PHP Documentation ^1.1 ^7.4 curr

Mathias Reker ⚡️ 5 Oct 7, 2022
PHP Secure Communications Library

phpseclib - PHP Secure Communications Library Supporting phpseclib Become a backer or sponsor on Patreon One-time donation via PayPal or crypto-curren

null 4.9k Jan 7, 2023
TCrypto is a simple and flexible PHP 5.3+ in-memory key-value storage library

About TCrypto is a simple and flexible PHP 5.3+ in-memory key-value storage library. By default, a cookie will be used as a storage backend. TCrypto h

timoh 57 Dec 2, 2022
PHPGGC is a library of PHP unserialize() payloads along with a tool to generate them, from command line or programmatically.

PHPGGC: PHP Generic Gadget Chains PHPGGC is a library of unserialize() payloads along with a tool to generate them, from command line or programmatica

Ambionics Security 2.5k Jan 4, 2023
A petite library of encryption functions for PHP

?? dcrypt A petite library of essential encryption functions for PHP 7.1+. For legacy PHP version support, look here. If you need a dcrypt inspired en

null 96 Oct 6, 2022
JSON Object Signing and Encryption library for PHP.

NAMSHI | JOSE Deprecation notice Hi there, as much as we'd like to be able to work on all of the OSS in the world, we don't actively use this library

Namshi 1.7k Dec 22, 2022
A PHP library for counting short DNA sequences for use in Bioinformatics

Helix A PHP library for counting short DNA sequences for use in Bioinformatics. Helix consists of tools for data extraction as well as an ultra-low me

Andrew DalPino 2 Jan 25, 2022
A library for generating random numbers and strings

RandomLib A library for generating random numbers and strings of various strengths. This library is useful in security contexts. Install Via Composer

Anthony Ferrara 832 Nov 24, 2022
A multitool library offering access to recommended security related libraries, standardised implementations of security defences, and secure implementations of commonly performed tasks.

SecurityMultiTool A multitool library offering access to recommended security related libraries, standardised implementations of security defences, an

Pádraic Brady 131 Oct 30, 2022
A modern, portable, easy to use crypto library.

Sodium is a new, easy-to-use software library for encryption, decryption, signatures, password hashing and more. It is a portable, cross-compilable, i

Frank Denis 10.7k Jan 1, 2023
PHPIDS (PHP-Intrusion Detection System) is a simple to use, well structured, fast and state-of-the-art security layer for your PHP based web application

PHPIDS PHPIDS (PHP-Intrusion Detection System) is a simple to use, well structured, fast and state-of-the-art security layer for your PHP based web ap

null 752 Jan 3, 2023
PHP 5.x support for random_bytes() and random_int()

random_compat PHP 5.x polyfill for random_bytes() and random_int() created and maintained by Paragon Initiative Enterprises. Although this library sho

Paragon Initiative Enterprises 8k Jan 5, 2023
Simple Encryption in PHP.

php-encryption composer require defuse/php-encryption This is a library for encrypting data with a key or password in PHP. It requires PHP 5.6 or new

Taylor Hornby 3.6k Jan 3, 2023
Standards compliant HTML filter written in PHP

HTML Purifier HTML Purifier is an HTML filtering solution that uses a unique combination of robust whitelists and aggressive parsing to ensure that no

Edward Z. Yang 2.7k Jan 5, 2023
A database of PHP security advisories

PHP Security Advisories Database The PHP Security Advisories Database references known security vulnerabilities in various PHP projects and libraries.

null 1.9k Dec 18, 2022
A php.ini scanner for best security practices

Scanner for PHP.ini The Iniscan is a tool designed to scan the given php.ini file for common security practices and report back results. Currently it

psec.io 1.5k Dec 5, 2022