# Tag Info

## Hot answers tagged hash

11

The echo command appends a new line at the end, by default. The -n option omits this character. Compare these two executions: > echo -n "test123" | md5sum cc03e747a6afbbcbf8be7668acfebee5 > echo "test123" | md5sum 4a251a2ef9bbf4ccc35f97aba2c9cbda So the difference between the hash values is simply caused by the new line character.

4

Collision and preimage resistance does not imply this; suppose we select a collision and preimage resistant function $H$ with a known value $I$ with $H(I) = 1$ (the group identity); this additional assertion does not contradict the assumptions of collision or preimage resistance. Then, given $a$, we can easily output the tuple $(I, a)$; as we have $H(I) ... 4 Encrypt the hash using the public key of the avatar server with ECC. This has a space overhead of 32 bytes (43 Base64 characters). A modern CPU should be able to decrypt about 10000 messages per second per core. If a website uses a fixed key for all the avatars both sides can cache the shared key, so they don't have to pay the cost of the key exchange all ... 4 Not as secure as a one time pad. A key concept with one time pads is that no part of them is ever reused. It is a common pitfall of people attempting to implement cryptography to assume that an obscure relationship is necessarily a secure one: it is not. You are create a chain of SHA hashes that can be observed, and potentially decoded. Therefore what you ... 3 This partial answer establishes (rather trivial) lower and upper bounds for the asymptotic hardness of the problem, assuming$h$behaves like an$n$-bit wide random function. If one hashes$m$messages$M$, then computes$f(i,j,k)=h(M_i)\oplus h(M_j)\oplus h(M_k)$for$(i,j,k)\in\mathbb {Z_m}^3$, that's$m^3$results, with most values duplicated at least 6 ... 2 Well, the GCM tag can be rearranged as$Tag = (Len(C, A) \times H) \oplus \textit{Other Stuff}$; if the length of your ciphertext (and additional authentication data) is consistent, you could precompute$Len(C, A) \times H$, and xor that in along with everything else in the final step. One note: the (add/multiply) that you do in cycle 6 has the side effect ... 2 It is wanted a partial collision (over$b=32$bits) between hashes of strings starting in distinct strings 1 and 2. I won't directly answer homework, but my hints outgrew a comment. The solution presented should work, though details allowing to output the colliding strings are left out, and there are inefficiencies. Towards guiding optimization, I suggest ... 2 Even in a perfect world (the random oracle model) there's no way to ensure first-preimage and second-preimage resistane of more than$2^n$and collision resistance of more than$2^{n/2}$. (Wie$n$bytes as the output size of the hash function.) That's the maximum you will ever be able to archive. Cutting off some bytes of the output of a secure hash ... 1 The fundamental difference between hash and encryption techniques is that hash is irreversible while encryption is reversible. Hash algorithms generate a digest of fixed length output cipher text for a given input plain text. The output text cannot be converted back to input text. The generated output will always be same for a given input plain text that ... 1 My previous answer was wrong because I misunderstood the exact model Gravatar worked under. This issue can be solved through public key crypto, for example Curve25519. Your gravatar service would have a public key available. Then, when a site wants to serve the gravatar of an user Alice with email alice@test.com they will generate the an URL containing$M\$ ...

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