Stack Exchange Network

Stack Exchange network consists of 175 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

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.

3
votes
2answers
56 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
271 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
143 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
121 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 ...
5
votes
1answer
330 views

RSA PSS security advantage

To my humble opinion, please correct me if I'm wrong, RSA-PSS (PKCS#1 ver 2.1) advantage over RSA as described in PKCS#1 ver. 1.5 is in its security proofs. Does this proof and the advantage is still ...
3
votes
1answer
138 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
65 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
314 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
380 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 ...
8
votes
2answers
1k 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
905 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
158 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
91 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
307 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
146 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
576 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
193 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
234 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
95 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
451 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
126 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
322 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
488 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
482 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
88 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
159 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
207 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
313 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
584 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
2k 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
78 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
136 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
74 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
90 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
1k 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
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
192 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
820 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 ...
4
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
215 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
33 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
647 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
282 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 ...
5
votes
1answer
1k 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
105 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 ...
2
votes
2answers
339 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 ...
1
vote
1answer
616 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 ...