Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #17573

Re: Encrypted field in form (HTTPS question)

Subject Re: Encrypted field in form (HTTPS question)
Newsgroups comp.lang.php
References <d84489df-16bf-4856-a24f-c4e91d2ae2b4@googlegroups.com>
From Richard Damon <Richard@Damon-Family.org>
Message-ID <5XsmB.32779$kJ2.25267@fx33.iad> (permalink)
Organization Forte - www.forteinc.com
Date 2017-08-21 00:02 -0400

Show all headers | View raw


On 8/20/17 11:43 PM, bit-naughty@hotmail.com wrote:
> I'm trying to set up a simple blogging system, where I have a form which will have a textbox which will allow me to post stuff. Now I want a password field on the form, so that random people cannot post. I would like this password to be ENCRYPTED during transit. So - there'll be TWO textboxes, one for the password, and one for the post itself - what would the coding for the form look like? It's only the password that has to be encrypted, not the post. I realise this is more of an HTML question, but really, it concerns the whole thing, front end as well as back. I have no idea what HTTPS coding on the backend looks like. How would I extract the unencrypted password on the server side?
> 
> 
> Thanks for your help.
> 

A form post in pure HTML can not encrypt some data.

You could just submit the form via HTTPS, so the whole form is 
encrypted. HTTPS does the encryption in the communication layer, and you 
get the unencrypted results (so it is mostly transparent to your script)

A second option, that probably isn't really worth doing, is adding 
javascript to the form, and have that run on submit and have the 
javascript encrypt the data. You would need to create a new 
public/private key for each instance of the form sent out to do the 
encryption, and send the public key with the form. On reception, the 
page would need to look up the public key to find the matching private 
key, and use that to decode the password.

Back to comp.lang.php | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Encrypted field in form (HTTPS question) bit-naughty@hotmail.com - 2017-08-20 20:43 -0700
  Re: Encrypted field in form (HTTPS question) Richard Damon <Richard@Damon-Family.org> - 2017-08-21 00:02 -0400
    Re: Encrypted field in form (HTTPS question) V <vvvvvvvvvvvvvvvvvvvv11111@mail.ee> - 2023-04-03 06:57 -0700
      Re: Encrypted field in form (HTTPS question) doctor@doctor.nl2k.ab.ca (The Doctor) - 2023-04-03 14:19 +0000

csiph-web