Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Salt is unique (usually random) data passed into a hash function for password storage to avoid the possible usage of rainbow tables or similar attacks. Salt will not help against dictionary or brute force attacks, as the salt is usually stored together with the hash.

1
vote
3answers
284 views

Password re-use by another person or on another service

How does having the same password in different services make it less secure? How does having the same password as someone else make it less secure? Very basic question that I've always wondered about; ...
2
votes
1answer
99 views

GUIDs as a salt

Quote: Most of these answers are a bit misguided and demonstrate a confusion between salts and cryptographic keys. The purpose of including salts is to modify the function used to hash each user's ...
7
votes
2answers
645 views

Why do some key derivation functions (like PBKDF2) use a salt?

Let me start by explaining my understanding of the various concepts involved in this question: Salt: Random bytes of data used as secondary input for a password hashing function, like so: ...
3
votes
1answer
220 views

Why can't decrypt with OpenSSL if salt changed (for CBC and ECB)

A file encrypted with OpenSSL (with, for example, AES 256-bit mode CBC) using the Linux command openssl enc -aes-256-cbc -in texte -out encrypted_texte -k password ...
0
votes
1answer
57 views

Hashing user password without database to store salt

I am building an Android app that will run purely locally on the user's device, no servers. It has a database that I want to encrypt with the user's password, which requires a 64 byte key. I've ...
2
votes
1answer
59 views

Does it matter if I append the secret to the salt or pass it in separately?

I'm using PBKDF2, and this is my current call. key = pbkdf2-hmac-sha256(iterations = 100_000, secret = password ++ salt) I recently learnt that the function I'm ...
3
votes
1answer
233 views

Turn a password into a key without using salt

Assume I have a password with sufficient entropy but may not be uniformly distributed, how can I turn the password into a key that can be used for symmetric encryption? I think there is surely such a ...
2
votes
3answers
110 views

Two salts, One password

If I have two different MD5 password hashes with two different salts (the salts are known), is there any way to cryptographically deduce if the two passwords match? Other than brute force password ...
3
votes
6answers
430 views

How does a salt get chosen?

I feel like I am missing some information regarding salting. How does one choose the salt? If you reuse the same salt for all passwords, can it just be figured out and then used in conjunction with ...
-2
votes
2answers
66 views

Can't salt be easily removed from hashed password if access to the database was obtained?

After playing around with bcrypt I see that the database stores the salt and the hashed password is prepended with the salt. I read this article on how hashing should be properly used which also ...
1
vote
1answer
123 views

Storing Salt in Ciphertext?

I found the cryptomator encryption documentation online, because I was looking for something to learn about x). I altered the process a bit to fit "my need" / so that I would not have a vault, but a ...
1
vote
1answer
66 views

Does public-key + hashing create a security vulnerability?

The title says it all really...let's say I have a packet of data that one of my applications needs to store encrypted with a public key (RSA, say, with the private key kept elsewhere). Let's say the ...
5
votes
2answers
446 views

Do very short values make a peppered hash less secure?

Given many very short (or low-entropy) values – like 6-digit numbers – that are stored as hashes using a fixed secret pepper, e.g.: ...
2
votes
2answers
111 views

Salt passwords with the username?

Salts should be unique so that an attacker can't brute force multiple passwords at once. However, since usernames are unique, wouldn't it be possible to use some representation of the username as a ...
0
votes
1answer
149 views

Salt length for a single password

So I've been reading about salt, and am confused about why the length is so critical. From my understanding salt is used for protection against pre-computed attacks. Say I have a single password ...
1
vote
4answers
317 views

salt usage for hashed password storage - design consideration

This is part of my academic assignment and hence to ensure no one feels i'm asking for the answer. I've given my opinion. Hashing is mathematical one way function that takes arbitrary length data ...
2
votes
1answer
359 views

Salt and pepper at both client and server sides?

Putting aside that it may sound paranoid. I know that many users tend to use the same password on many sites. Then, from an ethical point of view, I should not only be concerned about security breaks ...
0
votes
1answer
71 views

Storing Encrypted data in a mobile client

We have a mobile client application which stores data in localstorage for offline use. The new GDPR requirements have to mandate us to encrypt the data we store in the client. We used Stanford's sjlc....
-3
votes
1answer
116 views

Secure password storing mechanism [closed]

I recently thought about a secure password storing mechanism. I wanted to ask if the following password storing mechanism is resistant against rainbow tables with a secure password and the attacker ...
0
votes
0answers
30 views

Why salt can be saved in plaintext? [duplicate]

That don't facilitate the work for the attacker if him can view the salt?
0
votes
1answer
155 views

Cracking pdf file with arabic password using hashcat

I have been doing some test on password strength using arabic passwords and try to crack it using hashcat and when i used a non salted hash like a custom generated md5 hash and tried using --hex-...
4
votes
1answer
224 views

Is the seed/salt input of a Key Derivation Function confidential?

I'm implementing a security protocol and for the key management a scheme is proposed using a key derivation function on the remote device. Thereby the input seed is uploaded in plaintext to the remote ...
0
votes
1answer
288 views

What is best practise for salting and multiple-hashing of passwords?

I have been presented with some custom PHP code for salting passwords and applying multiple rounds of hashing. It looks reasonable, but I fear home-grown crypto. Is there an existing password ...
1
vote
1answer
897 views

How do you get the original salt after it's been hashed to the user's password in the database?

I'm researching how to do salt and hashing. I'll be using SHA256. Here is what I found: To Store a Password Generate a long random salt using a CSPRNG. Prepend the salt to the password ...
1
vote
1answer
60 views

Salt for non stored passwords

I read a lot about the concept of adding a salt to a password and understand that it protects against rainbow table etc. attacks. But this kind of attacks are based on getting access to the server ...
1
vote
0answers
105 views

Is it safe to re-use the salt for HKDF as a challenge for proof of possession after key derivation?

I have a system made of 2 or more parties, already sharing a master key MK, who want to agree on a session key SK (both 128-bit ...
-1
votes
1answer
72 views

Why it seems to me common to say that a hash salt is “random”?

I'm not a cryptography expert. In this video, and in some other places in the web, I saw hash salts are being called "random". But if the salt is created only once and then reused each time anew, ...
21
votes
5answers
7k views

How come hash salt doesn't make a hash ineffective?

I am not a cryptography expert. I watched this video regarding hashing and salting as part of the course User Authentication With Express and Mongo in teamtreehouse.com. I understand from the video ...
3
votes
2answers
1k views

About salted passwords

In most applications, all passwords are salted independently. In terms of security (e.g. attack complexity), what are the consequences of the following differents approaches: All passwords are salted ...
0
votes
1answer
87 views

Some Questions about salts

I am an amateur teaching myself, so please don't expect too much professional knowledge. I have some things that are not clear to me about salts. For example I wondered if a "too strong" salt could ...
0
votes
1answer
825 views

Proper number of salt bytes for Rfc2898DeriveBytes/PBKDF2

I know that .NET's Rfc2898DeriveBytes requires at least 8 bytes of salt, but how many bytes are ideal? When a user is created, or changes their password, my server stores a new random salt for that ...
3
votes
1answer
54 views

Is it a good or bad idea to include a password's salt in the calculation of a MAC?

Say there's a cryptosystem where encryption and authentication of data is done using a key derived from a user-given password using something like PBKDF2. Is it a good or bad idea to include the ...
0
votes
0answers
141 views

Do I need to worry about the IV if I use a 32 byte random salt with SCrypt and AES-GCM?

I am encrypting a DEK (data encryption key) with a KEK (key encryption key). The KEK is generated from a password using scrypt with default parameters and a 32 byte randomly generated salt. The ...
1
vote
1answer
554 views

Question about IV/initialization vectors

I found some code to get crypto-js to encrypt data in the browser, and with a pointer from someone on SO, it now decodes data as well. My next question is about the use of an IV; is an IV like a salt ...
0
votes
1answer
1k views

extract password hashed in scrypt using hash and salt [closed]

I have the hashed password and its salt. It is encrypted using SCRYPT by firebase. How can I extract the plain text password from these two? Or alternatively, how can I re-encrypt or convert them ...
4
votes
1answer
688 views

How do I create an effective salt?

Background I have recently started to get into web development and thus I have been creating databases for users. After some research, I discovered that password encryption is not password hashing. ...
1
vote
2answers
102 views

How to calculate the needed encryptions in salted passwords?

Consider if a 16-bit salt is used, and it is uniformly applied over a very large password file (200,000 entries). An attacker wants to see if one particular password (say, "bubba") is used by any of ...
0
votes
1answer
32 views

Reusing characters from plaintext in salt

I'm curious about the security implications of reusing characters from the plaintext as salt.e.g. $salted_plaintext = $plaintext[1] . $plaintext[7] . $plaintext; ...
1
vote
1answer
567 views

storing salt in app

I want to create a key for my realm database wich work with AES-256 and for encryption wants a byte[64] key. I read this good question about create a key from 4 ...
3
votes
2answers
197 views

Risk of appending secret salt to plaintext prior to RSA encryption?

TL;DR Will appending session id to a password prior an RSA encryption introduce vulnerability where an eavesdropper can collect multiple encrypted password ciphertext and perform cryptanalysis to ...
4
votes
1answer
895 views

How long should the salt be for PBKDF2?

In order to complicate rainbow table attacks, salt must be provided as input to PBKDF2 when a key is derived from a low-entropy password. I have decided on my algorithms and key lengths to achieve ...
1
vote
0answers
86 views

Authentication of short message based on 6-digit alphanumeric compare-and-confirm

I have two parties that want to communicate with each other based on a shared password. The protocol is using PBKDF2 (with HMAC-SHA256) to create a shared key on both sides (due to restrictions on the ...
1
vote
2answers
251 views

Usage of “Salt”

Can somebody explain how Salts should be stored in the database? How is the process of using Salt? I've read in a book that the Salt should be stored next to the hash table database. But what happens ...
0
votes
1answer
462 views

PBKDF2 without salt on 16 digit password

How secure would be to use PBKDF2 without salt (or with the same salt for all) with a 16 digits passwords that are unique and randomly generated (there can't be two identical)? Assuming an adversary ...
3
votes
1answer
207 views

Rotating password with PBKDF2

Crypto is hard. Thank you for helping me learn. My encryption scheme currently looks like this: Salt is stored out in the open Secret is the user's password, known only to them EncKey||AuthKey = ...
0
votes
1answer
100 views

Security when using same salt for different passwords, compared to using different salts?

I have this question I am struggling about: For example, someone suggested improving UNIX authentication by defining 3 different passwords for a user that are stored in the shadow file. All three ...
4
votes
1answer
1k views

Do I need to use a CSPRNG when creating salts for user accounts?

I'm not sure about the need of using CSPRNG to create salts for each user account. I found “Cryptographically Secure Pseudo-Random Number Generator in Qt/C++ (Cross platform)” (at StackOverflow) with ...
3
votes
2answers
298 views

Should I add randomness at the end before AES?

Seen AES, changing a character drastically affects the encrypted text. I want to make it harder to decrypt AES I send. So, it seems this can be done by adding some special code and some random bytes <...
0
votes
0answers
43 views

If one has hash = hash(salt + password) and one knows N pair of hash and salt is it easier to attack the password?

For example: $hash = md5($salt + $password) I know N pairs $hash $salt 60d0c34a37a71b279edaae4ffdcba86d 1 1d79c99d01f51f8e8b4c6505e8f6728e 2 ... Is it possible ...
3
votes
1answer
94 views

Security implication of deriving key with fixed salt for files authentication

Context: I need to calculate MAC for a collection of files just for future integrity and authentication verification. This is the conceptual order of steps: Derive a 64 bytes key from user input ...