4

I want to pass the user's password to a cloud function to do stuff with through an HTTP cloud function. I was thinking about using RSA encrytion with a private key stored in the index.js file used for writing cloud functions and the public key being included in the client side javascript. I found a library for RSA encryption and decryption in javascript (https://github.com/travist/jsencrypt). Could I import this into the cloud functions index.js file by just importing it or would I need to paste the contents into the cloud functions index.js file?

I'm not very knowledgeable about encryption, so I really don't know if this method would even make sense.

Thank you.

ThisClark
  • 14,352
  • 10
  • 69
  • 100
Jeremy
  • 661
  • 7
  • 19
  • 4
    What are you trying to protect against? Keep in mind that traffic between the client and Google Cloud Functions is already sent over a secured (HTTPS/TLS) connection. – Frank van Puffelen Feb 23 '18 at 04:15
  • @Frank van Puffelen what if protecting something like database password from devs with lower access? – Ivan Wang May 19 '18 at 08:28

0 Answers0