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

  • Home
  • SEARCH
  • 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 7943711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T00:21:05+00:00 2026-06-04T00:21:05+00:00

I have a (client/server communication) setup right now like so: 1) Client asks user

  • 0

I have a (client/server communication) setup right now like so:

1) Client asks user for username and pass

2) Client send this to server using port 80 (over the web)

3) Server responds saying whether this is the right password (correctpass/wrongpass) and if it is correct, it will send an encryption key to the client.

4) Client sends a series of commands to the server (all commands start with the encryption key that the server gave to the client).

5) Server checks the encryptionKey to identify the client and responds to the commands

My question is:

Is this the right way to keep things secure? I am not sure whether sending a single encryption key back and forth is going to do any good. Would it help more to have the client generate an encryption key and have the server verify it?

What I want to do it have something like what facebook does to authenticate it’s apps. For example, I can imagine that facebook does something to prevent me from stealing the raw password through a program like wireshark or a tcp analyzer.

If it matters at all, my program is written in c# and uses standard http to send/receive data.

Thanks,

Rohit

  • 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-04T00:21:07+00:00Added an answer on June 4, 2026 at 12:21 am

    To keep most of the things you are doing the same you can simply change your steps to

    1. Client asks user for username and pass

    2. Client establishes a SSL connection to the server.

    3. Client sends username and password over SSL connection.

    4. Server responds saying whether this is the right password (correctpass/wrongpass).

    5. Client sends a series of commands to the server (all commands are sent through the same SSL connection that was used to send the password).

    The server does not need to keep re-verifying the user’s identity every message, as long as you are using one continuous connection the SSL layer does all of that work for you invisibly behind the scenes.


    On another note, Facebook does nothing like what you are describing, they use OAuth. Here is a basic example of how OAuth works (from yahoo’s developer page)

    enter image description here

    So you do step 1 once per application as you write it, steps 2-4 get done once per user to associate the application with their account, then you only need to do step 5 until the token received in step 4 expires (could be anywhere from hours to days, depends on the site). Once the token expires you just need to repeat step 4 (or if that fails, steps 2-4) and the user can use the program again.

    Step 3 is where they enter the password information, but note that they are entering their password on Yahoo’s website, so your program never gets to touch the user’s username and password (that is the entire point of OAuth!).

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

Sidebar

Related Questions

I have a server and client setup to use UDP communication. For now, I
I have a client-server java application, where communication happens over SSL. Right now I
My client-server communication looks like this: there are some so called annoucements which are
I have a client-server application written in Java using CORBA for the communication. The
I have client/server applications and a very simple protocol for communication. More precisely, it's
I have a client and server communicating via Spring remoting (using Java Serialization) over
We have client server based app which saves user related data into a zip
If I have a connection between a client and a server using ssh. What
I have setup a basic WCF client/server which are communicating via Named pipes. It
I have a WCF client/server app which is communicating over HTTP using the WSHttpBinding.

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.