Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I\'m implementing a way for users to share messages with other users. All users

ID: 662043 • Letter: I

Question

I'm implementing a way for users to share messages with other users. All users and admin-users have a unique key pair. A message can be sent from one user to multiple users.

Admin-users, who always have access to all messages, in case a user loses his password, and then makes a new password (with a forgot-password email link), the admin-user can decrypt the message with the admin-user private key and encrypt it with the users new public key.

Is there a way to automate this process, securely of course?

I was thinking sending a mail to a local-server (not connected to the webserver), so the local server can login to the site as admin-user and give the user access, when they changed their passwords.

Explanation / Answer

First, don't re-encrypt messages, encrypt message decryption keys. It is far more efficient to produce a symmetric key for each message and then encrypt it to each user's keyring that should have access. If admin users have access to all messages, you could add the private keys of all users to a keyring and then simply return the private key to the user after their password is changed. This should probably not be an automated process though as you need to make sure that the user is the correct person first or there isn't much point to the encryption. Further, you want to avoid storing keys on the server, which means some admin user needs to be logged in to unlock the user's private key for their account.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote