I am planning on creating RSA key pairs on client side so that i won't have to transfer any private key but when i use RSA. generate function, i get the necessary values for the keys but cannot wrap them to use in pidCrypt later on. How do you do it?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
where N is the modulus and E is the public exponent, respectively.
In case those values are not in hexadecimal representation, also enter a radix (defaults to 16).
If you used pidCrypt.RSA.generate to generate the keys, those parameters are already stored as properties of pidcrypt.RSA, e.g. pidcrypt.RSA.n, pidcrypt.RSA.e, etc.
However, we do not recommend creating RSA keys with client side javascript, since there are concerns about the randomness of the JS random number generation.
Last edit: Jonah (pidder) 2014-03-10
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am planning on creating RSA key pairs on client side so that i won't have to transfer any private key but when i use RSA. generate function, i get the necessary values for the keys but cannot wrap them to use in pidCrypt later on. How do you do it?
For the public key use
where
Nis the modulus andEis the public exponent, respectively.In case those values are not in hexadecimal representation, also enter a
radix(defaults to 16).For the private key use
with
N: modulusE: public exponentD: private exponentP: Prime1Q: Prime2DP: exponent1DQ: exponent2C: coefficient(see http://www.emc.com/collateral/white-papers/h11300-pkcs-1v2-2-rsa-cryptography-standard-wp.pdf for details of these parameters). Again, if these values are not in hex, enter the
radixof their representation.If you used
pidCrypt.RSA.generateto generate the keys, those parameters are already stored as properties ofpidcrypt.RSA, e.g.pidcrypt.RSA.n,pidcrypt.RSA.e, etc.However, we do not recommend creating RSA keys with client side javascript, since there are concerns about the randomness of the JS random number generation.
Last edit: Jonah (pidder) 2014-03-10