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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:05:29+00:00 2026-06-11T20:05:29+00:00

I would like to store sensitive userdata like name and address in a mysql

  • 0

I would like to store sensitive userdata like name and address in a mysql database.

My main question is how to search through the database that contains encrypted data.

if someone steals the computer it is not good, if the data is stored in plain text so I would like to encrypt it with a key, that is stored in the php files.
The php files are encoded with ioncube, so a key inside the php code is (quite) secure.

On the other hand I also want to be able to query the application from the web-frontend for usernames and address.

My first idea was to encrypt the data before I store them and in my search-page, I would have to read the whole user database and decrypt it completely, so I can search in the results with php.

but for large userdatabases, this would be very memory-intense.


additional information:

I already have encrypted the password, so I need no solution for that.

I need a solution in php and mysql, because I cannot change the server configuration (disc-encryption, etc.) The server is an old ubuntu 9 installation which is very insecure, but cannot be changed for reasons I will not explain here.

  • 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-11T20:05:30+00:00Added an answer on June 11, 2026 at 8:05 pm

    You can encrypt each sensitive field of the database row but you need to keep the key secure. If you’re worried about the whole server being stolen then you cannot store the decryption key on the filesystem as that would be stolen along with the machine.

    You could use a per-user encryption with a key generated from the user’s password. As you (I assume) are storing only the hash of the key (use Bcrypt) it will be difficult for an attacker to retrieve the user’s password. However, this means only the user can view his data; admin accounts will not be able to decrypt other user’s sensitive data. This may well be a deal-breaker for you.

    If data needs to be accessible to others beside the user then you must use the same encryption key globally across your app. Without having this key in a config file your only option would be to attempt to store the key in memory (so that you would have to initialise the system before it was usable). This would not be enough to guarantee the key was not written to disk (think swap files, etc) but would go closer to protecting the data after a cold boot.

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

Sidebar

Related Questions

I have a table that contains some sensitive data that I would like to
I am creating a console application that would store some sensitive strings in memory,
I have a certificate .p12 and .crt and I would like store the public
I would like to store all paths to headers in separate file. I'm going
I would like to store some information at the request scope when using google
I would like to store the points whenever touchesMoved is called. So far everything
I would like to store historical equity price data in a table in the
I would like to store a small profile picture of my users in their
I would like to store large dataset generated in Python in a Django model.
I would like to store the cookies from one open-uri call and pass them

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.