Giter Site home page Giter Site logo

Comments (4)

klali avatar klali commented on July 27, 2024

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.

maxnet avatar maxnet commented on July 27, 2024

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.

maxnet avatar maxnet commented on July 27, 2024

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.

klali avatar klali commented on July 27, 2024

Very interesting!
Please submit a pull request..

/klas

from php-u2flib-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.