Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to generate digital signatures in Phonegap/Cordova App?

Node.js v6 includes a module that provide cryptographic functionality, including sign and verify functions.

If there isn't a way to sign or verify signatures maybe is there a way to port Node.js module to Cordova or Phonegap?

Basically what i need is way to sign messages and verify the signature from a Cordova App.

https://nodejs.org/dist/latest-v6.x/docs/api/crypto.html#crypto_class_sign

like image 412
Oliver Castillo Avatar asked Oct 19 '22 10:10

Oliver Castillo


1 Answers

I found what i was looking for:

http://kjur.github.io/jsrsasign/

Here a demo of how to generate,sign and verify keys: http://kjur.github.io/jsrsasign/sample-ecdsa.html

Incredible, it's pure javascript. So is going to work in both platforms iOS and Android.

My only concerns is to know how secure is use this library for key generation. At least i can generate the keys and send it using secure channel, later sign/verify using the App.

like image 173
Oliver Castillo Avatar answered Oct 21 '22 06:10

Oliver Castillo