I have to do data encryption on client side using public key and decryption on server side using private key in an asymmetric way, but I was unable to get which way to generate keys in C# and use them in JSEncrypt. Any another algorithms is the for supporting my scenario?
Asked
Active
Viewed 459 times
0
-
JSencrypt is a JavaScript library. You cannot run it in C#, but you can certainly generate RSA keys in C# and import then in JSEncrypt. You only have to make sure that JSEncrypt understands the key format the C# supports (PKCS#1 vs. PKCS#8). – Artjom B. Sep 12 '16 at 18:04
-
how to implement encryption on client side with public key using RSA algorithm and i know how too decrypt on server side and key generation. – venkatesh Sep 14 '16 at 12:24
1 Answers
0
For who needs JSEncrypt to encrypt with private key I forked, modified and I'm maintaining it.
https://github.com/michaeldisaro/jsencrypt
Private key encryption works, and also interoperability with C#.
Keys can be generated by the demo page, or from any C# backend. The important thing is to generate PKCS#1 private key with a PKCS#8 public key.

Michaelsoft
- 777
- 5
- 18