1

I need to pass a public key to the browser from nodejs and the browser should encrypt the user data and send it to the nodejs server, then nodejs should be able to decrypt it. I am trying to use crypto of nodejs in the server side and https://github.com/wwwtyro/cryptico cryptico in the browser.

I looked into angularjs-crypo, ursa etc, It made me more confused. PS: Im new to encryption and cryptography, any help would be appreciated

Nik
  • 11
  • 1
  • Do you have any code? You said you used crypto - how did that go? How did the result vary from what you intended. What are you asking us to answer? – OneNeptune Mar 12 '17 at 21:42
  • Since Im not a Crypto, I really do not understand the padding, algo and other things in great detail. Now using JSEncrypt in the browser which is working fine, but JSEncrypt does not work in nodejs..! :( – Nik Mar 12 '17 at 23:30
  • Just use HTTPS, all communication will be encrypted in transit. – zaph Mar 12 '17 at 23:39
  • @zaph : I agree https makes the communication secure, This is a very specific requirement and hence Im stuck – Nik Mar 12 '17 at 23:46
  • School project? Otherwise here is essentially no way you can create security close to HTTPS with TLS 1.2. OIf you ereally have to do this and sewcurity is important send it over an HTTPS connection. – zaph Mar 12 '17 at 23:49
  • not a school project, cannot move to HTTPS coz SEO teams is not approving for some reason unknown. So This was my alternate approach – Nik Mar 13 '17 at 00:55
  • SEO (Search Engine Optimization?) is more important than security? One word: Priorities. – zaph Mar 13 '17 at 02:26
  • OT: So disappointing, we have an Internet site security crisis and yet we are creating more insecure sites. Are we not professionals? Would professionals in other fields behave this way? Medical, civil engineering, air transportation, etc? Why are we doing this to ourselves! – zaph Mar 13 '17 at 02:37
  • The below post helped a lot, Thanks everyone for your time. http://stackoverflow.com/questions/33837617/node-rsa-errors-when-trying-to-decrypt-message-with-private-key – Nik Mar 13 '17 at 23:08

0 Answers0