Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [hash]

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 find two inputs with the same output or reconstruct the input from the output.

0
votes
0answers
16 views

DSA signature creation using hash oh the message

I am trying to understand how i can create DSA signature. the arithmetic uses H(M) and it is given a random nunber for the hashing result.( written- lets assume it is 121). Is the number really random ...
-1
votes
0answers
32 views

Do exist a one-way function that have 2 Condition?

Can anyone help me to prove this theorem that i can't prove it in a book that i bought it recently. If exist one-way function or OWF function: 1-exist a one way function ( withhas name $f$) such that ...
2
votes
1answer
38 views

GMAC vs HMAC in message forgery and bandwidth

Saarinen in his work GCM, GHASH and Weak Keys says that; The GHASH algorithm belongs to a widely studied class of Wegman-Carter polynomial universal hashes. The security bounds known (this and ...
0
votes
3answers
74 views

Difference between hash function

In some paper, the terms "cryptographic hash function" and "deterministic hash function" would appear? I'm wondering what's their difference, and are there some other types of hash functions? Like the ...
4
votes
2answers
750 views

Why is $h(H, m) = E(m, H) \oplus m$ insecure?

I am taking a cryptography class on Coursera. I learned that the compression function $h(H, m) = E_m(H) \oplus m$ is insecure (even though other variants like Davies­-Meyer or Miyaguchi-Preneel are ...
0
votes
0answers
38 views

Composition of compressing hash functions

I'm trying to solve the following problem: given 2 CRHF $H_1:2^{4n}\rightarrow2^{2n}$, $H_2:2^{2n}\rightarrow 2^n$ I construct the following hash function $H^{*}=H_2(H_1(x))$ compressing from $2^{4n}\...
0
votes
1answer
31 views

What pieces of information do you need to unhash a key to find out the original message?

I am very new to the hashing world and despite hours of research (AKA Googling) I still don't understand this piece of information. What are the different pieces of information that are needed in ...
0
votes
1answer
74 views

Computational Complexity of SHA-3 (SHAKE128)

Please, I got the question "what is the computational complexity of SHA-3 (SHAKE128)"? What does that mean and how can I calculate that?? *I am using SHA-3 (SHAKE128) in my mechanism to hash fix ...
9
votes
2answers
1k views

How reassuring is 64-bit (in)security?

In Feb 2017, CWI and Google announced SHAttered hash collision attack on SHA1, which took $2^{63.1}$ work estimated 6500 CPU years, to achieve. Therefore, 64-bit should be considered now an insecurity....
8
votes
4answers
856 views

Why is SHA-512 limited to an input of $2^{128}$ bits?

Both SHA-384 and SHA-512 are limited to an input size of less than $2^{128}$ bits. Considering SHA-512 has a higher output size, couldn't it include more input data?
2
votes
1answer
57 views

Calculate new hash from old hash + appended string

If I have a hash of some string in the form: hash(UNK + "known"), Is there a way to calculate the hash of (UNK + "known" + "append"), given the hash of the original value? Specifically I'm asking ...
0
votes
1answer
43 views

Use partial hash to verify entire hash

I've had an idea about storing parts of SHA256 hashes and I'd like to find out how secure it is, or how much less secure it is than storing the entire hash. For example, users can share this list of ...
0
votes
1answer
70 views

Is the hash function $h(x\|y) = AES_x( y)$ collision resistant?

If $x$ and $y$ are both 128-bit strings would the function $h(x||y) = AES_x(y)$, where $x\|y$ means concatenation, be considered collision resistant ? Is there an easy way to find $(x_1, y_1)$ and $(...
1
vote
1answer
92 views

Given a particular $1600$-bit output $Y$, is it feasible to find a $1600$-bit input $X$ such that $\text{Keccak-}f[1600](X) = Y$?

I have read this answer on Crypto.SE and I want to clarify a few details. Does this property of $\text{Keccak-}f[1600](x)$ imply that if we know a particular $1600$-bit output $Y$, it is feasible ...
0
votes
1answer
41 views

Hash Collision Probabilities

Please give help! how can I calculate the probability of collision? I need a mathematical equation for my studying. Assume, I am using SHA256 to hash 100-bits. Thus: SHA256 {100} = 256-bits (hash ...
4
votes
1answer
100 views

Is there any way to check hash of homomorphic encrypted data?

I need some algorithm that satisfies: H - hash function Enc - encryption function (using public key) M - secret data $Enc(H(M)) = H(Enc(M))$ Let this system exist: the First person has a secret ...
25
votes
5answers
7k views

Other than password hashes, are there other uses for non-reversible crypto

Hashing is useful for checking that an input matches expectations without giving away the stored expected version - so confirming passwords etc. But are there other use cases? In general, ...
14
votes
1answer
3k views

What is a ratchet?

while reading Whatsapp's Security Whitepaper I found the term "ratchet". What does it mean in cryptography? The Message Key is derived from a sender’s Chain Key that “ratchets” forward with every ...
23
votes
3answers
3k views

Are common cryptographic hashes bijective when hashing a single block of the same size as the output?

It's been said that CRC-64 is bijective for a 64-bit block. It the corresponding statement true for typical cryptographic hashes, like MD5, SHA-1, SHA-2 or SHA-3? For example, would SHA-512 be ...
0
votes
0answers
40 views

Prove that $F(x)=f(h(x))$ is a secure PRF if $f$ is a secure PRF and $h$ is a CRHF

From my lecture notes, it says that if we have some PRF $f = \{f_k: \{0,1\}^{n} \rightarrow \{0,1\}^{n}\}$ and CRHF $h = \{h_t: \{0,1\}^{2n} \rightarrow \{0,1\}^{n}\}$, then $F = \{F_{k,t} = f_k(h_t())...
1
vote
2answers
61 views

Using a hash of data instead of the full raw data for authenticated data in AES-GCM

I am serialising JSON objects, and would like to encrypt some of the values. I plan to do this with AES-GCM. I would also like to ensure the integrity of the overall object. The requirements are ...
-1
votes
0answers
34 views

Extending hash functions from fixed length to variable length Messages [duplicate]

We know that if we have hash function $h:\{0,1\}^{2n}\to \{0,1\}^n$, we can construct hash function $H:\{0,1\}^{*}\to \{0,1\}^n$ with the following construction: Formally, for $s \geq 1$ and a ...
-2
votes
1answer
65 views

Is it possible to convert the output of sha256 hash to binary or decimal value? [closed]

Can the output value of the sha256 hash function be converted to binary or decimal number? I know that the output is a set of 256bits. Is it possible to convert the output data to an unique ...
14
votes
1answer
3k views

What are the consequences of removing a single byte from a sha256 hash?

I'm working on a system (Ethereum) where it is significantly cheaper to store 32 bytes than 33 bytes. I'd like to create a table where data is stored based on its hash. Sha256 would meet this ...
1
vote
1answer
73 views

Does the One-Time Hash-based Signature Scheme render Ring Signatures useless?

On the Bitcoin community, to maintain privacy, they recommend using one-time spend addresses. CryptoNote, Monero et al. prefer Ring Signatures to maintain that privacy. There are some issues regarding ...
0
votes
1answer
62 views

Finding the Input if Hash Value, Hash Function, and Key are known

Let's assume that we have a hash value $h$ is calculated by using HMAC-SHA256. We have the key $k$. We also know some information about the input: It contains a pattern like 15 numbers where first ...
4
votes
1answer
2k views

Pre-image attack on MD5 hash

I read somewhere MD5 is broken in terms of collision, but I am wondering if it is broken in terms of pre-image resistance? Given a hash of Md5, is it possible to find the original message of it? If ...
1
vote
0answers
52 views

Extendable hash collision resistance of multiplication

I have a hash function $HashSet(A) = H(a_1) *\cdots * H(a_n)$, where $A = \{a_1,\ldots,a_n\}$ and $H$ is a hash function which generates values of $b$ bits (and $H$ has no collision attack that ...
46
votes
2answers
13k views

Is truncating a SHA512 hash to the first 160 bits as secure as using SHA1?

I am from a web development background (I don't know an awful lot about cryptography or how the algorithms themselves work), so I am asking this question in simple terms. Consider a hash of the word '...
1
vote
1answer
43 views

A hash function for sets that from a hash of a set and a subset of it doesn't reveal the hash of the remaining elements in the set

I'm looking for a function to compute a hash of a set. It needs to satisfy two properties: If someone published a hash hs of a set ...
6
votes
1answer
2k views

Why are the Davies-Meyer and Miyaguchi-Preneel constructions secure?

The Davies-Meyer compression function $h(H, m) = E_m(H) \oplus H$ is said to be secure. So too is the Miyaguchi-Preneel compression function $h(H, m) = E_m(H) \oplus m \oplus H$. Why are these ...
0
votes
0answers
22 views

Client puzzle protocol implementation or how we can implement puzzle with HMAC functionality?

I'm learning about client puzzles for DoS (Denial of Services) Protection, and I came across this question. Client puzzle protocol implementation, how we can implement puzzle with HMAC functionality? ...
6
votes
6answers
11k views

Can a large file be hashed down to 32 bytes, and then reconstructed from the hash? [duplicate]

We can hash a file or data using multihash or SHA-256, but can we retrieve the original data or file from the hash? Are there any methods to retrieve the original file or data from a hash of it ...
2
votes
3answers
138 views

Hashing items of different Bytes but same length would enable a timing attack?

I am following this paper which comes highly recommended as a secure Registration/Login system over TLS which uses client side computation for the Password Processing Function (PPF). What my main ...
1
vote
3answers
95 views

Collusion resistant computing of same function by two servers

Is there a secure way of computing same hash function of replicated data by two servers. I mean that both servers host the same version of replicated data and they should output h(M) without colluding,...
15
votes
2answers
421 views

Is there a standardized tree hash?

SHA-1, SHA-2, and the standardized version of SHA-3 are all sequential. This is impractical for hashing very large files distributed across machines. Any sequential hash can be straightforwardly ...
10
votes
1answer
171 views

Why was Davies–Meyer chosen over Miyaguchi–Preneel most of the time?

The only Miyaguchi–Preneel MD hash I know is Whirlpool. I suppose there are likely others. Why do most MD hashes choose Davies–Meyer? If anything, Davies–Meyer relies on related-key resistance while ...
2
votes
1answer
46 views

How to encrypt sensitive files in a business application? Is it needed?

I'm currently working on a business Java application, and we store sensitive files related to our users. What is the appropriate approach to store them securely? Is it viable to encrypt/decrypt all ...
3
votes
1answer
34 views

For a hash over a finite space without size reduction, is a public permutation sufficient?

Suppose the application is a Lamport signature scheme. Is the following a secure hash $\{0,1\}^n \rightarrow \{0,1\}^n$? $$ H(x) = x \oplus P(x) $$ where $P$ is a public permutation that permutes an ...
0
votes
2answers
60 views

Can someone explain to me the concept of hashing versus the concept of encryption? [duplicate]

I'm a bit confused over the difference between hashing and encryption. Could someone help explain this to me in simple and concise, yet comprehensive layman's terms? I'm not asking for any specifics ...
12
votes
3answers
1k views

Fast hashing into elliptic curve

Is there a fast algorithm for mapping $n$-bit numbers $s$ (for fixed $n$) into a cyclic subgroup of an elliptic curve (over a finite field) in which the Discrete Logarithm Problem is hard? By fast, I ...
0
votes
2answers
64 views

Where is the password hash calculated, locally on or the server?

My computer security professor uses the following notation, where S denotes a server and A denoted Alice. Alice wants to authenticate herself to the server. The hash function is a hash chain where $h^...
0
votes
1answer
63 views

Hash using AES and key 0

Consider the following hash function for a message x = x1||x2|| · · · ||xn: h(x) = Mn i=1 AES0(xi) = AES0(x1) ⊕ AES0(x2) ⊕ · · · ⊕ AES0(xn) where the key used in AES is k = 0. Can someone explain what ...
-2
votes
1answer
657 views

MD5 proving collision for the famous hexadecimal blocks

Below shows the hexadecimal pair which collides in MD5 (http://www.mscs.dal.ca/~selinger/md5collision/): d131dd02c5e6eec4693d9a0698aff95c 2fcab58712467eab4004583eb8fb7f89 ...
0
votes
2answers
84 views

Blockchain cryptography

I'm a high school student doing a project about blockchain. I'm trying to figure out why hashing algorithms are crucial for the existence of blockchain and other types of cryptography wouldn't work. ...
0
votes
1answer
65 views

Show that if a fixed key MAC is not collision resistant then the MAC function is not computation resistant for every key K

I'm really having some trouble with this one. Let $H$ be a MAC function. For every key $K$ we can create an unkeyed hash function (i.e.an MDC) by using $H$ to hash messages with the fixed key $K$. ...
0
votes
1answer
93 views

How might one create a system of election by lot (sortition) that is both secure and verifiable?

I've been puzzling recently over sortition, a democratic method of selection for public office which I find very fascinating. Basically, instead of choosing candidates like Hillary Clinton or Donald ...
4
votes
2answers
305 views

Proving/verifying keys for zero knowledge proof (zkSNARK) in a simple case (possession of a string whose hash is x)

I'm studying simple examples to understand how ZK-Snarks work. Following this great introduction, I'm trying to elaborate a generator function giving a prover and verifier keys: ...
1
vote
2answers
47 views

Why does WOTS+ need a checksum during signing operation?

I was reviewing WOTS+ scheme for consideration in our private blockchain, and noticed that it had a small overhead of calculating a checksum as seen in the following pseudocode excerpt from the ...
1
vote
1answer
81 views

How to find a collision with a given prefix and a known key in an AES ECB symmetric block cipher?

I should be able to find a collision for a vulnerable hash function which uses AES ECB given a prefix, but I am unable to find a reasonable solution (besides brute-force attack). The hash function is ...