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
1
vote
0answers
42 views

Can the salt be derived based on the other components of encrypted data?

I'm using python.cryptography's Fernet with PBKDF2 passphrase hashing to encrypt a piece of data (the value) that is stored, encrypted, in a database. The hashed passphrase is not stored in the ...
1
vote
3answers
144 views

if i enter a password that's incorrect but that collides with one when hashed, will it let me in?

suppose no salt or pepper is used and passwords are hashed plain, will entering incorrect password that just hashes to the same let me in? i know that one use of salting/peppering techniques is to, ...
0
votes
1answer
42 views

Necessity of PBKDF2 in current Setup?

I have a single password which is random bytes that encrypts a database. Right now I am using an encryption scheme of https://gist.github.com/jbtule/4336842. To summarize, we take our one password, ...
0
votes
1answer
72 views

Should I protect the salt before storing it in a database or use a pepper (secret salt) instead?

If I protected the salt or used a pepper (secret salt) and an attacker got access to the database he can't do a rainbow table attack on a targeted user (a famous or important person). Should I use a ...
0
votes
1answer
56 views

Does my SHA-256 TableSalt algo give away the seed salt?

The Setup I have a table of values for which I need to compute a salted hash for each table-cell value. Furthermore, I need the salt for each table cell to be unique and unpredictable. (I can explain ...
5
votes
2answers
495 views

7-Zip Encryption: Practical Effect of Lacking Salt

A previous discussion on Cryptography StackExchange leads me to understand that 7-Zip does not use salt to derive an encryption key from password to use its AES-256 encryption; that this is a ...
0
votes
0answers
65 views

Adding salt to Blake3 Key derive function

According to the whitepaper, Blake3 can be used as a key derivation function (function key_derive). Currently, as a key ...
2
votes
2answers
196 views

Secure AES IV with static salt

I have an (offline) shared secret key (symmetric) which is used to encrypt/decrypt data. Now this data belongs to a specific user which is known on the backend and frontend. My idea was to use the ...
1
vote
1answer
114 views

Do I need a salt for Scrypt if the data is client-side?

I have a web app, in which I am encrypting user data client side. Each client has their own password, which is used to derive an encryption key (via Scrypt) for encrypting their data. Since the data ...
0
votes
2answers
263 views

Match bcrypt hash with plaintext

I have a bcrypt hash: $2b$10$kn7yEh2nYiDqDYNY.hjiZOtASBKT9uO4KozbFWDW2XLYnW58nkpq and a list with given plaintext passwords. How can I get the password from the ...
1
vote
1answer
59 views

Do you use a salt when encrypting a password or just when hashing a password?

A password is used to connect to a database. This password is kept in a file. This password (therefore) needs to be encrypted. A program to access the aforementioned database needs (of course) the ...
0
votes
0answers
47 views

Best way to derive a MAC key without a salt

It's best to use separate keys for encryption and the MAC. Most implementations tend to derive a larger key and split it in two (e.g. scrypt with an output of 32 + 64 = 96). Alternatively, you can ...
2
votes
2answers
166 views

Can I use ChaCha20-Poly1305 as my KDF?

I have two devices that use a PSK. One is embedded and extremely resource confined. I'm already using ChaCha20-Poly1305 so it would be "free" to reuse this. There is no transport encryption ...
1
vote
1answer
204 views

Best practise for encryption in a password manager

I'm trying to make a password manager for Windows installed computers, and after researching the best ways to encrypt the passwords in the database (I'm new to cryptography) I think I've come up with ...
1
vote
2answers
110 views

Static salt for PBKDF2, but unique salt for HKDF?

Hypothetical. Lets say you have an application where you generate a master key from a user password using PBKDF2 (static salt) and then use the master key to derive two passwords keys for an encrypt-...
0
votes
1answer
30 views

Which is the better way of generating a salt string?

Using T-SQL as per the snippets below, which method is superior (or is it a tie)? ...
-1
votes
1answer
479 views

Salt length in SHA-512 version of Unix crypt command

SHA-512 crypt specs reports that SHA-512 crypt uses 128bit salt. The FreeBSD/Linux password generation code builds the salt using 16 bytes random data (128bits) and then it translates the random data ...
0
votes
0answers
20 views

Is my password database encryption flow secure?

I'm not an expert and I would be very glad if someone could take a look at it and tell if there are any problems with it Things I know/think are problematic using base64 digest + getting the first 32 ...
2
votes
1answer
157 views

Random salt and PBKDF2 key

Suppose I wrote a function $$(salt,IV ) = \text{keyIVGenerator}(passwd)$$ which generates a random salt of size 32-bytes and a random Initialisation Vector (IV) of size 16-bytes. Then, use a Key ...
1
vote
1answer
149 views

Using a nonce as a salt for key derivation

I'm currently playing a bit with PyNaCl (python binding to libsodium) and I want to use the secretbox for symmetric encryption between two parties, which means they both must know the (in my case ...
3
votes
4answers
1k views

Could a fixed RSA encryption be used instead of a salt to prevent rainbow table attacks?

It's common to use a salt before hashing a password in order to prevent an attack by rainbow tables. Would it also work to encrypt the password for instance by RSA encryption - by a permanent RSA ...
2
votes
1answer
185 views

Difference between server salt and client salt?

Basically I am trying to understand the difference between server salt and client salt. I know that the client salt is used to make encryption harder for hackers, but I can't seem to grasp the concept ...
1
vote
1answer
80 views

Salt: best practice

I'm a complete novice at this and in need of advice. I'm building an app that I've implemented a password encrypted backup feature into. I'm wondering about the best practice for handling the salt. ...
-1
votes
1answer
280 views

Is storing salts encrypted a good idea?

I've read that storing password hashes in a database, you can store the salt in plaintext alongside the actual hash with no detriment to security. I was thinking that one could derive a key from the ...
0
votes
1answer
205 views

Is AES ECB mode with salt and frame counter still comparatively weak?

Many advice against using AES in ECB mode as it always produces same cipher text for a given plain text. That shortcoming can be addressed by using salt appended to original message so that the ...
1
vote
0answers
33 views

AES implementation for non-password multi-document decryption usecase

I am trying to encrypt/decrypt multiple user documents (consider text) in an application. Unlike the use case of passwords where decryption happens once during an API call, in this application during ...
11
votes
1answer
4k views

Why do I need to store the salt for generated hashes?

I am new to crypto and authentication so have been doing reading around this and thought that I had a pretty good understanding of how this works. However when implementing my hashing using ...
0
votes
2answers
139 views

KDF and salt storage

Regardless of the KDF I will use, let's imagine that I have to generate two keys: one for authentication and the other for encryption (which will always remain on the device that generates it until ...
0
votes
2answers
110 views

For uniterated SHA-256 of salted password, should the password precede the salt?

This is a follow-up to this question (thanks to answers from @fgrieu and @kelalaka ) about the format of a salt when hashing a salted password. I realize this is pretty much academic, as the proposed ...
1
vote
2answers
321 views

What format should a salt be when it is concatenated with the password?

Assume that, in the available environment, it is not possible to use modern password hashing functions (bcrypt, scrypt, Argon2, PBKDF2, etc.), so it is necessary to roll my own stand-in, until they ...
2
votes
1answer
413 views

Is it safe to reuse the same nonce for decryption an indefinite amount of times in this context?

I'm creating a password management application and I'm considering using the following procedure to keep passwords safe: Asking the user for raw_password, for ...
9
votes
3answers
3k views

Using cryptographically random password as both the password and the salt

This question is theoretical, but will help with my understanding. All of my passwords are securely generated using 64 random letters (both uppercase and lowercase) and numbers. Using the argon2i ...
2
votes
1answer
85 views

Choosing between hash functions instead of providing a salt for a password hash

I am working on some programs that require the users to store their passwords in my databases. However, due to the fact that I am not sure whether salt should be stored in databases due to my ...
1
vote
3answers
920 views

How to securely store and validate a 4-digit PIN used on a mobile device?

I want to be able to securely (1) create and (2) validate a PIN, typed by a user primarily in a mobile app. There is no 'typical' password, although there is another 2nd factor. The starting point ...
0
votes
2answers
319 views

Cracking hashes: With vs without knowing the salts

Let's assume the following situation: The attacker has extracted 1000 password hashes from a website (vuln.com) along with all their usernames and hashing ...
1
vote
3answers
91 views

Calculate the complexity of HKDF with a 96bit salt and a 128bit key?

I have a 128 bit Pre-Shared Key. I don't want to use it directly. I'd much rather generated a session key with HKDF(PSK, SALT) = SESSIONKEY. I'm however under ...
2
votes
1answer
264 views

ChaCha20-Poly1305: Can my salt/pass for a KDF also be the nonce?

I have a PSK. I don't want to use it directly. I want to pass a "salt"/password into a KDF and get a new key for authenticated encryption with ChaCha20-Poly1305 . I need to give the other side the ...
0
votes
2answers
404 views

Is it safe to use a deterministic salt as an input to KDF (Argon2)?

I'm prototyping an app that uses client-side password hashing in order to hide the "real" account password from a server (the server hashes any recieved password anyway, so no plaintext records in the ...
0
votes
2answers
202 views

Password hash salt

I'm asking this question to have a professional opinion about this, and to check if my assumptions are correct. The question derives from few comments I exchanged on SO: Problem with login I can login ...
3
votes
1answer
509 views

BLAKE2: What is the difference between the salt and the personalization?

Libsodium builds their KDF on top of BLAKE2b: BLAKE2B-subkeylen(key=key, message={}, salt=subkey_id || {0}, personal=ctx || {0}) Besides the key, the function ...
2
votes
1answer
689 views

openssl encryption salt length

when i was reading the latest source code of openssl, i found openssl enc has an 8-byte (64-bit) salt length; because the same ...
2
votes
2answers
253 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
150 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
62 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
67 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
2k 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
1k 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
198 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
170 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
855 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 ...