Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.119
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
src /
php-7.4.33 /
ext /
sodium /
tests /
Delete
Unzip
Name
Size
Permission
Date
Action
bug78114.phpt
355
B
-rw-rw-r--
2022-10-31 11:36
bug78516.phpt
725
B
-rw-rw-r--
2022-10-31 11:36
crypto_aead.phpt
4.23
KB
-rw-rw-r--
2022-10-31 11:36
crypto_auth.phpt
1.09
KB
-rw-rw-r--
2022-10-31 11:36
crypto_box.phpt
5.09
KB
-rw-rw-r--
2022-10-31 11:36
crypto_generichash.phpt
2.7
KB
-rw-rw-r--
2022-10-31 11:36
crypto_hex.phpt
426
B
-rw-rw-r--
2022-10-31 11:36
crypto_kdf.phpt
1.48
KB
-rw-rw-r--
2022-10-31 11:36
crypto_kx.phpt
1.58
KB
-rw-rw-r--
2022-10-31 11:36
crypto_scalarmult.phpt
582
B
-rw-rw-r--
2022-10-31 11:36
crypto_secretbox.phpt
606
B
-rw-rw-r--
2022-10-31 11:36
crypto_secretstream.phpt
1.98
KB
-rw-rw-r--
2022-10-31 11:36
crypto_shorthash.phpt
586
B
-rw-rw-r--
2022-10-31 11:36
crypto_sign.phpt
2.88
KB
-rw-rw-r--
2022-10-31 11:36
crypto_stream.phpt
1.16
KB
-rw-rw-r--
2022-10-31 11:36
exception_trace_without_args.phpt
421
B
-rw-rw-r--
2022-10-31 11:36
inc_add.phpt
909
B
-rw-rw-r--
2022-10-31 11:36
installed.phpt
467
B
-rw-rw-r--
2022-10-31 11:36
php_password_hash_argon2i.phpt
2.08
KB
-rw-rw-r--
2022-10-31 11:36
php_password_hash_argon2id.phpt
2.09
KB
-rw-rw-r--
2022-10-31 11:36
php_password_verify.phpt
2.36
KB
-rw-rw-r--
2022-10-31 11:36
pwhash_argon2i.phpt
1.52
KB
-rw-rw-r--
2022-10-31 11:36
pwhash_scrypt.phpt
1.09
KB
-rw-rw-r--
2022-10-31 11:36
sodium_error_001.phpt
639
B
-rw-rw-r--
2022-10-31 11:36
utils.phpt
3.45
KB
-rw-rw-r--
2022-10-31 11:36
version.phpt
283
B
-rw-rw-r--
2022-10-31 11:36
Save
Rename
--TEST-- Check for libsodium AEAD --SKIPIF-- <?php if (!extension_loaded("sodium")) print "skip extension not loaded"; if (!defined('SODIUM_CRYPTO_AEAD_AES256GCM_NPUBBYTES')) print "skip libsodium without AESGCM"; ?> --FILE-- <?php echo "aead_chacha20poly1305:\n"; $msg = random_bytes(random_int(1, 1000)); $nonce = random_bytes(SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES); $key = sodium_crypto_aead_chacha20poly1305_keygen(); $ad = random_bytes(random_int(1, 1000)); $ciphertext = sodium_crypto_aead_chacha20poly1305_encrypt($msg, $ad, $nonce, $key); $msg2 = sodium_crypto_aead_chacha20poly1305_decrypt($ciphertext, $ad, $nonce, $key); var_dump($ciphertext !== $msg); var_dump($msg === $msg2); var_dump(sodium_crypto_aead_chacha20poly1305_decrypt($ciphertext, 'x' . $ad, $nonce, $key)); try { // Switched order $msg2 = sodium_crypto_aead_chacha20poly1305_decrypt($ciphertext, $ad, $key, $nonce); var_dump(false); } catch (SodiumException $ex) { var_dump(true); } echo "aead_chacha20poly1305_ietf:\n"; if (SODIUM_LIBRARY_MAJOR_VERSION > 7 || (SODIUM_LIBRARY_MAJOR_VERSION == 7 && SODIUM_LIBRARY_MINOR_VERSION >= 6)) { $msg = random_bytes(random_int(1, 1000)); $nonce = random_bytes(SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES); $key = sodium_crypto_aead_chacha20poly1305_ietf_keygen(); $ad = random_bytes(random_int(1, 1000)); $ciphertext = sodium_crypto_aead_chacha20poly1305_ietf_encrypt($msg, $ad, $nonce, $key); $msg2 = sodium_crypto_aead_chacha20poly1305_ietf_decrypt($ciphertext, $ad, $nonce, $key); var_dump($ciphertext !== $msg); var_dump($msg === $msg2); var_dump(sodium_crypto_aead_chacha20poly1305_ietf_decrypt($ciphertext, 'x' . $ad, $nonce, $key)); try { // Switched order $msg2 = sodium_crypto_aead_chacha20poly1305_ietf_decrypt($ciphertext, $ad, $key, $nonce); var_dump(false); } catch (SodiumException $ex) { var_dump(true); } } else { var_dump(true); var_dump(true); var_dump(false); var_dump(true); } echo "aead_xchacha20poly1305_ietf:\n"; if (SODIUM_LIBRARY_MAJOR_VERSION > 9 || (SODIUM_LIBRARY_MAJOR_VERSION == 9 && SODIUM_LIBRARY_MINOR_VERSION >= 4)) { $msg = random_bytes(random_int(1, 1000)); $nonce = random_bytes(SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES); $key = sodium_crypto_aead_xchacha20poly1305_ietf_keygen(); $ad = random_bytes(random_int(1, 1000)); $ciphertext = sodium_crypto_aead_xchacha20poly1305_ietf_encrypt($msg, $ad, $nonce, $key); $msg2 = sodium_crypto_aead_xchacha20poly1305_ietf_decrypt($ciphertext, $ad, $nonce, $key); var_dump($ciphertext !== $msg); var_dump($msg === $msg2); var_dump(sodium_crypto_aead_xchacha20poly1305_ietf_decrypt($ciphertext, 'x' . $ad, $nonce, $key)); try { // Switched order $msg2 = sodium_crypto_aead_xchacha20poly1305_ietf_decrypt($ciphertext, $ad, $key, $nonce); var_dump(false); } catch (SodiumException $ex) { var_dump(true); } } else { var_dump(true); var_dump(true); var_dump(false); var_dump(true); } echo "aead_aes256gcm:\n"; if (sodium_crypto_aead_aes256gcm_is_available()) { $msg = random_bytes(random_int(1, 1000)); $nonce = random_bytes(SODIUM_CRYPTO_AEAD_AES256GCM_NPUBBYTES); $ad = random_bytes(random_int(1, 1000)); $key = sodium_crypto_aead_aes256gcm_keygen(); $ciphertext = sodium_crypto_aead_aes256gcm_encrypt($msg, $ad, $nonce, $key); $msg2 = sodium_crypto_aead_aes256gcm_decrypt($ciphertext, $ad, $nonce, $key); var_dump($ciphertext !== $msg); var_dump($msg === $msg2); var_dump(sodium_crypto_aead_aes256gcm_decrypt($ciphertext, 'x' . $ad, $nonce, $key)); try { // Switched order $msg2 = sodium_crypto_aead_aes256gcm_decrypt($ciphertext, $ad, $key, $nonce); var_dump(false); } catch (SodiumException $ex) { var_dump(true); } } else { var_dump(true); var_dump(true); var_dump(false); var_dump(true); } ?> --EXPECT-- aead_chacha20poly1305: bool(true) bool(true) bool(false) bool(true) aead_chacha20poly1305_ietf: bool(true) bool(true) bool(false) bool(true) aead_xchacha20poly1305_ietf: bool(true) bool(true) bool(false) bool(true) aead_aes256gcm: bool(true) bool(true) bool(false) bool(true)