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.

Filter by
Sorted by
Tagged with
1 vote
0 answers
50 views

Is the security of output of Skein when using arbitrary output size similar to that of SHAKE?

Let's suppose I have a 1MB high-resolution photo and I want to hash and create a 1536-bits key. I know that I could just use SHAKE-256 as its a pre-enginered way for doing that. There is also Skein ...
phantomcraft's user avatar
2 votes
1 answer
136 views

What would be the expected performance of hashing a seed with counters and using its keystream compared to SHAKE-256?

Hashing a seed with SHAKE-256 and setting the output size to 1GiB it takes 6.5 seconds on my system: ...
phantomcraft's user avatar
5 votes
1 answer
644 views

How can a preimage attack on SHA-256 always succeed within 2^256 evaluations when done though brute force?

I was reading the Wikipedia page for SHA-256 (SHA-2) and came across the following statement: For a hash function for which $L$ is the number of bits in the message digest, finding a message that ...
Darcy Sutton's user avatar
3 votes
1 answer
143 views

Is SHAKE hash function seekable when using it as a stream cipher?

I searched a lot for this information in search engines as well as taking a look in the SHAKE reference implementation. If I decide to use SHAKE as a stream cipher, can I access a specific part of the ...
phantomcraft's user avatar
4 votes
3 answers
421 views

Is the sum of hashes a suitable hash for sets?

Let $H: X \rightarrow \{0, 1\}^b$ denote a cryptographically secure, $b$-bits hash function on a set $X$. Let $H^*: \mathbb{P}(X) \rightarrow \{0, 1\}^b$ be a function on the power set of $X$ defined ...
Matteo Monti's user avatar
  • 1,395
2 votes
1 answer
42 views

How to prove that a line belongs to a final hash without knowing/re-hashing all other lines?

Let's suppose : I have a record/database (D) of 754 lines and each line correspond to a SHA256 hash.(Hn) I hash all this record to a final and unique SHA256 hash like this : ...
JeremyDEX's user avatar
2 votes
1 answer
137 views

How to prove that two hashes correspond to the same original message, without using the message to verify?

Let's suppose this: Message is "I love crypto.stackexchange.com" (M) Bob creates hash H1 with the message M and his private key (Priv) Alice receives a message X, and hash H2 with message X ...
JeremyDEX's user avatar
1 vote
1 answer
59 views

Hashing a seed together with a block counter and using as a encipherment scheme: What scheme is more secure in practice?

This question is related to this (but it is not the same). Let's suppose I have a seed with an entropy of 1024-bits and hash it with a counter using a hash function with one-quarter of the seed size ...
phantomcraft's user avatar
5 votes
2 answers
202 views

Conditions on a cryptographic hash function for Randomness Extraction

Assume we want to transform semi-random $n$-bit inputs into shorter $k$-bit outputs computationally indistinguishable from uniformly random bit strings, and there is (in some sense, to be specified) ...
fgrieu's user avatar
  • 139k
1 vote
1 answer
212 views

Can I use a cryptographic hash function such as sha256 for Randomness Extraction [duplicate]

I want to transform a semi random input to a shorter, uniformly random bit string. Assuming there is enough entropy in the semi random input, can I use a collision resistant hash function to extract ...
ONUR EREN ARPACI's user avatar
1 vote
0 answers
124 views

Hash function collision resistance

I have a course work for university, and am not sure on my answer so if anyone could please take the time out to read the question and my answer to let me know if I'm going in the right direction that ...
hasin's user avatar
  • 77
1 vote
1 answer
104 views

Mod operation while verifying an ECDSA signature with SECT233R1

I'm trying to perform ECDSA verification in hardware. I'm using the SECT233R1 curve (NIST B-233). I have a question about the hash function used while doing so. I want to use the SHA256 hash function ...
thatbangaloreanguy's user avatar
1 vote
0 answers
159 views

AES-CBC collision resistance of hash function [closed]

I'm very new to cryptography and am having some issues with the following question ...
George's user avatar
  • 11
0 votes
1 answer
131 views

Using TEA to build a hash function

Background: TEA uses a 128 bit master key $K_{0\ldots3}$. All odd rounds use $K_0$, $K_1$ as the round subkey, and all even rounds use $K_2$, $K_3$. One cycle of TEA applied to the block $A_i$,$B_i$ ...
Confused about Curves's user avatar
3 votes
0 answers
134 views

Is WPA2 collision-proof?

I was experimenting with hashcat and aircrack to test WiFi security. The WiFi AP is a WPA2 encrypted network. The tool I used to ...
Kristi's user avatar
  • 31
2 votes
1 answer
222 views

Generic attack on Hmac sha256

Is there any generic attack on HMAC SHA 256 ? I am currently reading up on attacks on Hmac sha-256. However most of the papers I've found are about side channel attacks such as Differential power ...
Donnie's user avatar
  • 33
4 votes
2 answers
1k views

Password hashing and salting with SHA-256 on $2^{64}$ password space

If a password is randomly chosen from a space of $2^{64}$ passwords and is stored as an SHA-256-bit hash and a 128-bit salt, how many hashes does an attacker need to perform to recover the password in ...
CryptoGuru's user avatar
1 vote
0 answers
84 views

How many hashes to recover a salted password? [closed]

If a password p is selected from a space of 2^64 passwords, and the server stores this as a hash, h = SHA-256(p||s) where s is a random 128-bit salt. How many maximum hashes would an attacker need to ...
CryptoGuru's user avatar
0 votes
0 answers
34 views

How to factor $n = p.q$, where $p,q$ are primes, knowing a multiple of $\mathrm{lcm}(p-1, q-1)$? [duplicate]

I was reading this post https://senderek.com/SDLH/ about Shamir's hash function, which is defined as follows: Let $p,q$ be positive prime integers and let $n=p\times q$. Let $\ell = \mathrm{lcm}(p-1, ...
vxek's user avatar
  • 445
0 votes
1 answer
40 views

Why would be the use of such hash function definition? What would be the input of these functions?

$ G \space is \space an \space elliptic \space curve \space group \space G \space with \space order \space q$ and three hash functions are defined as this: $$ H_1: \{0,1\}^*\times G \rightarrow Z^*_q ...
Abol_Fa's user avatar
  • 73
2 votes
2 answers
232 views

What drivers are causing an increase in authenticated encryption modes?

So I'm currently working through this cryptography question and so far I have the answer of an increase of hackers due to increase in computational power. But apart from that I don't know what else. ...
Thanos's user avatar
  • 183
2 votes
1 answer
276 views

How do Pre-image, Second pre-image and collision resistance actually work? How does this affect data integrity?

I'm working on this past exam paper and found this question about pre-image resistance and its relation to data integrity: Displaying the hash of a file on a website in order to provide data integrity ...
Thanos's user avatar
  • 183
3 votes
1 answer
268 views

Is SAT the mathematical problem behind SHA-2 and SHA-3?

When I'm convincing non-believers that crypto is secure, I have a hard time with hash functions and the associated block ciphers. It is easy to show why RSA is hard to crack: I multiply two small ...
Timur Timak's user avatar
2 votes
1 answer
126 views

How does the SWIFFT algorithm relate finding hash collisions to a lattice problem?

I've been messing around with lattice based cryptography and came across the SWIFFT algorithm, a provably secure cryptographic hash function which has a security proof stating that finding collisions ...
August H's user avatar
0 votes
0 answers
389 views

What hashing algorithm is fast and good enough for checking if source data is changed?

Not sure if this falls into crypto from contextual point of view but it is about hashing algorithms. I have two directories -- assets/ and cache/. Anytime there is a file added, deleted, or changed in ...
Gasim's user avatar
  • 113
0 votes
1 answer
69 views

Modular hashing confusion

I am trying to learn about basic hashing using the modulo operator and am a bit confused. In the text that I am reading, it says that the modulo operator can be used to accept an input of any length ...
falc's user avatar
  • 3
1 vote
1 answer
836 views

Why is $\operatorname{Hash}(x \oplus y)$ not a secure proof-of-work algorithm?

$x$ is challenging string, $y$ is proof string. $\operatorname{H}$ is the proof-of-work (pow) function, to find a $y$ such that $H(x,y)<2^{256}/D$ $x ,y = \{ 0, 1 \}^{512}$ $\operatorname{H}(x,y) =...
user2383960's user avatar
1 vote
1 answer
361 views

KEY using AES-128, If P is less than 128 bits, padded with 0 and create 128 bits, any problem if average pw length is 6

For communication between the client and the website, use password (P) as the key using AES-128. If P is less than 128 bits, it is padded with 0 to create a 128 bits key. is there any problem with ...
lmmd1234's user avatar
0 votes
2 answers
92 views

Is there any way to claculate the hash of (a + b +c)) if you only know hash(a) and Hash(b) and Hash(c)?

For example, if you have say, 3 distinct paragraphs of clear text a, b, c and you only know hash(a), hash(b) and hash(c), and then you have a clear text d, which claims to be the concatenation of a, b,...
GGizmos's user avatar
  • 101
3 votes
2 answers
407 views

Is a simple KMAC-128 or KMAC-256 hash secure as a KDF?

Context I am trying to build a simple protocol for key derivation. I want to use SHA-3 family hash functions, which (as far as I understand) should not be combined with HMAC because their security ...
Ben Zelnick's user avatar
2 votes
1 answer
488 views

(How) can Argon2 be used to create both a hash for authentication and a secret key?

The Argon2 specs claim that Argon2 can be used both for password hashing and key derivation. I want to generate from a single password both a hash for authentication and a secret key to use for ...
BGWPVqRM3xIg's user avatar
1 vote
1 answer
391 views

Which hash functions provide 128 bit resistance?

I was wondering out of the functions (MD5, SHA-1, SHA-256, and SHA-512), do all provide 128-bit pre-image resistance and 128-bit second-image resistance? Also, out of these hash functions, do only SHA-...
CryptoGuru's user avatar
3 votes
1 answer
315 views

Where is hash to curve used?

I'm curious to hear of algorithms that use this new standard (there is a new IRTF CFRG Draft for it, for instance). It's useful for verifiably deterministic signatures on elliptic curves, but what ...
John Targaryen's user avatar
2 votes
1 answer
91 views

Lattice-based Signatures and Hashes

Although many different lattice-based signature schemes exist, Hash and Sign signatures schemes, like [GPV08], are prevalent. On the other hand, it is well known that collision-resistant hash ...
Carlos Ribeiro's user avatar
1 vote
1 answer
77 views

Could I Use a Hash Function to Help Generate Cryptographic Key

If I had a true random number generator that had a fault where 10-20% of the bits never change (these bits always produced the same value every time the TRNG was called), could I feed the result of ...
heduncook's user avatar
0 votes
1 answer
84 views

Is it safe to initialize a random number generator with MD5 for pixel selection in image steganography?

This question is related to "Is it safe to initialize a random number generator with MD5?". But in the context of steganography we don't know which pixels have been selected to hide ...
Begoña Garcia's user avatar
0 votes
1 answer
840 views

Finding the private key with the transaction signature [duplicate]

I have two ETH transactions (both belonging to the same address) that both have the same r value in the transaction signature, is it possible to extract the private key from it? Details of both ...
Hossien Basuli's user avatar
0 votes
1 answer
203 views

How to prove that a hash function is collision resistant if it's equal to that of a collision resistant hash function? [closed]

Given that H is a collision-resistant hash function from 2n-bit strings to n-bit strings. How do I prove that Hash is collision-resistant if: $$\text{Hash}(X_1∥X_2∥X_3) := \text{H}(X_1∥H(X_2∥X_3))$$
user avatar
0 votes
1 answer
84 views

What is the difference between an ideal and a practical hash function?

A user of this forum told about ideal and practical hash functions. What is the difference between them? Can someone provide examples of ideal and practical hash functions?
phantomcraft's user avatar
1 vote
1 answer
109 views

Hashing a seed together with a block counter and using as a encipherment scheme: Will this have the same security in bits as the seed used?

A user of this forum said that the whole entropy of a seed goes to the hashed result if using a counter and also that is suitable for key generation even if the internal state or digest size of the ...
phantomcraft's user avatar
0 votes
0 answers
32 views

Proof of inclusion for odd-valued tree

How would a proof of inclusion be done here as the number of nodes is odd and some hashes don't have a sibling hash? Normally you would send the sibling for each level to the client. Here there are ...
Yoinkers McGee's user avatar
1 vote
2 answers
343 views

Is it possible to generate a key from a hash function, being the key larger than the hash function digest output without spliting the seed?

Let's suppose I have a 2MB photo and I want to generate a key from it, and the key should have 2048-bits of size. A hash function such as SHA3-512 would not deliver a key with with the desired ...
phantomcraft's user avatar
0 votes
1 answer
370 views

Keccak Capacity bits Parameter

I am learning Keccak Hash Algorithm and I am a little bit confused about the Capacity bits parameter. I am trying to understand how we can set the capacity parameters while implementing Keccak in ...
Crypto_Learner 's user avatar
1 vote
1 answer
145 views

What is the problem with having a hash to group function where you can find a discrete log relation between 2 different hashes?

I was reading some notes on a naive hash to a group function. Consider a cryptographic Hash function $$H: \{0,1\}^{*}\to \{0,1\}^{k}$$ Consider a Discrete Log Hard Group $G$ with a generator $g$. We ...
user93353's user avatar
  • 2,179
1 vote
1 answer
120 views

Are pedersen hashes of small inputs safe?

I understand that the end result of a Pedersen Hash (like this one) is a point in an Elliptic Curve. In the example implementation mentioned above, the input $M$ is split into chunks of 200 bits (the ...
popeye's user avatar
  • 65
2 votes
1 answer
93 views

How to check whether function provides full diffusion or not?

In "The Skein Hash Function Family" paper authors wrote: The MIX/permute structure has been designed to provide full diffusion in 9 rounds for Threefish-256, 10 rounds for Threefish-512, ...
Tom's user avatar
  • 1,211
1 vote
1 answer
600 views

Is sha-256 better then sha-1 in aspects othen then the hash size?

Assume I create a hash using SHA-256 and then take only the first 160 bits of the hash, as the result. is the result more cryptographically secured than SHA-1? Or are the two algorithms equally secure ...
Aviv Aviv's user avatar
  • 113
4 votes
1 answer
190 views

Alternatives of how the Fiat-Shamir transform random oracle is applied to a protocol

The Fiat-Shamir transform typically works by substituting (public) coin tosses from the verifier by hashes of the prover's messages until this point, i.e.: $$H(x,\alpha_1) = \beta_1, \\ H(x,\alpha_1, \...
Bean Guy's user avatar
  • 722
1 vote
2 answers
123 views

Would it be possible to find a hash of a string that itself includes the hash result?

Something like: $$ h = Hash(\texttt{"Some String"} \mathbin\| h)$$
user2589298's user avatar
1 vote
1 answer
234 views

Building 256-hash function from known 64-bit hash functions

There are 64-bit universal or almost universal hash functions, like CLHASH or VHASH: https://arxiv.org/pdf/1503.03465.pdf https://eprint.iacr.org/2007/338.pdf Can we create secure 256-bit hash ...
Tom's user avatar
  • 1,211

1 2 3
4
5
60