# Tag Info

6

If we assume that the output of a SHA-256 hash is roughly random, this is ultimately just a combinatorics problem. That is: Given a random string of 64 hexadecimal digits, what is the probability that the sequence "20" appears 3 or more times. We can think of this as having three set items, the three "20"s, and then 58 other ...

6

The truncated versions of SHA2 are introduced in 2005 and in the Cryptographic hash Workshop, in 2005, Kelsey listed the reasons as; Interoperability and security reasons Need drop-in replacement for SHA1 (MD5) Have unbroken hashes of wrong size ECDSA/DSA key sizes File and protocol formats Though not mentioned by Kelsey or any other NIST document, the ...

5

If elements $R$ of $G$ can uniquely be expressed as a bitstring $\overline R$ (e.g. by taking the two components in a finite field of the affine coordinates of $R$, each uniquely representable as a fixed-size bitstring, and these are concatenated to form $\overline R$), then it is easy to construct a generic hash $H:\{0,1\}^* \times G \times \{0,1\}^* \to \... 4 Should I be worried about collisions? If these are RSA keys, yes, at least, if people find it in their interest to collide with someone else. It is entire practical to generate an RSA key where to top 400 bits of the modulus are some specified value. Since you use those 400 bits as your identifier, then that means the user can pick any identifier they want,... 4 This is an obscure and not peer-reviewed article of dubious quality (I'm being polite). It has far too many flaws to list here. It should be best left ignored. The author did not publish a reference implementation, and the software they used is most likely just a proof-of-concept, not usable in practice. 4 It's the pairing function. This bilinear map which takes as Input the set$\mathbb{G}\times\hat{\mathbb{G}}$(in the common case, eliptic curves), and output a group element in$\mathbb{G}_T$the group target. In the symmetric case (Type 1), because$e$is bilinear, you can deduce that $$e(g_1, g_n)^t= e(g, g)^{x_1x_nt}$$ with$x_1,x_n$respectively be the ... 3 SHA-512 may be faster (i.e. use fewer CPU cycles) than SHA-256 on 64 bit systems as it uses a word size of 64 bits rather than the 32 bit word size used for SHA-256. Because of this, it uses approximately a third fewer rounds per byte. Note that SHA-256 nowadays can be supported by Intel's SHA-extensions (which also may be implemented on AMD CPU's), which ... 3 If you want a "quick" way of determining how long it will take for bcrypt-n10, you can process by hand a very very VERY small subset of its calculation, then multiply that time by how many times the algorithm will use it. The round function is used many times, you can perform components just once to get a base time. There are operations on 32-bit ... 3 We typically model a hash function (in particular$\mathrm{SHA}$-$256$) as a function$H:\{0,1\}^{2^{64}-1} \to \{0,1\}^{256}$with some special properties that makes them useful in practice. Well, that definition is indeed rather particular to SHA-256. The output size is of course depending on the hash function, and e.g. SHA-3-256 has an infinite input ... 2 TL;DR: Odds of finding at least three times 20 in the expression as hexadecimal of a SHA-256 hash are below$1/545$, and above$3/1636$. Probability is$0.0018305\ldots$. We are making the assumption that SHA-256 is a Pseudo Random Function (which is believed true from a computational perspective) and is fed with an input chosen without making use of the ... 2 Based on how you said "at least 3 times", first note that there are$16^2=256$possible consecutive hex values. Let's find the probability that this happens at most 2 times and subtract from 1. Let$q=255/256$be the probability that$\sf 00$doesn't occur at some random point. So the probability this pattern$\sf 20$never occurs in a random ... 2 Knowing either$p$or$q$is sufficient to recover both of them (as$q = n/p$). So imagine we know all of$p, q$, and$n$. The chinese remainder theorem can be phrased many different ways. In general, it states that when working mod$n$(where$n$is a product of distinct primes [1]), you can instead work mod each prime separately. In this particular setting,... 2 If your secret material (you call this my secret so I'll use that name) is chosen with sufficient entropy, then yes this scheme is acceptable. my secret, however, must be in itself sufficiently hard to guess; it becomes effectively a password cracking problem. As such, I would suggest my secret be a randomly generated keyfile, or at least a really secure ... 2 There is demonstrably no general solution to this class of problems. Argument: we can construct the output as a Message Authentication Code (e.g. HMAC) of the other inputs, with a random secret fixed key; and what's asked is breaking the MAC. This class of problems is not modern academic cryptography, which assumes the algorithms are known, only the keys are ... 1 A sha-256 hash is 32 bytes. Each byte has a possibility of 256 different byte values. And I'm assuming when you indicate that "20 occurs", you mean it's in a byte position (ala 34 20 56...), and not straddling a pair of bytes as in 32 00 45... So if we can compute the totals combinations of that a particular byte value appears in 0 bytes, 1 bytes,... 1 Will this setup provide any real security if the logs are leaked? One issue is the fixed salt. With that, the translation of email to hash is fixed; that is, if the attacker sees two identical hashes, he knows that they were the same email address; he might not know what the email address is, but he knows that the two emails were to/from the same person. ... 1 If I understand your question correctly, I (the user) know the image s97dgfubYVd80fzhgdfufg0894rf was generated from the string 1234,2423,1231, but I should not be able to craft another valid parameter. On the server side, you need to turn the parameter back into 1234,2423,1231. You have two basic options (and likely more): with a database available on the ... 1 If we consider the keyed hash function with$\ell=256$keyspace than we can formalize as $$H(k,m): \{0,1\}^{\ell} \times \{0,1\}^{256} \to \{0,1\}^{256}$$ Now assume that$H\$ is a Cryptographically Secure keyed Hash function. That hash has pre-image, second pre-image, and collision resistance. The cryptographic strength of this hash functions is like the ...

Only top voted, non community-wiki answers of a minimum length are eligible