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
0 votes
1 answer
71 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?
1 vote
1 answer
95 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 ...
0 votes
0 answers
30 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 ...
1 vote
2 answers
171 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 ...
0 votes
1 answer
163 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 ...
1 vote
1 answer
86 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 ...
  • 2,251
0 votes
0 answers
69 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 ...
  • 45
2 votes
1 answer
75 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, ...
  • 1,171
0 votes
1 answer
148 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 ...
  • 103
4 votes
1 answer
152 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, \...
  • 593
1 vote
2 answers
120 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)$$
1 vote
1 answer
218 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 ...
  • 1,171
3 votes
0 answers
92 views

Building 256-hash function from 128-bit hash function

After reading this topic: How do I construct a 256-bit hash function from 128-bit AES? It looks like it can be done. If we have 128-bit into 128-bit secure mapping, indistinguishable from random (but ...
  • 1,171
0 votes
1 answer
100 views

Security of 128-bit hash function with salt

Modern hash function have to be at least 256-bit, due to birthday attack. But let's consider 128-bit hash function which takes as an input: plaintext $\oplus$ salt Salt may be know to attacker. Do ...
  • 1,171
2 votes
0 answers
55 views

Requirements for KDF and randomness extractor

What requirements KDF and randomness extractor does not have to meet, but the the hash function have to meet? I suspect that using hash functions as KDFs and randomness extractors is enough, but in ...
  • 1,171
1 vote
2 answers
140 views

Debug bcrypt iterations with a static salt [closed]

I want to debug bcrypt rounds with a static salt using this python lib ...
  • 113
1 vote
1 answer
143 views

HKDF-Expand max output length

I'm trying to use HKDF-Expand to derive lots of keying material (> 64GB) from a pseudo-random 512 bit key. Now according to the HKDF RFC, the maximum amount of ...
8 votes
1 answer
602 views

Does "SHA-256/192" use different initial values from SHA-256?

I've seen some mentions of a "SHA-256/192" online. Clearly, this means the output of SHA-256 is truncated to 192 bits, but does it also use different Initial Values like SHA-512/256?
  • 2,368
0 votes
0 answers
48 views

How can I add metadata to Tink Keys?

I'm planning to use tink to encrypt records stored in a database. I also plan to hash specific values from the records in order to be able to find records by field values. In order to avoid rainbow ...
  • 101
0 votes
1 answer
116 views

Merkle–Damgård construction - the bigger input, the longer time to compute hash?

I'm trying to understand Merkle–Damgård construction. We can hash as many blocks of data as we want, if I understand it right. But then it looks like when input is bigger, then also time to compute ...
  • 1,171
0 votes
0 answers
89 views

Is there a special limit in the range of the hash function?

Is there a special limit in the range of the hash function? More specifically, is it possible that there is a cryptographic hash function that outputs c-membered subsets of the n-membered set? In ...
1 vote
1 answer
64 views

Can a cryptographic hash function that outputs a c-membered subset of the n-membered set?

Is it possible that there is a cryptographic hash function that outputs a c-membered subset of the n-membered set? In other words, can the set of the binary representation of c-membered subsets of the ...
0 votes
0 answers
61 views

Constraining the output of a hashing function to a specific group

I looked into this paper on privacy-preserving aggregation by Marc Joye and Benoit Libert (https://www.ifca.ai/fc13/proc/3-3.pdf). A key element in their scheme is a hash function defined as $$H: \...
4 votes
1 answer
185 views

Create a control hash string from different sources, is there a difference, advantage or disadvantage in comparison when using this ways?

I wanna create from several inputs/sources should be formed into one hash value for controlling of different thinks later. Example: String + File String + String File + File String + File + String ...
0 votes
1 answer
44 views

How easy is it to identifiy the key when knowing a certain number of different AES-256/Fixed Nonce encrypted long-integers

Given some intervals of long integers (64 Bits). I need to generate alphanumeric strings which: should be used like passwords(known only by few individuals) must always be the same for the same ...
  • 111
3 votes
1 answer
80 views

Avoid hash flooding without a secret key?

I'm currently building an implementation of the dynamo paper, yottastore. Imagine it as a huge, distributed, hash map. To find the node holding a key, I use rendezvous hashing (an improvement over ...
3 votes
1 answer
101 views

NIST example shows extra hexadecimal characters in Block Contents of SHA512-256

I was recently trying to gain a better understanding of the SHA-512/256 algorithm and on this NIST example they use the word "abc" as the input. In the Block Contents, it shows the expected ...
0 votes
0 answers
74 views

What is the minimum length of shortened HMAC to be considered safe?

Is it safe to truncate HMAC? What is the minimum length of a truncated HMAC so that HMAC is still considered to be safe to use? Are there any standards on when it comes to shortening HMAC? In my case, ...
  • 1
-1 votes
3 answers
401 views

Which of the following is a reason to publish files' hashes?

To valiate integrity or To verify if the software is digitally signed The question seems wrong to me. I do not see any reason to publish(make public) a hash. But it is in the material I am studying.
0 votes
0 answers
126 views

Hash tree that covers 16 data block

For a hash tree that covers 16 data blocks, how many hash checks do you need to perform to localize the error? Assume that error occurred on only one block.
2 votes
1 answer
182 views

Zk Proof to Prove that I know the secret x of y = HASH(x)

Lets say I know a secret value x. The hash of x, y = H(x) is public. Is there any zk way to ...
  • 123
0 votes
1 answer
138 views

Should I use hash of passphrase as AES256 key

As title I have a password-like passphrase (8 chars at least) that is then hashed with argon2(with the salt is SHA256 of that passphrase). Then use it as AES256 key along with a random IV generated by ...
  • 155
1 vote
0 answers
241 views

What should argon2id parameters be

I plan to use it locally on mobile devices. These seems to do not offer computational power as good as on a server. So what could be a secure argon2id parameters that run around 1s since offline apps ...
  • 155
1 vote
1 answer
65 views

How to complete this proof of statistically indistinguishable distributions?

Given that: $$ SD\bigg( (r, \langle r, s \rangle),(r, b) \bigg) < \mathrm{negl}(n)$$ where $SD$ stands for statistical distance, $r$ is random uniform in $\{0,1\}^n$, $s$ is random uniform in $S \...
  • 321
0 votes
1 answer
78 views

False positive error rate of truncated hash match

I’m having difficulty calculating the false positive error probability of matching a prefix of a hash that was truncated to m bits. Say I have string S1 that produces a SHA256 hash H1. I then save the ...
2 votes
1 answer
73 views

API design that maximizes the potential of parallel and tree hashing

Traditionally, hash functions are single-threaded, and have the 'Init-Update-Final' API style. This is true of MD5, SHA-1/2/3, BLAKE2, to name a few. However, there have been proposal of parallel hash ...
  • 8,015
1 vote
1 answer
233 views

How to generate a SNARK arithmetic circuit for SHA256?

I am using zkSNARK to prove knowledge of preimage for SHA256. However, the library used only supports field operations (such as add and multiply), and it compiles down to arithmetic circuits. Thus, ...
0 votes
1 answer
109 views

How do we calculate a power with a gigantic exponent?

In RSA, signing the hash of a message is doing the operation $h^{d} \bmod N$ where $d$ is the private key. Given that the size of $d$ is usually 2048 bits and $h$ is a quite big number, the ...
6 votes
2 answers
2k views

How to prove that both people know the same dictionary word?

What would be a way to prove that both you and I know the same dictionary word? If we both hashed the word, then we could compare the hashes, but anyone who saw the hash could find the original word ...
-1 votes
1 answer
3k views

Step-by-step conversion of Private Key in Hex to WIF (Wallet Import Format)

According to this webpage: The process of encoding a private key into WIF format is as follows. Raw private keys are simply large numbers, which are represented as bytes. WIF format adds a prefix ...
0 votes
0 answers
38 views

Assumptions used for Designing Homomorphic CRHF

What are the possible assumptions that have been used or can be used for designing the homomorphic Collision Resistant Hash function (CRHF)? I know Short Integer Solution (SIS) is one of the ...
0 votes
1 answer
67 views

Double hashing scheme on not collision resistant hash

Given an hash H that is not collision resistant, for example 80-bit digest, if we use the following double hashing scheme: H(SHA2-256(x)). Does this scheme increase the collision resistance?
  • 1
-1 votes
1 answer
81 views

Hash Function Vs Signature Vs MAC?

I read: What are the differences between a digital signature, a MAC and a hash? and Found this amazing answer: https://crypto.stackexchange.com/a/5647 But one question remains: I know that for huge ...
  • 1
1 vote
0 answers
28 views

Does a salt by a trusted party remove the need for collision resistance for a binding commitment?

Say a Human is operating their trusted computer, Alice, and Human wants to hand copy a collision resistant commitment, with a security factor of 128 from Bob on to paper. Naturally we want the ...
  • 488
0 votes
2 answers
93 views

Is there any Cryptographic loop function that returns first input?

I want to use cryptographic function that returns the initial input or something related to it like its hash, the function should work like Encrypting some data or its hash, then encrypt the output of ...
1 vote
1 answer
65 views

Will increasing timecost , memorycost , parallelism in argon2ID increase security in general?

currently I am using parameters for argon2ID in terms of timecost , memorycost , parallelism higher than what is recommended in RFC9106 https://www.rfc-editor.org/rfc/rfc9106.html for increased ...
1 vote
0 answers
60 views

Comparison Hash, MAC, Signatures, Certificates

I saw a table comparing Hash/Mac/Signatures in this post. I was wondering if I can integrate digital certificates into it like this: Hash MAC Signature Certificate + Signature Integrity Yes Yes Yes ...
  • 111
1 vote
1 answer
143 views

Does RIPEMD-320 provides the same level of security as RIPEMD-160?

This article from Wikipedia claims that "256- and 320-bit versions of RIPEMD provide the same level of security as RIPEMD-128 and RIPEMD-160, respectively". Is that true or false ? And why ?
  • 57
0 votes
1 answer
262 views

Is it possible to break SHA-256 with hash tables?

If x is the value you're hashing, $t(x)$ is the hash of that value, and $t(x+s)$ is that value with salt, then hashed. You could create a hash table where the key is $t(x+s)$, the value is $x+s$, and ...
0 votes
1 answer
55 views

Can the indistinguishability obfuscator leak the password when obfuscating the password checking function?

Suppose I have a dumb password checking function: def dumb_checker(password): return password == "my_secret_key_that_should_not_be_revealed" One can ...

1 2
3
4 5
58