Comments (7)
Hi,
This library is for key exchange, for signing you want to use the Poly1305 library.
https://github.com/lt/PHP-Poly1305
Cheers.
from php-curve25519.
Hello,
Thank you for your prompt answer. I am porting TextSecure to PHP and it seems your library is missing some functions which are needed. Please see:
The needed functions are:
calculateAgreement()
generatePublicKey()
generatePrivateKey()
calculateSignature()
verifySignature()
Any pointers on how to implement these functions in your Curve25519 implementation?
Many thanks.
from php-curve25519.
Public key signing can be done with ed25519, but not with this library. (Twisted Edwards curves are a bit more complicated than I have time for right now, it's on my list, but I'm quite busy with some other projects).
A cursory search shows there is a PHP implementation here: https://github.com/trianglman/sqrl/blob/master/src/Trianglman/Sqrl/Ed25519/Crypto.php
It uses BCMath though, so it's going to be incredibly slow.
from php-curve25519.
Thank you! I'll have a look at it.
from php-curve25519.
Sorry, one last question:
Based on your good information I have found some Ed25519 libraries which look usable for the signature calculations. However, first I need to convert Curve25519 keys into Ed25519 keys. Any pointers how to implement this in PHP?
Found more info here: http://crypto.stackexchange.com/questions/13077/can-curve25519-keys-be-used-with-ed25519-keys
Thanks!
from php-curve25519.
Do you really need to convert the keys? I.e. do you need to use the same key for Curve25519 and Ed25519 operations?
Ed25519 keys can be generated independently from random bytes, check out the NaCl reference implementation
If you really need to "convert" them (there is no standard process for this, as far as I am aware), you could seed the sha512 step with the Curve25519 private key.
from php-curve25519.
I think I have to yes. TextSecure made some changes it seems: https://github.com/WhisperSystems/TextSecure-Browser/blob/master/nacl/ed25519/additions/curve_sigs.c
For now my work-around is to compile the C source and call it from PHP. Not pretty but porting the C code to PHP with my limited knowledge of what is happening there is probably not a good idea ;)
Once again thanks for your help. Your library is working excellent!
from php-curve25519.
Related Issues (7)
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-curve25519.