• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to encrypt Database?

 
tangara goh
Ranch Hand
Posts: 125
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have created a log in page, using servlet for validation and jsp for display.

However, I would not want my passwords and userid to be "sniffed".

Hope to hear the experts' views on how to make sure data are secured in my ms access. Do I need to write any codes in my servlet to make it secure?

Any reference codes or materials would be most useful.

Thank you.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Best practice is to store passwords as hashed (or digested) values; that way, nobody can get at them.

More generally, security is a multi-faceted process that needs to be considered in each part of the system; if you're asking how to make a system more secure in general, then the SecurityFaq points to many areas you may want to address.
 
Vinod Tiwari
Ranch Hand
Posts: 466
1
IntelliJ IDE Java Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may encrypt password and persist in database and for user authentication again encrypt entered passoword and compare with that in database.
 
Tim McGuire
Ranch Hand
Posts: 820
IntelliJ IDE Tomcat Server VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here is pseudo code for what I used to hash the password before storage into the database:



MessageDigests are secure one-way hash functions that take arbitrary-sized data and output a fixed-length hash value
 
Scott Selikoff
author
Saloon Keeper
Posts: 3903
16
Eclipse IDE Flex Google Web Toolkit
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Make encryption a one-way process. In other words, users enter passwords that get converted to encrypted values that *NEVER* get decrypted. This means that to verify login you compare the stored value against the encrypted value the user enters. This also means you never display or send the password to a user (which is actually a feature of this model, not a bug). If someone wants to log in as a user without knowing the password, the user's password has to be reset.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic