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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:12:24+00:00 2026-05-24T08:12:24+00:00

I wanted to know if there exists a somewhat simple, but secure, method to

  • 0

I wanted to know if there exists a somewhat simple, but secure, method to encrypt strings(not passwords), with a password which is not stored on the server, in PHP.

I’ve checked A reversible password encryption routine for PHP, but I’m unsure if it is secure enough if intruders have access to the server and source.

We’re talking about a automatic system where a computer sends a request to a server, which stores information in a log. So I’m thinking I could send the encryption password in the request header, preferably encrypted, but then it would be difficult to decrypt without storing the password somehow on the server. Wait, I think i might be complicating things a bit too much, but I hope you get the idea… It’s meant to keep the information safe, even if hackers have full control over the server.

  • 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-24T08:12:25+00:00Added an answer on May 24, 2026 at 8:12 am

    If I understand you correctly, you aim for a log that is encrypted by the server. The requests are sent in plain, but you’d like to log something like per-user access statistics or the like and you deem this data to be confidential, so it should be encrypted by the server and also be decrypted by the server, if necessary.

    If this is the case, it is actually not all too complicated.

    • Generate an encryption key (AES would be a good choice) that is to be used by the server.
    • You store this key in a file.
    • Make sure that the application and only a few selected people have access to that location. Worst case would be it’s served in your public files and anyone could download it from the web. So put it in a folder far away from your public resources 🙂
    • Encrypt that file using password-based encryption e.g. PBKDF2 in RFC 2898.

    Then you will realize that you created a hen-egg problem – the file again needs a password for the server to have access to the key stored inside. But here’s the trick – you will have to enter the key upon server startup manually, and that’s the ephemeral component you need. The password for the file should be out-of-band information (e.g. placed in a physical vault) and nowhere on the computer itself.

    An alternative (but potentially less secure because the password would be present in some physical form) is to rely on OS-specific "password vaults" such as Windows’ Isolated Storage.

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

Sidebar

Related Questions

hi guys I wanted to know, is there a way to not display my
I wanted to know if there is way to log the mysql queries in
Just wanted to know if there is a big chance to inject SQL While
I wanted to know if there's a way I can bind an Asp.net Ajax
I am putting together a build system and wanted to know if there is
I'm playing around with html client side storage and wanted to know if there
I know there are non-standard frameworks such as commons-validator, and hibernate validator. I wanted
Wanted to know if someone had a suggestion on code or maybe there's a
I'm not asking if these are truly random. I just wanted to know if
I wanted to know if there are any conventions regarding disposal of disposable items

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.