In the authentification page the user writes his password, and if it is correct, he is redirected to the main page.
In the main page there is a messenger also, which uses end-to-end encryption (Diffie- Hellman and AES). For that, it requires the password of the user to generate a key (for Diffie-Hellman).
I don't want to ask the user the password again. However I don't know how to send the password from authentification page to the main page securely.
May I save the password in coockie, get it in another page as redirected and delete it?