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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T15:08:59+00:00 2026-05-21T15:08:59+00:00

I have a database with companies and their clients. The database needs to be

  • 0

I have a database with companies and their clients. The database needs to be able to answer the question ‘which companies have a client living at address X?’, which is normally very straightforward to implement of course.

What I want to avoid is that an attacker can somehow find all company-client relations. This database will reside on a webserver and queries to it will be limited to avoid brute-force downloading of all the data.

But what if the server is compromised and an attacker has access to the whole database and possibly even any private keys that are stored on the server? It’s ok if the attacker can find the list of companies, or the list of clients, but he should not be able to find out which companies are related to which client and preferably he should not be able to retrieve the address of each client.

Clients are identified by their address, not by any kind of unique ID. In my country there are only about 5 million different addresses. I though of using a secure hash to protect the address, but it’s very easy to compute 5 million hashes and build a mapping from hash to address. Even if the hash is salted.

The only thing I can think of is security through obscurity: I make sure that the hashing function is not clearly recognizable and is in compiled code, and hope that the attacker isn’t smart enough to figure this all out.

Is there any way at all to make this really secure?

EDIT: the comments of a3_nm and Nick Johnson are correct of course: if an attacker has access to all the data, it cannot possibly be made secure. Thanks for pointing out this (obvious) flaw.

So I need something that is not stored in the database. To make sure only companies and clients can access their own data, I can encrypt it with their own password. So a company’s list of clients would be encrypted with the password of that company, which will never be stored on the server and would have to be sent along with each request. I think it’s ok for me to assume that the attacker cannot intercept the requests which contain the passwords.

Or is there another (obvious?) flaw in this line of thinking as well?

  • 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-05-21T15:09:00+00:00Added an answer on May 21, 2026 at 3:09 pm

    I’m not sure it is possible to secure that. It looks like you would like an attacker with total access to the server to be unable to get answers to queries that the server is supposed to answer. If the attacker has server access, he can use the server to answer any query the server can answer–there’s no way to work around that.

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

Sidebar

Related Questions

I have a real simple database with 8 tables: Activities Classes Companies Computers Customers
My database have column MyId which is INT PK. In mapping file I have
Which one is faster to have database key as String or as Long? If
I have a database with files which can be searched, browsed and have multiple
I have database with many tables. In the first table, I have a field
I have a database that contains a date and we are using the MaskedEditExtender
I have a database table and one of the fields (not the primary key)
I have designed database tables (normalised, on an MS SQL server) and created a
I have a database with names in it such as John Doe etc. Unfortunately
I have a database with two tables ( Table1 and Table2 ). They both

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.