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
43 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 ...
8
votes
4answers
770 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?
1
vote
1answer
40 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
36 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 ...
1
vote
1answer
89 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 ...
2
votes
1answer
55 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
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())...
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, ...
1
vote
2answers
60 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 ...
0
votes
1answer
61 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 ...
0
votes
1answer
67 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
0answers
51 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 ...
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
0answers
21 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 ...
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 ...
10
votes
1answer
169 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 ...
0
votes
2answers
63 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
61 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 ...
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
63 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$. ...
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 ...
0
votes
1answer
92 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 ...
0
votes
0answers
76 views

Finding colliding messages for AES decryption

I'm doing a school problem where I'm supposed to find a colliding message in a hashing algorithm that is weak-collision resistant. The hashing algorithm is AES with a key & message size of 128. ...
1
vote
0answers
75 views

Is it possible to apply a pseudo-random permutation (a keyed permutation) to construct a sponge function?

The description of the sponge function on Crypto.Stackexchange contains the following text (source): The cryptographic sponge is a construction scheme for hash functions (and other symmetric ...
-2
votes
4answers
101 views

Size of A Hashed String Using SHA-512

When hashing a messages of size of n, does the SHA2 algorithm always produce the same sized hashed value? The reason I am asking is that I am building an OAuth 2.0 ...
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 ...
5
votes
1answer
2k views

Do hash functions need to “look random”?

I've noticed that looking random is not often listed as a requirement for a good hash function in the same way that preimage or collision resistance is. Do we need hash functions to look random? ...
0
votes
0answers
26 views

SOTA updates in combination with a Trusted Platform Module

I am quite new to cryptography and security related stuff. We are working on a new project with Embedded Linux on the BeagleBone Black. We wish to implement a full root of trust during boot up using ...
3
votes
2answers
76 views

Finding Nonlinear boolean functions

Let $\mathbb{F}_2=\{0,1\}$ be the field with two elements. I wonder if there is any known algorithm/construction that, given any $n\geq 1$, returns a boolean function $f:\mathbb{F}^n_2\rightarrow \...
0
votes
0answers
30 views

Hash collision using limited binary space (characters) does it change the probability?

Given a hash function (lets suppose 128bit output), there exists some collisions, at least if the input length is greater than the output. Provided also that the hash function is meant to operate in ...
5
votes
1answer
806 views

What is the probability to produce a collision under two different hash functions?

Given 2 (weak) hash functions, namely MD5 and SHA1 The fact that there exists 2 different inputs that will result in the same output under both hashing functions is explained in "Can there be two ...
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....
1
vote
1answer
61 views

Is forward search attack is the same as dictionary attack?

Currently, I started to learn about secure passwords in password file. The password file contains the hashed values for passwords. I know that the forward search attack for a password that if an ...
2
votes
2answers
55 views

Difficulty of finding collisions for two different CRHF

Suppose that $\mathcal{H}$ is a family of collision resistant hash functions. Given $h$, which was chosen uniformly at random from $\mathcal{H}$, it is infeasible for a polynomial-time adversary to ...
1
vote
2answers
63 views

Is murmur3 (128) a good hash function to use as a proof (hash) of a document in a smart contract?

I want to store document hashes in a smart contract as a prove of a document (eg pdf contract - could be large, dozones of MB) related to a blockchain transaction. Is murmur3 128 hash functions a ...
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 ...
48
votes
11answers
14k views

How do hashes really ensure uniqueness?

This might seem an impractical and unnecessary conversation, but I feel it's something I need to clarify. Especially, as I just got my first developer job in a blockchain startup. So hashes are said ...
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
58 views

Could we use a more efficient hash for signature generation?

Is it possible to use a more efficient hash - such as one based on GHASH - instead of a cryptographic hash for signature generation? In other words, could a combination of a fast hash and the private ...
0
votes
1answer
50 views

Does hashing an encrypted message suffer from any drawbacks?

I am working on this problem where the set up is like this: There are three hosts: A, B and C. A wants to send a message to C which passes through B. At A the message is hashed, the hash is padded to ...
0
votes
1answer
78 views

Newbie question: one-way functions in cryptography

I'm reading this article on the basics of cryptography and it says that the main principle is about taking such an algorithm that knowing the end result and the algorithm, an eavesdropper wouldn't be ...
2
votes
0answers
56 views

How to derive a hash function from another hash function?

Problem: I'm trying to figure out how to solve this, apparently it's hashing the hash value itself. So G has two rounds of hashing the original message x. I tried searching for the relationship ...
1
vote
0answers
62 views

What lightweight cryptographic hash function for short input could I use for HMAC?

I am looking for a cryptographic hash function that I can configure for HMAC. The input that I will hash is around 50 bytes. The function must be fast, and computationally lightweight.
1
vote
1answer
43 views

Instead of sending a set of random values, send a key for a PRF

Some Protocols require one party to send $n$ random challenges (or random values) to another party. For communication efficiency purpose, one can pick a random key for a pseudorandom function, and ...
3
votes
2answers
82 views

KDF Salt: How/When is it Okay for it to be public?

Post Structure: Prior source material studied Question & Details Assumed threat model Example Assumptions Clarifications Prior source material studied 0.1. RFC 2898 0.2. HAC (Handbook of ...