How to generate KeyPair in IOS and Android using Cordova? -


i creating banking app using angularjs1 , ionic1 ios , android. due security concerns clients device should generate public , private key using sha/rsa. don't want use javascript plugin, strictly denied client. digged lot, openssl , letsencrypt options left far know. both websites discuss manual command prompt key generation on operating system. want mechanism can:

  1. generate keypair on device.
  2. generate json web key(jwk).
  3. sign/hash data using private key. below reference in .net/java(i want in cordova)

signature = rsa256signdata(asciibytes(data signed), rsaprivatekey)

encoded signature = base64encode(signature)

i couldn't find cordova plugin can handle this. if there no cordova plugin i'll glad if can tell me in pieces or native.

thanks.

i not know of cordova plugin can accomplish these tasks.

there excellent javascript libraries provide these functions. have @ node-jose allows work jwk, jwe , jws. library depends on (a altered version of) node-forge can anything, including generating keypair , signing/hashing data.

the drawback of using these libraries speed may not sufficient mobile devices need support. personal experience mobile devices capable of working 1024-bit keypairs. working 2048-bits slow , generating 2048-bit pair takes long on devices.


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -