# Tagged Questions

A cryptographic hash algorithm is a function which takes a variable size input and produces a fixed size output. The algorithm makes it difficult to predict the output for a given input, find two inputs with the same output, or reconstruct the input from the output.

26 views

### How have MD5 constants been determined?

For instance, the per round shift amounts, ...
57 views

### SHA-256 “almost unique”?

I have seen numerous references on the internet of people describing SHA-256 as generating an "almost unique" hash. Exhibit A. there are more. Is there some mathematical basis to the almost ...
23 views

### Is a timing side channel attack effective when the leaked information is related to the result of a hash?

I'm writing a function to act as a cryptographic hash of a number within a range that returns another number of the same range. The catch is that the result needs to have certain properties. I run a ...
387 views

### Can an encryption method be used as a hash function?

As I understand, there are a few requirements for a good hash function. Hard to find any message from a given hash Hard to find any 2 messages which give the same hash A single bit change in the ...
239 views

### Quantum on hash

Perhaps this has been answered before. Grover's algorithm should result in a 256 bit hash being complexity 128 bits to crack. I was wondering, what if you had a 512 bit hash , and xor'd the lower 256 ...
52 views

### Elliptical curve cryptography Determine if a public key point y is negative or positive, odd or even?

Take a Elliptical curve cryptography public key (x, y) and its additive inverse (x, -y). How do you identify which is the positive point and which is the negative point? Example Private key 1 -> (x, ...
25 views

### Range-Bounded Commitment fails when implemented? [migrated]

For part of my thesis I must implement (in Java) a Chan, Frankel, Tsiounis range-bounded commitment protocol as quoted in Boudot's paper Efficient Proofs that a Committed Number Lies in an Interval ...
66 views

### If I compute the SHA-1 of all possible 40 digits hexadecimal strings, will I get all possible sha1 hashes? [duplicate]

Wikipedia says sha1 produces a 160-bit (20-byte) hash value. So if I compute the SHA-1 of all possible SHA-1 values, which as far as I understand is at current time impossible both to calculate and ...
29 views

### Secure and unlinkable identifiers

Let's say we have Alice and Bob sharing a symmetric key $k$. Alice wants to leave a number of messages for Bob on an untrusted server (honest-but-curious model) that is also used by many other people ...
60 views

### Bobcat hash, trying to find a 48-bit hash collision for x

I am trying to find a collision with the Bobcat hash of the 48-bit hash. I am a beginner coder so please point out any flaws in my modification of the bobcat program. It does find a truncated 12-bit ...
91 views

### Encrypt a message with hash function, shared symmetric key, but no cipher

I am very new to Crypto and need some clarification or input. The question is: Suppose that Alice wants to encrypt a message for Bob, where the message consists of three plaintext blocks, $P_0$, ...
79 views

### How does DSA provide non-repudiation in proving a document was properly displayed (not altered or displayed incorrectly)?

I am building an iOS app that allows the user to sign a document served to them by a web server. So that page of the app simply has a document in the top pane, and at the bottom pane, a place to sign ...
84 views

### Are shorter password hashes safe?

How much can I shorten a password hash before it begins to impact security? Suppose that I use PBKDF2 (correctly salted) with HMAC-SHA256 as the PRF. From what I've seen, it's typical to use 256 ...
76 views

### Would it matter if my miner was hashing random vs incremental values?

I'm working on my miner for my "game" site that's basically a pre-image attack from a hash posted online. You submit a hash input, it's hashed, and your score is the hamming distance (the number of ...
81 views

### Cryptographically linkable random tokens

Are there any algorithms/protocols that let you produce a specific length of random tokens/bits in such a way that you can cryptographically determine which 2 or more tokens/bitstrings where produced ...
31 views

### If I know the hash function that produced a hash key, how easily can I generate an input to hash to the same key? [duplicate]

The title is pretty descriptive of my question. As an example, say I use the MD5 hash function to create a hash key of the word "hello": 5d41402abc4b2a76b9719d911017c592. There are two questions I ...
124 views

### Why can't we use a hash with no collision to compress data reliably?

According to wikipedia, a hash maps digital data of arbitrary size to digital data of fixed size. For all practical measures, a hash is a unique signature of a big chunk of data. But there is such a ...
68 views

### Is there a way to slow down collision attacks using iteration?

The simple way to iterate a hash function $H(H(m))$ only makes brute force preimage finding slower, but leaves collision attacks as fast since a collision in the inner hash function is a collision in ...
229 views

### When is the Random Oracle model (not) necessary?

Hash functions are often used in cryptographic schemes and protocols, and that doesn't necessarily mean that their proofs are on the Random Oracle model. That leads to the following question: What is ...
56 views

### Hiding identifying data while allowing matching?

I do research with people about their illegal drug use, and for one project I'm doing surveys with them when they visit a needle exchange. So over time the same people get repeatedly surveyed as they ...
27 views

### Is it bad practice to use the message digest of the plaintext as the initialization vector? [duplicate]

Data is being encrypted in a database. A message digest is being created for deduplication purposes. Is it ok to use the message digest that will be the key of the table that houses the encrypted ...
56 views

### 1024 RSA Hash Signature attack. Forge a valid signature

I have an RSA signature of 1024 bit where i know the following: Public modulus N Public exponent (0x03) Cypher message Summary: An MD5 hash is calculated from a collection of byte and is used as ...
72 views

### Crypto-period for keys used in PRF

I am wondering about the crypto-period for keys used in pseudo-random functions. For example, let's say I am using HMAC-SHA256 with a secret key $K$. After how many computes do I have to update $K$? ...
52 views

### What is tiger192,4 in PHP?

PHP supports hashing of the following Tiger algorithms: tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 Wikipedia's entry on Tiger says there's Tiger and Tiger2 and provides ...
145 views

### What are the strenghts and weaknesses of Whirlpool Hashing Algorithm

I want to find out if the Whirlpool hashing algorithm have any weaknesses. There are quite a bit of articles explaining the strengths of this algorithm, but for some reason I cannot find any on its ...
42 views

### Using Skein as PRNG

I have read that the Skein hash can be used for quite a few different functions, including a PRNG. Would using the 1024 Skein hash to return 16KB of data be appropriate for a PRNG? Or would it only be ...
42 views

### Can a block cipher encrypt the message to itself (plaintext equal to ciphertext) [duplicate]

The result of the cipher should be indistinguishable from random, but can it happen that cipher produces the ciphertext that is equal to the plaintext as it also lies in the corresponding space? I ...
572 views

### Are there ANY text strings that will generate the same SHA-512 Hash output? [duplicate]

Are there ANY text strings that will generate the same SHA-512 Hash output? Please provide an example, and how you came to that conclusion. I've tried thousands of variations, including ".." vs. "." ...
70 views

### A periodic PRNG based on hash function?

I need a PRNG which provides 128 bytes numbers. Let's say that given a symmetric key $K$ and an internal state $s$ I use the PRF HMAC-SHA512 this way: The output is PRNG($K, s$) = ...
217 views

### Can iterated hashing be used to mitigate collision and preimage weaknesses?

How much security does double hashing add regarding collisions and preimages? Is it helpful to iterate a hash function even more times than two? For example, can MD5 be fixed (in practice) by ...
127 views

### What was the NSA's reasoning for making their bitwise combination functions in SHA-1 the way they did?

I know that these functions are there to actually make the program work. What I want to know is why they made the functions one way but not another. For example, why did they pick F1(B, C, D) = (B ...
74 views

### Possible to determine equivalence of hash codes from different hashing functions?

Let $H_{1}(x)$, $H_{2}(x)$, ..., $H_{n}(x)$ be a list of $n$ secure one-way hash functions such that for a given input $x$ each $H_{i}(x) \neq H_{j}(x)$ when $i \neq j$. Give one hash function to ...
77 views

### Combine two sha512 hashes to a single hash

Assume I have two data fragments: $Frag_1$ and $Frag_2$. I can build sha512 hashes the usual way with $SHA512(Frag_1)$ and $SHA512(Frag_2)$ and then hash the two fragments appended to each other: ...
55 views

### How to formally prove that a given hash construction is collision resistant or not?

Is there a precise procedure or strategy to follow in order to prove in a formal way the (not) collision-resistance of a certain given hash construction? I.e. let $H_1$ and $H_2$ be two hash ...
61 views

### How does the small n attack work?

I'm studying the Lamport's Hash one-time password scheme. This is the scheme: Alice wants to authenticate herself to Bob from a workstation that knows nothing about her. Alice only knows her ...
66 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?
48 views

### Given just the hash of a file, can I verify that the file contains a specific data block?

Imagine I only have the hash of a file which we can call hash(file). Then a user sends me a data block (or section) of the same file, which we can call ...
112 views

### Example describing Baek and Zheng’s threshold identity-based decryption scheme

I am trying to work through an example of Baek and Zheng’s “threshold identity-based decryption scheme” and I tried a lot to solve this, but somewhere I’m doing something wrong. I hope someone can ...
50 views

### Same 64-bit preimage resistance security for SipHash and SHA-512/64?

If I have to chose a 64 bit preimage resistant hash function; will there be any difference in security between SipHash and SHA-512/64 (SHA-512 truncated to 64 bits)? How long will it take an ...
114 views

### How to hash similar strings to the same hash value?

Suppose that $s_1$ and $s_2$ are two stings that have a small hamming distance. Is there a preimage resistant "hash" function ($H$) that can map them to the same value i.e., $H(s_1) = H(s_2)$?
187 views

### Is SHA-1 safe for signing ECDHE parameters?

Is using the SHA-1 algorithm insecure for hashing the ephemeral ECDH public key in the signed_params structure? There are some worrying articles about using SHA-1: ...
35 views

### Is hashing data with dynamic keys still worth effort?

some years ago it took long time to "decrypt" hashes because they took slow cpu to brute force. Nowadays they use graphic cards for stuff like this and can do this most time in less than 20 Minutes ...
91 views

### How can I compare two hash algorithms?

In studying the algorithms of cryptographic hash functions, I have tried out a few (educated) modifications to the code for academic purposes only. For example, I modified the algorithm by applying an ...
88 views

### Why would you use a weaker hash function than cipher strength?

Some cryptographic libraries (like “Bouncy Castle”) support many modes where the maximum number of bits which can be produced by the hash are significantly fewer than the cipher strength. For ...
100 views

### Formula for the number of expected collisions

Say we have a hash function that produces $n$ bit outputs. From the birthday problem that after around $\sqrt{2^n}$ different inputs to the has function, we can expect a collision. Say instead that ...
116 views

### Extension of a password hashing algorithm using Fibonacci

I am right now taking a class named Applied Cryptography and our final project is to create a password hashing method using at least one existing algorithm and then add additional steps to make it ...
33 views

### MDC-2 recommended IV values?

I'm currently reading Menezes' "Handbook of Applied Cryptography", and in it, when describing the MDC-2 cryptographic hash function, has the following line: Choose the 64-bit non-secret constants ...
25 views

### How to reconstruct hash value to the original format? [duplicate]

I would like to know how I can reconstruct a hash value such as 558f68181d2b0c9d57d41ce7aa36b71d9 to its original format (734). I have used a code in matlab, which provided me with an hash output, ...