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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T15:57:01+00:00 2026-06-16T15:57:01+00:00

Cryptography is a widely adopted techonlogy to ensure confidentiality. Not considering implementation flaws, it

  • 0

Cryptography is a widely adopted techonlogy to ensure confidentiality. Not considering implementation flaws, it has a single critical point: the secret key storage. If the secret key is stolen, the whole system will be compromised.

EDIT :

let me specify the context to make the question less broad:

  1. here a java web application is addressed
  2. more specifically it is used the spring framework version 3
  3. spring security 3.1 is used to secure the application
  4. a mysql5 database is available
  5. the application server is tomcat6 or tomcat7
  6. the server machine is not under my control

Maybe the questions can be focused on this scenario but, as pointed out, the problem of the secret key storage is transversal to the adopted technologies. However some libraries might offer peculiar features that can somehow facilitate the work.
A clear point is that a tradeoff has to be found between security and the need to do practical things. To complete the analysis it is obvious that the required security level depends on the value of information to secure. It is senseless to flip our minds to enforce super-secure strategies (demanding a very lot of efforts) to keep secret the shoe size of a customer.

Here, I have to secure an email password (that will be stored in a db). I consider this information average critical.

What I’m looking for here, is the best solution with reasonable effort.

So the question is very clear: where would you store this information?

  1. do you store it in a database? So it should be encrypted and this requires another key (and where do you store this second key?)
  2. do you store it inside the .war package? How do you prevent unauthorized accesses to the sources?
  3. do you adopt a different strategy?

motivations for your strategy will be appreciated.
thank you

  • 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-16T15:57:02+00:00Added an answer on June 16, 2026 at 3:57 pm

    I take the liberty to write an answer even if this doesn’t have anything to do with a Java Web Application: I think the problem exists in only minor variance with all platforms.

    Basically there are 3 candidates for key storage, the first 2 of which you mentioned:

    • The DB
    • The App (“hardcoded”)
    • Somewhere else on the server, that runs the WebApp, most often a file

    You already put your finger on the weak points of the first 2, so no need to repeat, I fully agree.

    This is also the motivation for me to use the third candidate. The reasoning is this:

    • Different instances of the same app can easily have different keys, so a compromise of one will not automatically spread to all others
    • If the server is compromised in a way, that allows the attacker to read any file, it is game over anyway: You wouldn’t be able to stop him from reading the app binary or the DB
    • File system security on a web server is a quite well-understood subject
    • Break-ins, that allow full filesystem access are statistically much less often, than application or database break-ins
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I understand that System.Security.Cryptography has a MD5 hashing method in MD5.ComputeHash . However, the
I've read quite a few times how I shouldn't use cryptography if I'm not
I am hashing password using the .NET System.Security.Cryptography class. It has a few algorithms
System.Security.Cryptography.ProtectedMemory is not available in WinRT. Is that functionality made available somewhere else?
I don't know anything about cryptography. I'm wondering what the session secret is. I
The .NET System.Security.Cryptography namespace has a rather bewildering collection of algorithms that I could
How to use cryptography with XML documents used for rails Active resources? Or, is
I am writing a cryptography application and need to work with 128 bit integers.
This is more of a cryptography theory question, but is it possible that the
I know almost nothing about cryptography, but I would like to figure out how

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.