Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8333843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T03:09:29+00:00 2026-06-09T03:09:29+00:00

I’m currently using a free host that doesn’t allow https connections, and since my

  • 0

I’m currently using a free host that doesn’t allow https connections, and since my site doesn’t host any sensitive or private content it’s not something I’d upgrade to paid hosting just to have. But since my site does handle passwords, and since many users use the same password for different sites, I would like to put a reasonable amount of security/encryption in the handling of those passwords.

From Secure login: public key encryption in PHP and Javascript, it looks like the biggest problem in using public/private encryption of the password to protect it when it’s sent over the network would be that an attacker could modify the public key sent to the client, and then intercept the encrypted password, decrypt it with the attacker’s private key, then encrypt it with the site’s public key, and then send it to the site, in essence defeating the whole point of encrypting it in the first place.

Of course, any encryption is better than no encryption, but I would like to do the best I can without having to purchase HTTPS-enabled hosting, which brings me to my question.

Is there any reliable way to prevent (or just detect & alert the user) a middleman from replacing their own public key in place of my site’s public key? Or is there any way to verify that the public key sent by the server is really the server’s public key? If there’s no way to verify this, how does SSL/TLS work, and how do they verify the keys (apologies if SSL doesn’t use public/private keys, I do have a pretty limited understanding of it)?

I already understand that just encrypting form data is an extremely weak practice compared to using TLS/SSL, and won’t stop people who are determined to break the encryption from doing it, so please refrain from any “you should be using HTTPS”-only comments (though if you know a free hosting provider that allows HTTPS, I’d be more than happy too hear about them)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T03:09:30+00:00Added an answer on June 9, 2026 at 3:09 am

    The reason why SSL works is that the root certificates are distributed within the browser. There are many problems with this scheme, but in general you have a chain of trust – in this case ending with the trust on the browser (certificate store, distribution, installation etc.). It falls down when any Certificate Authority private key is insecure and this is currently a highly debated issue.

    Chain of trust:

    enter image description here

    Browsers certificate store:

    enter image description here

    The problem with JavaScript is that you don’t have (access to) a trust store, so there is no way you can trust the key you receive. The attacker could simply replace it with his own key (and login to your own site with his key). That would constitute a classic man in the middle attack, and there is preciously little you can do against it.

    Encrypting with the public key does give you some protection against eavesdropping attacks. Unfortunately, most attacks that have access to the connection in the first place are probably able to create a MITM, e.g. when using WiFi access points.

    Try and find your browsers trust store, you can probably view the configured root certificates distributed within it. This tree structure of certificates and private key is called Public Key Infrastructure (so Google it).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I am reading a book about Javascript and jQuery and using one of the
I want use html5's new tag to play a wav file (currently only supported
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am doing a simple coin flipping experiment for class that involves flipping a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.