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
181
votes
9 answers

MySQL user DB does not have password columns - Installing MySQL on OSX

I am trying to change MySql root password. What I have done is below. Install MySql-5.7.6 ~ .dmg(Community Server) and workbench. Turn off the server on OSX System preferences. Access MySql with console. The command was mysqld_safe…
Juneyoung Oh
  • 6,295
  • 15
  • 61
  • 105
181
votes
4 answers

ASP.NET Identity's default Password Hasher - How does it work and is it secure?

I am wondering wether the Password Hasher that is default implemented in the UserManager that comes with MVC 5 and ASP.NET Identity Framework, is secure enough? And if so, if you could explain to me how it works? IPasswordHasher interface looks like…
André Snede
  • 8,907
  • 6
  • 41
  • 61
174
votes
20 answers

Should I impose a maximum length on passwords?

I can understand that imposing a minimum length on passwords makes a lot of sense (to save users from themselves), but my bank has a requirement that passwords are between 6 and 8 characters long, and I started wondering... Wouldn't this just make…
nickf
  • 499,078
  • 194
  • 614
  • 709
174
votes
8 answers

Two-way encryption: I need to store passwords that can be retrieved

I am creating an application that will store passwords, which the user can retrieve and see. The passwords are for a hardware device, so checking against hashes are out of the question. What I need to know is: How do I encrypt and decrypt a…
HyderA
  • 18,174
  • 41
  • 103
  • 169
169
votes
6 answers

How can I store my users' passwords safely?

How much more safe is this than plain MD5? I've just started looking into password security. I'm pretty new to PHP. $salt = 'csdnfgksdgojnmfnb'; $password = md5($salt.$_POST['password']); $result = mysql_query("SELECT id FROM users …
Rebar
  • 1,699
  • 3
  • 11
  • 3
163
votes
5 answers

Best Practices: Salting & peppering passwords?

I came across a discussion in which I learned that what I'd been doing wasn't in fact salting passwords but peppering them, and I've since begun doing both with a function like: hash_function($salt.hash_function($pepper.$password)) [multiple…
Glitch Desire
  • 13,276
  • 6
  • 39
  • 54
161
votes
8 answers

Salting Your Password: Best Practices?

I've always been curious... Which is better when salting a password for hashing: prefix, or postfix? Why? Or does it matter, so long as you salt? To explain: We all (hopefully) know by now that we should salt a password before we hash it for storage…
Randolpho
  • 52,575
  • 15
  • 139
  • 173
159
votes
10 answers

Best way for a 'forgot password' implementation?

I'm looking for the best method to implement a "forgot password" feature. I come out with 2 ideas: When user click on forgot password, the user is required to key in the username, email and maybe date of birth or last name. Then a mail with…
Hoe Chin
154
votes
11 answers

Regex to validate password strength

My password strength criteria is as below : 8 characters length 2 letters in Upper Case 1 Special Character (!@#$&*) 2 numerals (0-9) 3 letters in Lower Case Can somebody please give me regex for same. All conditions must be met by password .
Ajay Kelkar
  • 4,011
  • 3
  • 25
  • 26
151
votes
20 answers

How to pass the password to su/sudo/ssh without overriding the TTY?

I'm writing a C Shell program that will be doing su or sudo or ssh. They all want their passwords in console input (the TTY) rather than stdin or the command line. Does anybody know a solution? Setting up password-less sudo is not an option. expect…
n-alexander
  • 12,733
  • 11
  • 39
  • 43
150
votes
9 answers

Difference between Hashing a Password and Encrypting it

The current top-voted to this question states: Another one that's not so much a security issue, although it is security-related, is complete and abject failure to grok the difference between hashing a password and encrypting it. Most commonly found…
Claudiu
  • 206,738
  • 150
  • 445
  • 651
149
votes
11 answers

Is it worth hashing passwords on the client side

When I want to put a login system in place, I always compare the MD5 of the given password with its value in the users table on the server side. However, a friend of mine told me that a "clear" password could be sniffed by a network software. So my…
Zakaria
  • 14,316
  • 22
  • 82
  • 123
148
votes
20 answers

Simple way to encode a string according to a password?

Does Python have a built-in, simple way of encoding/decoding strings using a password? Something like this: >>> encode('John Doe', password = 'mypass') 'sjkl28cn2sx0' >>> decode('sjkl28cn2sx0', password = 'mypass') 'John Doe' So the string "John…
RexE
  • 15,409
  • 14
  • 54
  • 77
144
votes
7 answers

Hide password with "•••••••" in a textField

In my app there is a textField where the user have to put is password in and i want that when he enter a character it change it to '•' how can i do this?
Clément Bisaillon
  • 4,559
  • 7
  • 27
  • 49
141
votes
3 answers

How do API Keys and Secret Keys work? Would it be secure if I have to pass my API and secret keys to another application?

I am just starting to think about how api keys and secret keys work. Just 2 days ago I signed up for Amazon S3 and installed the S3Fox Plugin. They asked me for both my Access Key and Secret Access Key, both of which require me to login to…
Lance Pollard
  • 66,757
  • 77
  • 237
  • 416