salt

Are hashed and salted passwords secure against dictionary attacks?

早过忘川 提交于 2019-12-01 15:54:27
I understand that salts make the same password hash to different values. However, salts are usually stored in the database with the password. So let's say I am attacker, here is how I might use a dictionary attack against a salt (note in this example i don't write out 128 bit hashes or salts for the sake of brevity): user_pw = 'blowfish' Given: email = 'blah@blah.com' hash = '1234567890' salt = '0987654321' function attack(){ for each(word in dictionary) md5( word * salt ) == hash ? cracked_one(email, word) } I understand this prevents hackers from using rainbow tables...but doesn't seem to

Are hashed and salted passwords secure against dictionary attacks?

狂风中的少年 提交于 2019-12-01 14:42:26
问题 I understand that salts make the same password hash to different values. However, salts are usually stored in the database with the password. So let's say I am attacker, here is how I might use a dictionary attack against a salt (note in this example i don't write out 128 bit hashes or salts for the sake of brevity): user_pw = 'blowfish' Given: email = 'blah@blah.com' hash = '1234567890' salt = '0987654321' function attack(){ for each(word in dictionary) md5( word * salt ) == hash ? cracked

how salt can be implemented to prevent pre-computation dictionary attack on password

时间秒杀一切 提交于 2019-12-01 14:24:06
A salt makes every users password hash unique, and adding a salt to a password before hashing to protect against a dictionary attack. But how? The tool you almost certainly want is called PBKDF2 (Password-Based Key Derivation Function 2). It's widely available, either under the name "pbkdf2" or "RFC 2898". PBKDF2 provides both salting (making two otherwise identical passwords different) and stretching (making it expensive to guess passwords). Whatever system you are developing for probably has a function available that takes a password, a salt, a number of iterations, and an output size. Given

what's the big difference between execution modules and state modules

≯℡__Kan透↙ 提交于 2019-12-01 05:51:57
Recently, I'm learning salt from its doc. However, I'm quite confused about execution modules and state modules. Why there are two types of module? Why they can't unify? If we have just one type of module that can be used both on command line and in sls file, isn't it simpler and better? In short: Execution modules: execute a task States module: try to get to a certain state/configuration. Execution modules: They are designed to perform tasks on a minion. For example: mysql.query will query a specified database. The execution module does not check if the database needs to be queried or not. It

php crypt() blowfish salt length backward compatible

♀尐吖头ヾ 提交于 2019-12-01 03:38:10
问题 I used crypt() to hash password, with a blowfish salt like this: $2a$, 2 digits, $, 21 chars in [a-zA-Z0-9] Here I made a mistake that chars length after third $ is 21 not 22. But it worked fine so I didn't find the error. It works on my desktop which running windows and php 5.4.4 and on AWS ec2 which running Amazon linux with php 5.3.x, with that too short salt. One day I updated AWS php to 5.5.14. then the problem occurred. crypt() return *0 all the time. After some try, I added a $ at end

what's the big difference between execution modules and state modules

。_饼干妹妹 提交于 2019-12-01 03:08:36
问题 Recently, I'm learning salt from its doc. However, I'm quite confused about execution modules and state modules. Why there are two types of module? Why they can't unify? If we have just one type of module that can be used both on command line and in sls file, isn't it simpler and better? 回答1: In short: Execution modules: execute a task States module: try to get to a certain state/configuration. Execution modules: They are designed to perform tasks on a minion. For example: mysql.query will

Generating a salt in PHP

前提是你 提交于 2019-12-01 03:03:15
What's the best way to generate a cryptographically secure 32 bytes salt in PHP, without depending on libraries seldom included in typical PHP installations? After some googling I discovered that mt_rand is not considered secure enough, but I haven't found a suggestion for a replacement. One article suggested reading from /dev/random but not only this won't work on windows; it is also very slow. I want a reasonable balance between security and speed (ie, it shouldn't take 20 seconds to generate 512 bytes, like /dev/random usually does) Amber Note : mcrypt has been deprecated in PHP 7.1. Skip

Correct way to store and retrieve SHA-256 hashed and salted passwords

谁说我不能喝 提交于 2019-12-01 01:49:11
This is my first attempt in securely storing passwords and I would like to make sure that everything is done correctly. I was advised to use SHA-256 hashing alongside salt. Assuming user submitted their password thorough form, we get the password via $password = $_POST["password"]; What is correct way to salt $password and use SHA-256 hashing on it, so it can than be stored in a password field "password CHAR(64)" in a database? Once done and stored how would I than compare value stored in a database to one user entered in a login form? Lets assume $loginPassword = $_POST["loginPassword"]; is

How store salt in distributed environment

 ̄綄美尐妖づ 提交于 2019-11-30 23:23:40
I dont know how to use the "salt concept" in my scenario. Suppose I have a client desktop application that encrypts data for specific users and send it to a remote server. The client application generate a key with PKCS#5, with the user's password and a SALT. The remote desktop must NEVER be in contact with the user's password. Suppose we generate a random salt for an encryption. The client application can encrypt the data, and sent it to the remote server. If the user try to access his data on another computer, how will it be able to decrypt it since the salt is unknown? I think that using

Comprehensive information about hash salts

半腔热情 提交于 2019-11-30 17:10:48
问题 There are a lot of questions about salts and best practices, however most of them simply answer very specific questions about them. I have several questions which feed into one another. Assuming a database is compromised a per user salt prevents the use of generic rainbow tables to crack passwords. A separate rainbow table would have to be generated for each and every user who had a unique salt in order to obtain their password. This would be a time consuming process which is what makes salts