I am uploading files to the server using the usual File Upload action in SC. I want to encrypt the uploaded file using a public key so it’s secure and only decryptable by someone downloading the file and using the private key which is never uploaded to the server.
Hi Jon, this is called asymmetric encryption. Industry standard is something called PGP. Wappler would probably need a custom extension, I think Wappler only has symmetric encryption built-in formatters.
Symmetric encryption = you encrypt and decrypt with same password
Asymmetric encryption = you encrypt with public key and decrypt with private key
I’ve taken a leaf from @ben’s book and asked ChatGPT to create an extension for me. It looks like it’s done a good job but my knowledge of Wappler extension building is near zero so I would very much appreciate if someone with the knowledge (someone from the Wappler team?) could glance over it and let me know if this will do the job?
Hi Sid. Ooh, this looks very interesting. Do you think the client side code would be enough? I’m thinking the ideal solution is a form where the visitor can upload a file, the page encrypts it with the public before sending it to the server connect script. Then the option for staff to log in and download the file providing the private key in the browser so it can be opened but without ever sending the private key to the server.
Does your solution effectively provide this facility? Have you seen the other post I added today which has a solution to do this created by ChatGPT?
I haven’t created any Wappler extensions so am very newbie with this but if you’re able to glance over it and let me know if this should work then that would be great.
Yes. It has both server and client side capabilities to do so.
On the client side, I haven’t packaged it as Wappler extension, only on the backend.
I haven’t had the change to play with frontend extensions unfortunately.