Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [salt]

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.

Filter by
Sorted by
Tagged with
2
votes
2answers
62 views

What is the purpose of salting when integrating PBKDF2 with AES?

I'm a bit new to cryptography and I'm trying to wrap my head around PBKDF2 and AES. As a disclaimer, this is not going to be used in an actual application, I'm just testing things locally as a fun ...
0
votes
1answer
30 views

Add a pepper to a hash: as a string or a buffer, and should I calculate a hash of a peppered plain text?

I'm using a bcryptjs to generate a computationally slow hash function for storing passwords: ...
0
votes
0answers
21 views

Static Salt In Argon2 For Converting ECDH Shared Secret Into AES Key

I am using Argon2 to convert an ECDH exchange result into the correct format for AES-256 encryption. However the library that I am using for Argon2 requires a salt. Are there any weaknesses of using a ...
2
votes
2answers
45 views

How to protect against brute force attacks in the case of a small dictionary?

Sorry if I'm not using the right terminology, as I'm new to crypto. I want to know the most effective way to protect a database against brute force attacks in the case of a small dictionary. For ...
1
vote
3answers
66 views

Can you find the salt if you have the original password in plaintext and the hashed version?

Suppose that I have a password in plaintext. I also have the hashed version of the password. Say it uses MD5. Is it possible to find out what the salt is given the above information? I'm guessing not?
4
votes
3answers
953 views

Should we run PBKDF2 for every plaintext to be protected or should we run PBKDF2 only once?

I am going to store secrets from users. The secrets need to be stored confidentially. For this question, I am concerned only with confidentiality (not integrity). Here is how my encryption scheme is: ...
1
vote
1answer
150 views

Cracking a hash when you know the result?

If I know that the algorithm used is SHA1 constructed as salt+key, and I have the result, is it possible to find the salt? Example: ...
3
votes
2answers
84 views

Why BouncyCastleAesCbcBytesEncryptor is using a salt and an initialization vector?

I'm using the class BouncyCastleAesCbcBytesEncryptor from Spring Security. One of the constructor has the following signature: ...
3
votes
2answers
361 views

How difficult is it to guess a salt based on a hash and known plain text?

I have the following use case: Alice owns the domain alice.com and Bob owns bob.com. I want to users to create a hash for ...
5
votes
1answer
214 views

Is It Safe to Reuse the Same Salt in Bcrypt Password Hash (Specifically for Chaining Hashes)

As explained in my previous question, I want to develop a scheme which would be able to increase the password hash strength without the user password. According to Thomas Pornin it should be safe to ...
3
votes
1answer
134 views

What is the most secure way to check that a given masterkey is valid?

For the purposes of learning, I'm writing a small utility that allows encrypting a list of passwords using a single master key (using AES-256 and PBKDF2) Before encrypting or decrypting any password ...
3
votes
1answer
192 views

What are the disadvantages of XOR key derivation?

Assume a 256-bit Key and a 256-bit Salt, with uniformly distributed entropy, both fully independent. Assume ...
2
votes
1answer
78 views

Would using a hash of the site name salted with a master password be a secure password for all sites?

I am considering creating an application that is able to work out a unique password for a site by hashing the url while using a secure master password as a salt (or technically pepper since it will ...
1
vote
3answers
318 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
682 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 ...
10
votes
2answers
2k 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
2k 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
194 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
117 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
343 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
163 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
851 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
364 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
335 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
117 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
457 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
151 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
481 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
556 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
531 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
99 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....
-2
votes
1answer
164 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
1answer
277 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
399 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
811 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
3k 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 ...
2
votes
1answer
90 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
153 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
75 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
8k 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
95 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
2k 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 ...
2
votes
1answer
57 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
1answer
209 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
1k 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
2k 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 ...
3
votes
1answer
2k 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
285 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
34 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; ...