I read the man crypt and didn't understand what the phrase below means: salt is a two-character string chosen from the set [a-zA-Z0-9./]. This string is used to perturb the algorithm in one of 4096 different ways.
78569
I'm having some trouble understanding the purpose of a salt to a password.  It's my understanding that the primary use is to hamper a rainbow table attack.  However, the methods I've seen to implement this don't seem to really make the problem harder.  I've seen many tutorials suggesting that the salt be used as the following:  $hash =  md5($salt.$password)   The reasoning being that the hash now maps not to the original password, but a combination of the password and the salt.  But say $salt=foo and $password=bar and $hash=3858f62230ac3c915f300c664312c63f.  Now somebody with a rainbow table could reverse the hash and come up with the input "foobar".  They could then try all combinations of passwords (f, fo, foo, ... oobar, obar, bar, ar, ar).  It might take a few more milliseconds to get the password, but not much else.  The other use I've seen is on my linux system.  In the /etc/shadow the hashed passwords are actually stored with the salt.  For example, a salt of "foo" and password of "bar" would hash to this: $1$foo$te5SBM.7C25fFDu6bIRbX1.  If a hacker somehow were able to get his hands on this file, I don't see what purpose the salt serves, since the reverse hash of te5SBM.7C25fFDu6bIRbX is known to contain "foo".  Thanks for any light anybody can shed on this.  EDIT:  Thanks for the help.  To summarize what I understand, the salt makes the hashed password more complex, thus making it much less likely to exist in a precomputed rainbow table.  What I misunderstood before was that I was assuming a rainbow table existed for ALL hashes.
23599
Wikipedia lists the following pseudocode for HMAC:  function hmac (key, message)     if (length(key) &gt; blocksize) then         key = hash(key) // keys longer than blocksize are shortened     end if     if (length(key) &lt; blocksize) then         // keys shorter than blocksize are zero-padded ('∥' is concatenation)          key = key ∥ [0x00 * (blocksize - length(key))]      end if      // Where blocksize is that of the underlying hash function        o_key_pad = [0x5c * blocksize] ⊕ key      // Where ⊕ is exclusive or (XOR)     i_key_pad = [0x36 * blocksize] ⊕ key       // Where '∥' is concatenation        return hash(o_key_pad ∥ hash(i_key_pad ∥ message))  end function   Why are they there?  How were they chosen?  It seems to me that  $hash(key + hash(message))$ (where + is concatenation) would suffice.    Obviously I'm missing something.  What is it?
81991
Here is a cartoon about password entropy.   I dont quite understand how the entropy is calculated in the cartoon assuming they are calculate correctly. But in general, I dont have much idea about how password entropy is calculated.
94353
With a Cipher text of   7ECC555AB95BF6EC605E5F22B772D2B34FF4636340D32FABC29B  73CB4855BE44F6EC60594C2BB47997B60EEE303049CD3CABC29B  64C6401BAF45F6A930435F3DF875C4E102F8742A45C824AFCA9B  7AC24F5EAF17F0A0754D5834BC3CC3A90ABD7B2A52C222ABC89B  72C24A52B550B3B8624D4F22F86BD2B30ABD642C498122A1D29B  73CC5457BF17E7A4750C5423B178D0A44FFF756355C03CABC28A  74CC0155B443B3A8795F4224AA7E97B507F2632606CF3FA0D59B   It is assumed that each line is a different message encrypted with the same pad.  I have tried countless lengths of words that are supposed to lead me somewhere to the decryption of this cipher, however isn't it just downright impossible to "guess" your way to the answer?  Crib dragging does not seem to work since there seem to be too many possibilities…
28259
In this article , specifically in the section 4.1 of the initialization phase,the following cryptographic hash functions have been chosen: \begin{align} h_1&amp;:   \mathbb G\to\mathbb Z_q^*\\ h_2&amp;:  \{0,1\}^*\times\{0,1\}^*\times\mathbb G\to\mathbb Z_q^*\\ h_3&amp;:  \{0,1\}^*\to\mathbb Z_q^* \end{align} where G is an additive group with order q. Can anyone explain to me what's the meaning of their notations and how to use them for example in SHA algortihm? Or maybe give me a simple example with real inputs?
48928
Is it possible to have an output consisting purely of one character and does this change the entropy of that output? (If that's even possible to ascertain.)  As an example, the Bitcoin cryptocurrency is slowly and inadvertently compiling a list of inputs which produce outputs with successively larger numbers of trailing zeros in its blockchain. Will these ever be used to study the SHA-256 algorithm?
55004
If part of the password is a whole regular English word, does the entropy of that part depend on the number of English words in existence, the number of English words known by the choosing algorithm, the number of English words assumed by the attacker?  Does the language matter, is the average entropy per word in German, French, Italian, or Spanish significantly different from the average entropy in English?  Does a numeric digit always have an entropy of $\log_2(10) = 3.321928$?
4208
I was just looking at some , specifically at Hash_DRBG. I read briefly through the algorithm, and even though it is not overly complex, it still seems unnecessary to me. I asked myself how I would implement a (cryptographically secure) PRNG on top of a Hash algorithm (SHA256 or SHA512), what came up is:  Idea one:    Obviously this can only provide half the "strength" of the hash  Initialization: state = hash(seed); Iteration: output = first_half_of(state); state = hash(state); Reseeding: state = hash(state || new_seed)   Idea Two:  Maybe with a separate counter  Initialization: state = hash(seed); Iteration: output = hash(state); ++state; Reseeding: state = hash(state || new_seed)   Now, these two "schemes" seem safe to me, I'm a complete crypto noob though. The point is that I don't think that I'm the first one to think of these very basic PRNGs, and I'd like to understand the reason for NIST not to choose something similar in their recommendations. Do these PRNGs have some (obvious?) weaknesses? (If not, is there something known about after how many iterations they should be reseeded?)
17859
Is there a known pair of distinct bit strings (A,B) such that SHA-1(A) == SHA-1(B)?  If the answer is no, then how can SHA-1 be considered broken?
83434
I recently discovered this method for generating a 9 character password from the linux prompt in bash:  &lt; /dev/urandom tr -dc A-Za-z0-9_ | head -c9   What is &lt; doing?
69664
is there some generally available algorithm which will encrypt a short string and generate two unique keys so that any of the two can be used to decrypt the message again? It doesn't has to be "super secure".
58018
I am not quite understanding the difference between /dev/random and /dev/urandom on Linux systems.  What does it mean to run out of “entropy” and how does the system get more?  What does it mean when people say /dev/random “blocks” if there isn’t enough entropy?  Which one should I use for what scenarios?
107323
So I recently discovered the --s2k mode in gpg.  Sadly it is not very well-documented. I mean, what is s2k even supposed to mean?  Could someone explain to me the purpose and detailed function of s2k?    Is --s2k-cipher-algo even necessary in a symmetric encryption scenario where you define the cipher separately?  What exactly  does --s2k-count do?  What does the number after --s2k-count do? What does it indicate and why is 65 million the highest number? 65 million of what? What is done so many times?
63578
I'm trying to understand the difference between the following and what they actually mean :   Known plaintext attack Known ciphertext attack Chosen ciphertext attack Chosen plaintext attack   Any clarification is much appreciated…
117907
Got an apache log entry that looks like this, actually I have a bunch of them spread out over time.  XXX.XXX.XXX.XXX - - [27/Apr/2012:14:39:52 -0500] "-" 408 - "-" "-"   It wasn't a GET or POST, the method was "-".   Anyone else seen requests like this?  It wasn't from the penetration tester, but I have it from LOTS of other IPs from Apr of 2012 up until and including today.  We failed it with a 408, just wondering what someone might be trying and googling for minus sign does NOT work.
109777
This question came from  and from  where it's noted that "integers have a finite count of digits", so that the "number" in the title is not at all a number (not integer nor rational or real) . This statement seems to me justified because I suspect that if we admit an infinite count of digits we build a set of "numbers" that is not countable (but I've not a proof). I'm wrong?    Reading comments and answers I'm a bit confused. So I add a more specific question: Is the string in the title a number in some model of Peano Axioms?
84474
I've come across a bunch of "strange" hash function notations, such as the following ones and now I don't know how to choose / instantiate them.  Can you please explain me what this notation means and how I can actually instantiate such a hash function?  The notation in question: $$H_1:\mathcal M \rightarrow \mathbb F_p$$ $$H_2:\mathcal M \rightarrow \mathbb Z_n^*$$ $$H_3:\mathcal M \rightarrow \{0,1\}^l$$ $$H_4:\mathcal M_1\times ...\times \mathcal M_k\rightarrow \mathcal S$$  where $\mathcal M\in\{\mathbb F_p,\mathbb Z_n^*,\{0,1\}^*,\mathbb G,...\}$ where $\mathbb G$ is a generic (but there instantiated) group and $\mathcal S\in\{\mathbb F_p,\mathbb Z_n^*,\{0,1\}^l\}$