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.

learn more… | top users | synonyms

5
votes
2answers
775 views

Is there a standard for OpenSSL-interoperable AES encryption?

Many AES-encrypted things (files, strings, database entries, etc.) start with "Salted__" ("U2FsdGVkX1" in base64). I hear it's ...
2
votes
1answer
57 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 ...
1
vote
1answer
67 views

How are salt values more secure?

If a database stores password encrypted by using salt values, how are they stored? I read somewhere, it uses timestamps. So is the timestamp also stored? How about when a user tries to login next ...
2
votes
3answers
837 views

Salts, how does the script know what the salt is?

I am new to PHP programming and trying to grasp the idea of hashing and encryption for protecting passwords, credit card details and such. I've done a lot of reading about MD5 which I think I ...
0
votes
1answer
68 views

Should I add randomness at the end before AES?

Seen AES, changing a character drastically affects the ecrypted 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 ...
1
vote
1answer
42 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 ...
0
votes
0answers
20 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 ...
0
votes
1answer
74 views

Reducing the probability that a password will be guessed

In a file users' password hashes are stored. There are 2 approaches to reduce the probability that the password is guessed. Increase the size of the salt from 12 bits to 24 bits. Increase the length ...
5
votes
1answer
354 views

Does salt size affect password hash security?

I use PBKDF2-SHA512 with an iteration count of 128,000 to hash my passwords. I use a CSPRNG to generate a salt per password. However, I am unsure about the ideal size of the salt. I have read a lot of ...
1
vote
0answers
32 views

Increase in security with increase in size of salt [duplicate]

Does increasing or doubling the size of salt result in improved security? It will require some extra time to brute force the passwords, but any added advantage?
45
votes
4answers
30k views

Can you help me understand what a cryptographic “salt” is?

I'm a beginner to cryptography and looking to understand in very simple terms what a cryptographic "salt" is, when I might need to use it, and why I should or should not use it. Can anyone offer me a ...
7
votes
1answer
1k views

How to salt PBKDF2, when generating both an AES key and a HMAC key for Encrypt then MAC?

When using Encrypt-then-MAC with AES and HMAC by password, and given 128 bits of payload with the ciphertext to store a random salt, which would be more secure: Using PBKDF2 with then entire 128 bit ...
0
votes
1answer
32 views

Is there an algorithm that allows verification that 2 encrypted or hashed bits of data are the same, given that I may only know half of the key/ salt?

We have an interesting problem. Currently, we store a salted hash of some secret key known only to the clients of our clients to allow us (and our clients) to find other records that were generated ...
1
vote
1answer
67 views

Hash + Salt v. Hash + Encryption

I was wondering if using a salt with a hash is more effective than hashing and encrypting your hash.
7
votes
2answers
400 views

Need for salt with IV

I have mainly referred to this question. Definitely in case of using a salt, IV has a use of adding randomisation to each and every key. But isn't it redundant in case of using an IV to use a salt? ...
11
votes
2answers
1k views

How can I make my cipher show the avalanche effect?

I am a beginner in cryptography. I designed an password based encryption-decryption algorithm, which uses a random salt and a password to encrypt a message. I'm using SHA-512 for hashing, matrix ...
1
vote
1answer
79 views

What effect does a salt have on attacks against hashes's fundamental properties?

I am interested in analyzing how adding a salt to our hashed passwords affects the three types of attacks we can use. The three types of attacks against hashes are as follows: We have the hashed ...
4
votes
1answer
104 views

Could we share a secret key using the Birthday problem?

I stumbled upon this code on-line, it seems obvious to me that generating all 2^40 keys in trivial time can always be achieved as can hashing each and everyone of them, using the SHARED Salt that ...
0
votes
1answer
104 views

Making both the IV and salt public for PBE with AES-CFB

Is it okay to make both the IV for AES-CFB and the salt for PBKDF2 public? Does this action of mine compromise security in any way? I have an implementation of this cipher and had previously asked a ...
2
votes
1answer
145 views

Is it true that 7zip doesn't use any salt with its KDF?

This issue claims that 7zip does not use any salt with its key derivation function: https://github.com/magnumripper/JohnTheRipper/issues/1679 If that's true, wouldn't that mean you can crack multiple ...
2
votes
1answer
108 views

Hash and salt or salt and hash?

People say "hash and salt", but aren't you supposed to salt password the first, and then hash it? So that means its called "salt and hash" right?
2
votes
3answers
199 views

Hash email address with a non-random salt for moderate security?

Crypto noob here. I have an application that has only moderate security requirements (internal use, limited audience). I want to send a unique url with a token in it to each user. If anyone has the ...
3
votes
2answers
400 views

Algorithm for generating OAuth tokens

I'm trying to find a good algorithm for generating authorization codes, access tokens and refresh tokens in an API. Currently, I am looking into the following setup: Tokens are generated using the ...
2
votes
1answer
72 views

Can the salting function complexity improve the hash robustness?

I'm quite novice in security, and all examples I saw seem to salt the password by concatenating it, or by applying a simple binary OR or XOR. So the hash is based on "salt + password", "salt | ...
8
votes
2answers
313 views

Does the position of the salt improve its effectiveness when hashing?

Seems most documentation I have read suggests the salt should prefix the value to be hashed. Is this just for consistency, or is the salt more effective when prefixed?
3
votes
1answer
128 views

Is it possible to reverse the birthday attack calculation?

I find that for every 100 password salts in our database, we only average 94.73 distinct salt values (averaged over a total of around 18 million). Is there a way to take that observation and calculate ...
1
vote
1answer
116 views

Birthday-attack calculation in planning password salting strategy

The book Cryptography Engineering by Fergusun, Schneier, Kohno section 2.7.1 explains Birthday Attacks: "In general, if an element can take on N different values, then you can expect the first ...
1
vote
2answers
166 views

What are the required security properties for salts?

I was recently thinking about password hashing (maybe caused by the PHC progression). I started to think a little more about it and got stuck at this question: What security properties do ...
2
votes
1answer
67 views

Salting in asp.net?

I have spent the past hour reading up on salting and still don't understand how it is achieved. Forgive me if im wrong, but the way I am thinking of salting is, storing an ArrayList of random strings ...
0
votes
0answers
127 views

RSA-PSS salt size in certificate

In RFC 4055, the signature RSAPSS algorithm has the following ASN 1 parameters: ...
1
vote
1answer
243 views

Derive cipher IV and cipher Key using PBKDF2 with random salt?

It is said that cipher IV does not have to be secret and the only secret component of the encryption scheme should be a cipher key. Question: is it safe to generate IV using PBKDF2 function, which ...
2
votes
2answers
99 views

Is it safe to use a secret salted hash of a public id for client to prove ownership of id to a server that knows salt but does not store ids?

I am writing a peering server - the server assigns randomly generated public IDs to users, and I want users to be able to reclaim their ids in the future, but only to be able to claim ids that they ...
5
votes
2answers
244 views

How is HMAC(message,key) more secure than Hash(key1+message+key2)

I understand how for hash functions which are vulnerable to length extension attacks (such as SHA1 and SHA2) it is safer to use a HMAC construction. What I don't understand is, how or why is ...
3
votes
1answer
135 views

Is it safe to derive two different keys with the same password and key derivation function using two different salts?

I would like to know if the following process would harm the security of a fictional system if the persisted data would be stolen: in this system a user has a single password. The password will be ...
10
votes
4answers
3k views

Encrypting small values with RSA private key

I'm looking for best practices when it comes to encrypting small (< 128 bytes) amounts of data with the RSA private key. Signing it would make the resulting payload too large.
1
vote
5answers
2k views

How easily could this be cracked?

I'm looking into encrypting files like this: First, I SHA-1 hash the password. Let's say the password is something normal like "hello123", and then hashed. Then I encrypt a file using this: ...
0
votes
1answer
88 views

If I know the salt, can I decrypt the commitment?

Say, I salt my key(K) with y. So, my new Key is K' = Salt(K+y). Now, Alice sends commitment = E[K',M] to Bob. Bob knows the salt(y), but not K nor K'. Can Bob decrypt the message?
0
votes
1answer
73 views

Viability of an “Unconventional” Hashing Scheme?

I am playing around with the following hashing scheme: Start with a domain string (same for all users), Allow every user to mutate it in any way defining their own custom replacement rules, Append ...
1
vote
0answers
53 views

Recovering a constant salt for MD5 [duplicate]

I have STRING and MD5(STRING+SALT) for any infinitely many STRING's. Is their any way that I can recover the SALT itself? (SALT is constant) I actually know SALT, but this is an intellectual exercise. ...
5
votes
2answers
2k views

Can a salt for a password hash be public?

For my understanding salts in password hashes are used to prevent the precomputation of $plaintext \to hashvalues$ (rainbow tables). I know from different threads, it is not necessary to keep the ...
0
votes
1answer
52 views

Is there (this) a case in which salting is dispensable?

tl;dr this is not a duplicate of "what is a salt/why use salt?" question. Instead it is specificly asking when salt may not be necessary for hashing securly? (i.e. when the data being hashed is ...
10
votes
2answers
471 views

Definition of “pepper” in hash functions

I am confused about the notion of "pepper" in the context of storing hashes of users' passwords. Definition 1: A pepper is a secret key Looking around the Internet, for example here or here, a ...
0
votes
1answer
120 views

Storing salts and iteration number?

I have a function that derives two sub-keys from one passphrase using PBKDF2 one which is used as a encryption key the other for HMAC generation, because these two sub-keys will need to be regenerated ...
2
votes
2answers
134 views

Is it safe to salt a MAC?

Say that I define a scheme where the salt is public and is MAC-ed with the message: $k = KDF(password, salt)$ $tag = MAC_k(salt || message)$ Is it safe to salt the MAC this way? Assume that the salt ...
1
vote
2answers
138 views

Are password salts equivalent to keystream?

I was reading up on keystream when I came upon the definition of it: A keystream is a stream of random or pseudorandom characters that are combined with a plaintext message to produce an encrypted ...
0
votes
1answer
159 views

Session based AES with random key and static salt

I'm currently using aes to encrypt/decrypt messages to and from a web service. When the user establishes a session he sends a random generated secret via rsa public key. This secret is used to ...
1
vote
1answer
173 views

INT_32_BE in PBKDF2

Trying to understand PBKDF2 in detail. It is clear that the password and the salt is given to the PRF (which is HMAC-SHA-1 in the specification). But what is the role of the INT_32_BE(i)? What does it ...
7
votes
3answers
2k views

Change Salt when Changing Password?

Assume a password storage scheme using a computationally-expensive hash algorithm and a CSPRNG salt. User ID, salt, and hash value are stored in a table; if the table is compromised, all three ...
10
votes
1answer
1k views

Using SHA-256 with different initial hash value

FIPS 180-3 defines the initial hash value for SHA-256 as the first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19. What would be the risks of using a different value ...