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 8785849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T21:27:49+00:00 2026-06-13T21:27:49+00:00

I am trying to implement a security system that has the following requirements: All

  • 0

I am trying to implement a security system that has the following requirements:

  • All clients share a password, which is not known to the server
  • Each client has a unique client-id, which is known to the server
  • All clients with knowledge of the password must be able to generate the same shared secret on the server (this secret can be anything, it just needs to be the same for all clients and unique across passwords)
  • The password needs to remain secure, even if the server or the transport get hacked
  • It must be impossible for another party with a different client-id to generate the same server-side secret without knowledge of the password

Let me try to give a graphical representation of this:

            Client                         Server
.--------------^-----------.       .----------^----------.

          f(client-id 1)              g(client-id 1)
PASSWORD ----------------> request 1 ----------------> KEY
   || equal                                             || equal
PASSWORD ----------------> request 2 ----------------> KEY
          f(client-id 2)              g(client-id 2)

Here, f() [g()] are functions that the client [server] applies to the password [request] to obtain the request [key]. These functions may depend on the client-id.

There’s two approaches that I have come up with that might do this, but I am hoping for something simpler that requires less traffic and less server load:

  1. “No-brainer”: The clients hash the password. The clients and server each use a standard mechanism (like SSL) to secure their connection and send the hash over this connection.

  2. “A little more clever”: The server has a fixed private-key coded into it and each client has the public-key coded into it. The clients hash the password, XOR it with their client-id, encrypt the result with RSA/PGP using the public key. The server then decrypts the request using the private key and XORs the result with the client-id to arrive at the password hash.

In both cases, the server ends up with the same secret for the clients: the password hash. The advantage of the second version is that there is no need for the overhead of a full-fledged key exchange and encryption system, since unfortunately I won’t be able to rely on SSL in all cases. In fact, it allows me to generate the server secret in a single request without any handshake. The client-id-XOR in the second version are used to prevent replay-attacks, where a third party with a different client-id could otherwise simply send the same encrypted message to the server to generate the same secret. Basically it’s a no-overhead way to add a salt.

Now the question:

Since I don’t really have any requirements on the server-side secret, not even that the clients can generate this secret locally, is there an even simpler way to do this that doesn’t require expensive modular exponentiation of arbitrary-precision numbers like RSA does? I’m thinking of maybe some sort of other trapdoor function for f() and g() above that allows me to achieve the same result.

  • 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-13T21:27:50+00:00Added an answer on June 13, 2026 at 9:27 pm

    No takers, I guess… The question is probably too vague…

    In any case: For now I’ve decided to use RSA (i.e. approach 2 from above). It’s simple enough to implement and with the right libraries, it’s not too expensive to run either.

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

Sidebar

Related Questions

I am trying to implement web services that use different security mechanisms to do
I am trying to implement security for the following architecture: Web tier: Tomcat 7
I'm trying to implement row-based security checks for Django models. The idea is that
I am trying to implement claims based security using System.IdentityModel. We are using Windows
I am trying to implement a 'remember me' system with cookies that will remember
I am trying to implement a simple encrypted file system for all usb storage
I am trying to implement some custom security code into SSRS 2008 (not R2)
I'm trying implement A* Start path finding in my games(which are written with JavaScript,
Trying to implement 3-layer (not: tier, I just want to separate my project logically,
Trying to implement a rating system of users and postings. What is the best

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.