Comments (4)
Hello,
I agree with the general feel that the dependencies should be as few as possible, however:
Currently (on ubuntu 14.04) the php openssl extension does not support ecc at all, a patch for that went in in the beginning of the year (https://bugs.php.net/bug.php?id=66501) which means that using openssl for the EC operations is a non-option. Unfortunately phpseclib does not support EC either, so right now that dependency could be dropped in favour of using openssl for the certificate checks.
The selftests should have enough coverage that it's possible to test around with the code what parts work where.
/klas
from php-u2flib-server.
Currently (on ubuntu 14.04) the php openssl extension does not support ecc at all, a patch for that went in in
the beginning of the year (https://bugs.php.net/bug.php?id=66501) which means that using openssl for the
EC operations is a non-option.
Looking at the pull request linked in that bug, that concerned a bug in php_openssl_is_private_key() which caused openssl_sign() to output a warning when EC keys are used.
Not sure if we are affected by is_private_key() not working properly when verifying signatures with openssl_verify().
from php-u2flib-server.
Played a bit more with it, and it only breaks when passing a key resource to openssl_verify()
Works fine under Ubuntu when passing a key as PEM formatted text string.
Proof of concept that only depends on OpenSSL + phpseclib, and no longer on mdanter/ecc and GMP:
https://github.com/maxnet/php-u2flib-server-cutdown/commit/92e208310a0528f1a921c26d451d5f1e130813c7
Still have to test it with a real token, but it passes your phpunit tests.
Next step would be te remove the dependency on phpseclib.
from php-u2flib-server.
Very interesting!
Please submit a pull request..
/klas
from php-u2flib-server.
Related Issues (20)
- Vagrantfile HOT 1
- Counter won't be updated correctly in PDO example HOT 2
- Split U2F.php into files per Class HOT 1
- PSR-4 Autoloading HOT 2
- Problems with Challenge HOT 2
- Correct handling of errorCode 0 HOT 1
- can you make more Releases
- PHP 7 Support HOT 1
- Unit Tests are Failing HOT 1
- Library fails with mbstring.func_overload HOT 2
- Firefox support HOT 12
- Errorcode 2 in registrater a new user HOT 1
- PDO example not working HOT 2
- Making openssl_random_pseudo_bytes usage more reliable
- u2f-local.php not working HOT 2
- Example not working in Firefox 60.1.0 HOT 2
- missing id in castObjectToRegistration function HOT 3
- Any support for GO? HOT 1
- Sample usage? HOT 1
- PHP Preloading incompatibility HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-u2flib-server.