Code Monkey home page Code Monkey logo

php-curve25519's People

Contributors

lt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

php-curve25519's Issues

Tests are failing

PHPUnit 4.4.4 by Sebastian Bergmann.

Configuration read from /tmp/PHP-Curve25519/phpunit.xml.dist

.FFFFE...

Time: 150 ms, Memory: 3.50Mb

There was 1 error:

1) Curve25519Test::testClamp
unpack() expects parameter 2 to be string, array given

/tmp/PHP-Curve25519/lib/Curve25519.php:220
/tmp/PHP-Curve25519/test/Curve25519Test.php:124

--

There were 4 failures:

1) Curve25519Test::testAddModP
Failed asserting that Array &0 (
    0 => 2
    1 => 0
    2 => 0
    3 => 0
    4 => 0
    5 => 0
    6 => 0
    7 => 0
    8 => 0
    9 => 0
) is identical to Array &0 (
    0 => 2
    1 => 0
    2 => 0
    3 => 0
    4 => 0
    5 => 0
    6 => 0
    7 => 0
    8 => 0
    9 => 0
    10 => 0
    11 => 0
    12 => 0
    13 => 0
    14 => 0
    15 => 0
).

/tmp/PHP-Curve25519/test/Curve25519Test.php:31

2) Curve25519Test::testSubModP
Failed asserting that Array &0 (
    0 => 67108864
    1 => 33554431
    2 => 67108863
    3 => 33554431
    4 => 67108863
    5 => 33554431
    6 => 67108863
    7 => 33554431
    8 => 67108863
    9 => 33554431
) is identical to Array &0 (
    0 => 0
    1 => 0
    2 => 0
    3 => 0
    4 => 0
    5 => 0
    6 => 0
    7 => 0
    8 => 0
    9 => 0
    10 => 0
    11 => 0
    12 => 0
    13 => 0
    14 => 0
    15 => 32768
).

/tmp/PHP-Curve25519/test/Curve25519Test.php:60

3) Curve25519Test::testMulModP
Failed asserting that Array &0 (
    0 => 267
    1 => 154
    2 => 213
    3 => 118
    4 => 159
    5 => 82
    6 => 105
    7 => 46
    8 => 51
    9 => 10
) is identical to Array &0 (
    0 => 571
    1 => 534
    2 => 497
    3 => 460
    4 => 423
    5 => 386
    6 => 349
    7 => 312
    8 => 275
    9 => 238
    10 => 201
    11 => 164
    12 => 127
    13 => 90
    14 => 53
    15 => 16
).

/tmp/PHP-Curve25519/test/Curve25519Test.php:89

4) Curve25519Test::testSqrModP
Failed asserting that Array &0 (
    0 => 267
    1 => 154
    2 => 213
    3 => 118
    4 => 159
    5 => 82
    6 => 105
    7 => 46
    8 => 51
    9 => 10
) is identical to Array &0 (
    0 => 571
    1 => 534
    2 => 497
    3 => 460
    4 => 423
    5 => 386
    6 => 349
    7 => 312
    8 => 275
    9 => 238
    10 => 201
    11 => 164
    12 => 127
    13 => 90
    14 => 53
    15 => 16
).

/tmp/PHP-Curve25519/test/Curve25519Test.php:109

FAILURES!                                       
Tests: 9, Assertions: 8, Failures: 4, Errors: 1.

[Feature Request] Integration with php-encryption

Hi,

I'm trying to use your library to exchange encryption keys, those keys are generated by php-encryption library but I'm facing issues that shared keys were generated by PHP-Curve25519 are Pure Bytes and it should be implement some rules provided by php-encryption to ensure key security & integrity.

Are you interesting to integrate and enhance your library feature?

Thanks

Public Key Generation Error in Windows

Hello,

I try to run this lib in Windows, but the generation of public key does seem to be correct in Windows SO.

Here is the PHPUnit results:

$ ./vendor/bin/phpunit.bat -c phpunit.xml.dist
PHPUnit 4.8.36 by Sebastian Bergmann and contributors.

FF....

Time: 749 ms, Memory: 4.00MB

There were 2 failures:

1) Curve25519\Curve25519Test::testOverall
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-3h═╗@Smp@L-_;(
+a
  ╚╗
+╚      ,╚ ╔@ǎ2X        q

C:\Users\mmunoz\proyectos\whatsapp-web-api\vendor\leigh\curve25519\test\Curve25519Test.php:20

2) Curve25519\Curve25519Test::testNaCL
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-       0Tt}ܴ>Z
-:
-&8뤩Nj
+

Here is my PHP version:

$ php -v
PHP 7.2.6 (cli) (built: May 23 2018 20:51:04) ( ZTS MSVC15 (Visual C++ 2017) x86 )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Xdebug v2.6.0, Copyright (c) 2002-2018, by Derick Rethans

Parse error

Parse error for me:

PHP Parse error: syntax error, unexpected '[' in Curve25519.php on line 5

PHP Parse error: syntax error, unexpected '[', expecting ')' in Curve25519Test.php on line 26

PHP 5.3.3

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.