-
-
Notifications
You must be signed in to change notification settings - Fork 21
Description
What were you trying to do?
Using sodium extension with NativePHP Desktop.
What happened?
If I try to use algorithms that are not supported by the PHP Sodium compat library I get:
This is not implemented, as it is not possible to implement Argon2i with acceptable performance in pure-PHP
How to reproduce the bug
Using algorithms only implemented in sodium C-extension like:
1 $derivedKey = sodium_crypto_pwhash(
22 SODIUM_CRYPTO_SECRETBOX_KEYBYTES, // Output length (32 bytes)
23 $recoveryCode, // Recovery code
24 $salt, // Salt
25 SODIUM_CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE, // Ops limit
26 SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE, // Memory limit
27 SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13 // Algorithm
28 );
Debug Output
Without sodium extension and without compat library:
Call to undefined function sodium_crypto_sign_keypair()
96 // Generate Ed25519 key pair
97 $keyPair = \sodium_crypto_sign_keypair();
Which operating systems have you seen this occur on?
Windows
Notes
I know we already talked about this and you added the sodium extension here:
NativePHP/php-bin#275
But I think the problem is that this was only commited to main and there was no new release for the binary since then.
So NativePHP Desktop still uses the old binary that does not include the sodium extension, right?
So maybe a new release for the phpbin would be enough so that NativePHP Desktop could add the new version as a dependency?
Or am I missing something?