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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:27:19+00:00 2026-05-25T18:27:19+00:00

firstly, I apologize if my question sounds little confusing, I will try my best

  • 0

firstly, I apologize if my question sounds little confusing, I will try my best to describe my scenario as detailed as possible:

I have website where user can input their personal data about themselves. They are mainly health data, so it’s very private and sensitive information. So I need to encrypt this data on the server even then the server is compromised these data are secured because they will be encrypted with each user’s password. Of course, user passwords will not be stored as clear-type text on the server, only password hashes.

But my problem is that the website will offer “social function” when user can choose to share some of his/her information with another user. But this would be problem, because I will not have any way of decrypting user private data and so I can’t show it to another user.

Can you please give me some options, or at least ideas, how could this be solved ? Preferrably using LAMP environment.

  • 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-25T18:27:20+00:00Added an answer on May 25, 2026 at 6:27 pm

    This can be solved using public-key cryptography:

    1. Generate a public/private key pair for each user; and only ever decrypt the private key temporarily with the user’s password.
    2. For each data item, randomly choose a (symmetric) key S and encrypt the data d with it. Store S(d).
    3. Encrypt S with the the public key P+u of the user you want to grant access. Initially, that’s the user u whose data you’re storing.
    4. Store P+u(S) permanently. Forget all other keys.

    Now, when a user u wants to share the data with the user x, do the following:

    1. Decrypt the user’s private key P–u with the user’s password.
    2. Using that private key, decrypt the stored data: P–u(P+u(S)) = S.
    3. Encrypt S with the public key of the user you want to share the information with.
    4. Store the resulting P+x(S) permanently. Forget all other keys.

    Now, when any user x wants to access the data, perform the following process:

    1. Decrypt the user’s private key P–x with the user’s password.
    2. Find P+x(S). (If it’s not stored, that means nobody shared the data with the poor user x).
    3. Using the private key, decrypt the stored data: P–x(P+x(S)) = S.
    4. Using S, decrypt the stored encrypted S(d): S(S(d)) = d.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Firstly, I do not have any malicious intent out of this question. I would
firstly, I very much apologize for my poorly written title of this question. So
Firstly, I'm new to Android (so I apologize if this question is ignorant) but
Firstly, I want to apologize for my English, not my strongest side. To the
Firstly, let me set out what I'd like to do. Assume I have three
Firstly: I am totally a newbie for this kind of work. I have a
Firstly I know that there are many question and solutions to correct thread marshalling
Frstly my apologies if this is a duplicate question. I have tried to find
Firstly, apologies if I make a lot of mistakes in best VBA practice. I've
Firstly is it possible to use objective C to find out if the user's

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.