Questions tagged [passwords]

Passwords are primarily used as a way of accessing information and also limiting the number of users who can get access to a machine. It is primarily used with a username for the authorization system. Sometimes people use keys instead of passwords due to the increased strength of the keys.

Passwords or Pass Phrases are a that is used to help lockout people who do not know this string from using a persons account or computer. They have almost always been used since computers were first connected with each other as a way of making sure that each user had the ability to know that their account on the computer or network was not going to be taken over by a peer worker who had something against them. It also makes sure that only the person who knows a person's user-name and password can get into their account and change things that they have access to.

On websites and other web-based services passwords are used to make sure that anyone trying to connect to the site or service is who they say they are. In addition to a user-name which may be a another string or the person's email, it makes the server that the person who is trying to login(gain authorization to the site or service) more likely to trust them and allow them to gain access to it.

Storing a password should never be done in plain text, this means that the passwords are stored exactly as they were typed by the user. You should use a functions that are is available in almost every web programming language, and thus is the best way to store a users password since it uses one-way encryption which means that no one can get the password back without first attempting to guess it repeatedly, also known as "bruteforcing".

alone still discloses that the two passwords are the same (as they would have the same hash value). To avoid this, a known random string (salt) can be hashed together. Salt can be stored openly (next to the hashed value) as it is not a password, just makes the password hash-code different.

It is still better to protect such table as much as possible as (assuming the hashing algorithm is known) the attacker can use it with his own program to probe a big number of potential passwords in a short time. Probing the real system is much more difficult as it usually locks or at least forces delay after multiple failed attempts.

A big proportion of currently use passwords are insecure and can be relatively easily guessed (empty, same as username, date of birth, etc). Another problem is that users often use the same password for different sites or applications.

9952 questions
3585
votes
18 answers

Why is char[] preferred over String for passwords?

In Swing, the password field has a getPassword() (returns char[]) method instead of the usual getText() (returns String) method. Similarly, I have come across a suggestion not to use String to handle passwords. Why does String pose a threat to…
Ahamed
  • 36,657
  • 12
  • 35
  • 67
1292
votes
11 answers

How do you use bcrypt for hashing passwords in PHP?

Every now and then I hear the advice "Use bcrypt for storing passwords in PHP, bcrypt rules". But what is bcrypt? PHP doesn't offer any such functions, Wikipedia babbles about a file-encryption utility and Web searches just reveal a few…
Vilx-
  • 97,629
  • 82
  • 259
  • 398
1209
votes
14 answers

Secure hash and salt for PHP passwords

It is currently said that MD5 is partially unsafe. Taking this into consideration, I'd like to know which mechanism to use for password protection. This question, Is “double hashing” a password less secure than just hashing it once? suggests that…
luiscubal
  • 23,581
  • 8
  • 51
  • 82
1206
votes
7 answers

How do I remove the passphrase for the SSH key without having to create a new key?

I set a passphrase when creating a new SSH key on my laptop. But, as I realise now, this is quite painful when you are trying to commit (Git and SVN) to a remote location over SSH many times in an hour. One way I can think of is, delete my SSH keys…
btbytes
  • 75
  • 3
  • 4
  • 10
784
votes
50 answers

How to generate a random string in Ruby

I'm currently generating an 8-character pseudo-random uppercase string for "A" .. "Z": value = ""; 8.times{value << (65 + rand(25)).chr} but it doesn't look clean, and it can't be passed as an argument since it isn't a single statement. To get a…
Jeff
  • 6,296
  • 5
  • 25
  • 33
520
votes
23 answers

Is there a way to crack the password on an Excel VBA Project?

I've been asked to update some Excel 2003 macros, but the VBA projects are password protected, and it seems there's a lack of documentation... no-one knows the passwords. Is there a way of removing or cracking the password on a VBA project?
Jonathan Sayce
  • 8,653
  • 4
  • 34
  • 47
518
votes
21 answers

How to reset Django admin password?

I am using Django (version 1.3) and have forgotten both admin username and password. How to reset both? And is it possible to make a normal user into admin, and then remove admin status?
IamH1kc
  • 5,442
  • 4
  • 15
  • 15
491
votes
8 answers

Best way to store password in database

I am working on a project that has to have authentication (username and password) It also connects to a database, so I figured I would store the username and password there. However, it seems like not such a good idea to have passwords as just a…
Crash893
  • 10,590
  • 20
  • 82
  • 118
431
votes
35 answers

Disable browser 'Save Password' functionality

One of the joys of working for a government healthcare agency is having to deal with all of the paranoia around dealing with PHI (Protected Health Information). Don't get me wrong, I'm all for doing everything possible to protect people's personal…
mattsmith321
  • 6,385
  • 5
  • 25
  • 18
408
votes
9 answers

Java 256-bit AES Password-Based Encryption

I need to implement 256 bit AES encryption, but all the examples I have found online use a "KeyGenerator" to generate a 256 bit key, but I would like to use my own passkey. How can I create my own key? I have tried padding it out to 256 bits, but…
Nippysaurus
  • 19,402
  • 18
  • 71
  • 124
402
votes
25 answers

Cannot import the keyfile 'blah.pfx' - error 'The keyfile may be password protected'

We just upgraded our Visual Studio 2008 projects to Visual Studio 2010. All of our assemblies were strong signed using a Verisign code signing certificate. Since the upgrade we continuously get the following error: Cannot import the following key…
JasonD
  • 7,202
  • 5
  • 28
  • 31
309
votes
16 answers

Is "double hashing" a password less secure than just hashing it once?

Is hashing a password twice before storage any more or less secure than just hashing it once? What I'm talking about is doing this: $hashed_password = hash(hash($plaintext_password)); instead of just this: $hashed_password =…
Bill the Lizard
  • 369,957
  • 201
  • 546
  • 842
288
votes
10 answers

What data type to use for hashed password field and what length?

I'm not sure how password hashing works (will be implementing it later), but need to create database schema now. I'm thinking of limiting passwords to 4-20 characters, but as I understand after encrypting hash string will be of different length. So,…
z-boss
  • 14,861
  • 12
  • 46
  • 79
282
votes
7 answers

Getting command-line password input in Python

You know how in Linux when you try some Sudo stuff it tells you to enter the password and, as you type, nothing is shown in the terminal window (the password is not shown)? Is there a way to do that in Python? I'm working on a script that requires…
Nacht
  • 8,550
  • 6
  • 26
  • 39
269
votes
31 answers

How to bind to a PasswordBox in MVVM

I have come across a problem with binding to a PasswordBox. It seems it's a security risk but I am using the MVVM pattern so I wish to bypass this. I found some interesting code here (has anyone used this or something…
mark smith
  • 19,527
  • 44
  • 131
  • 185
1
2 3
99 100