Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some ext-sodium functions are missing from polyfill #92

Closed
bburnichon opened this issue May 15, 2019 · 4 comments
Closed

Some ext-sodium functions are missing from polyfill #92

bburnichon opened this issue May 15, 2019 · 4 comments

Comments

@bburnichon
Copy link

I have a PHP project which is not (yet) compatible with PHP7.2+ versions but that uses lib sodium.

I wish to use timing attacks safer versions of several functions like bin2base64 which are declared in extension from version 7.2.0 https://github.com/php/php-src/blob/PHP-7.2.0/ext/sodium/php_libsodium.h#L39
Sadly, some of these are not implemented in this repo. So this repo can NOT say it provides ext-sodium as is intended in #59 (comment)

@paragonie-scott
Copy link
Member

Those functions in libsodium are actually newer than the polyfill lib. I'll get to work on them for v1.11.0.

@szepeviktor
Copy link
Contributor

szepeviktor commented Jul 26, 2019

Should we include a CI step that checks existence of all functions over at ext-sodium?

wget https://github.com/php/php-src/raw/PHP-7.3/ext/sodium/php_libsodium.h
sed -n -e 's#^PHP_FUNCTION(\(\S\+\));$#\1#p' php_libsodium.h | xargs -L1 php tester.php
<?php
require_once 'sodium_compat/autoload.php';
var_export(function_exists($argv[1]));
echo "\n";

@paragonie-scott
Copy link
Member

We've got a full list now.

add: NOT FOUND
base642bin: NOT FOUND
bin2base64: NOT FOUND
crypto_kdf_derive_from_key: NOT FOUND
crypto_kdf_keygen: NOT FOUND
crypto_kx_client_session_keys: NOT FOUND
crypto_kx_keypair: NOT FOUND
crypto_kx_publickey: NOT FOUND
crypto_kx_secretkey: NOT FOUND
crypto_kx_seed_keypair: NOT FOUND
crypto_kx_server_session_keys: NOT FOUND
crypto_pwhash_str_needs_rehash: NOT FOUND
crypto_secretstream_xchacha20poly1305_keygen: NOT FOUND
crypto_secretstream_xchacha20poly1305_init_push: NOT FOUND
crypto_secretstream_xchacha20poly1305_push: NOT FOUND
crypto_secretstream_xchacha20poly1305_init_pull: NOT FOUND
crypto_secretstream_xchacha20poly1305_pull: NOT FOUND
crypto_secretstream_xchacha20poly1305_rekey: NOT FOUND
crypto_sign_keypair_from_secretkey_and_publickey: NOT FOUND
pad: NOT FOUND
unpad: NOT FOUND

@paragonie-scott
Copy link
Member

Fixed in v1.11.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants