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
1 answer
52 views

Protein folding problem and hash functions

I am an industrial biotecnologist from Italy. I am very interested in computational complexity and in protein folding problem in particular. I have a question. Hash functions are functions that given ...
user avatar
-1 votes
0 answers
48 views

Hash functions using charm-crypto library

Can anyone suggest me any resource or any paper in which I can read how hash the functions using the library is using are implemented? I feel very confused while referring to the documentation of ...
user avatar
0 votes
0 answers
14 views

Best way to hash a string in Circom

The specific case I'm asking this question for is a ZK-version of a Wordle game that I'm working on: https://github.com/alxkzmn/zk-wordle/blob/master/circuits/wordle.circom I represent the 5-letter ...
user avatar
0 votes
0 answers
59 views

Determine if a Hash function is pre-image resistant and collision free

I'm so confused by this kind of exercise. We have that $n = p * q$, where $p$ and $q$ are prime numbers. Let's examine this hash function: $h(x) = x^2 \mod n$. Determine if the hash function is pre-...
user avatar
0 votes
1 answer
78 views

Does hashing a secret/seed make it effectively 2X less secure?

In many cryptocurrency projects I noticed that 32-byte seeds/secrets are hashed to arrive at new 32-byte keys. The reason why is because you can then, with the addition to an index, use the same seed ...
user avatar
0 votes
0 answers
20 views

Confirmation of receipt during the fair exchange

Is there a way to confirm the delivery of an item to the recipient e.g(bank payment)? Let's say there is a trust third party in the protocol. The sender's side (honest) says that it sent the payment, ...
user avatar
1 vote
1 answer
49 views

Why do we need the leftover hash lemma for this hybrid proof (Learning with Errors)?

I've been reading about Learning with Errors here. On p. 7 there's a proof for the security of the PKE scheme, that goes through the leftover hash lemma, in order to prove that: $$ (pk, Enc(0))\equiv (...
user avatar
  • 189
1 vote
1 answer
78 views

Real world hash collision risk, for finite input; uniqueness only no data risk

I've got a comma-delimited list of identifiers that I need to use for uniqueness. MSSQL limits uniqueness to 1700 bytes, which according to my sampling, doesn't appear to be sufficient. hashes are the ...
user avatar
1 vote
1 answer
62 views

Can a hash algorithm get identified by its result with any input?

I want to identify hash algorithms without names (like sha256, ). Is there a problem in make sha256('') and use the output like the id? An empty string is really an empty input or this input is no ...
user avatar
  • 11
1 vote
0 answers
57 views

Are hashes uniformly random? [duplicate]

I have a long list of items with non-random id numbers. I then compute the hashes of the ids (using SHA256 or something similar). If I now pick all ids where, say, the last digit of the hash is a 3, ...
user avatar
  • 111
0 votes
0 answers
37 views

Can we combine two AES (with block size 128) to to a block cipher with a block size 192 which is collision-resistant?

Encrypting values with AES we only need about $2^{64}$ trials until we finding an already used value (some collision). This can be done these days with easy. To make this harder can we combine two AES ...
user avatar
  • 475
0 votes
0 answers
28 views

User to be able to log in without stating the user's password scheme possible?

In my database, I have a PBKDF2 hash + salt for every user. My objective is for the user to be able to log in without stating the user's password (in case somebody is logging the network traffic ...
user avatar
0 votes
1 answer
49 views

Proof of computationally binding correct?

I have defined the following commitment scheme and would like to prove that it is statistically hiding and computationally binding, but I'm not sure if my proof is accurate: For $h$, a collision ...
user avatar
  • 189
0 votes
1 answer
15 views

How come we only need to generate the first tree in each layer in XMSS MT

From what I understand, to reduce the time taken for public key generation, you can use nested trees in XMSS to form Multi-tree XMSS. For an instantion of 2 layers, it seems that the leaf of each L ...
user avatar
1 vote
0 answers
44 views

Is the following statistically close to uniform? (and how does one prove such claims in general)

For every $a \in \{0,1\}^n$ define: $$h_a : \{0,1\}^n\to \{0,1\}$$ $$ h_a(b)=\langle a,b \rangle$$ So $\{h_a\}_{a \in \{0,1\}^n}$ is known to be a universal hash function family. This means that if we ...
user avatar
  • 189
0 votes
0 answers
42 views

Davies-Meyer mode

While reading about the Davies-Meyer mode (and other modes), I have got some doubts: What can I use as the key to the encryption $E$? Since I am generating hash of a message (not MAC), then there ...
user avatar
  • 593
1 vote
1 answer
75 views

Why is the SHA256 in libsnark so slow?

When I use the merkle proof example of libsnark, I find that it takes more time to calculate the merkle tree than to calculate the proof. As shown in the log below, it takes 0.04s to calculate a ...
user avatar
1 vote
1 answer
43 views

Reset Indifferentiability need and it's implications [closed]

What is reset indifferentiability? Why practical hash functions cannot satisfy reset indifferentiability. What are the implication of reset indifferentiability.
user avatar
0 votes
0 answers
38 views

Asymmetrical scheme: insecurity concerns of saving a hash of a hash of a password

please verify or explain how to do this properly. I'm letting a user create keys from the client through a secure server. I ask the user for a password on the client, then send the hashed password to ...
user avatar
  • 109
0 votes
1 answer
80 views

Signing a hash of file vs signing a file

If person A generated a hash (e.g sha256) of a file and then signed the hash using a private key. Given person B only has the public key, file, signature and the hash, would verifying the signature ...
user avatar
  • 109
0 votes
0 answers
21 views

Tools to debug handshake failure after client key exchange, change cipher spec and encrypted handshake message TLS1.2

Hello I have been receiving Description : Handshake failure after sending client encrypted handshake message to the server. Is there any tools I can use instead of wireshark to detect the source of ...
user avatar
1 vote
1 answer
34 views

regarding MDS matrix and security

I found a construction for MDS matrix (algorithm 4 of https://eprint.iacr.org/2020/1143) for a hash function that compresses elements in a prime field $F_p$ If the hash has a rate and capacity $(r,c)$ ...
user avatar
  • 33
0 votes
1 answer
35 views

Meaning of the term "irreversible" for hashing

I was in an interesting discussion with Jon Skeet on StackOverflow. He indicated that hashes are irreversible, but he extended this to non-cryptographic hashes. A hash function has a specific output ...
user avatar
  • 85.1k
1 vote
1 answer
343 views

Can you break PBKDF2 if you know the hash of the password?

I know that PBKDF2 hashes the password a number of times, the result being a key. Can an attacker find the key if they don't know the password, but know the value of the hash of the password?
user avatar
2 votes
0 answers
65 views

RIPEMD160 - how were these constants created?

I have been through several sources and papers, but I can't seem to find how these rotation constants were created. Are these constants arbitrary, or were there chosen by some kind of permutation? I ...
user avatar
1 vote
0 answers
23 views

What is an advantage of the Charles--Lauter--Goren hash function?

What is an advantage of the Charles--Lauter--Goren hash function (based on isogenies of elliptic curves) among other provably secure collision-resistance hash functions ? I heard that it is slower.
user avatar
1 vote
0 answers
30 views

Computing bandwidths of various cards under Ethereum [closed]

I'm writing my term paper on bandwidth restrictions between varying generations of PCI-E lanes using the 1x interface of the lane and exploring modern bandwidth restrictions when mining using the ...
user avatar
1 vote
1 answer
75 views

How to crack sha256 used as streamcipher with known or guessable block

Using SHA-256 as a stream cipher appears to bear cryptographic weaknesses, however, I am not quite sure how to implement them in decryption. Assume that I have an encryption function using 64-byte ...
user avatar
0 votes
0 answers
54 views

Proving pairwise independence of a set of hash functions

A collection of hash functions $H=\{h:\{0,1\}^n \to \{0,1\}^m\}$ is pairwise independent if for every $x_1 \neq x_2 \in \{0,1\}^n$ and $y_1, y_2 \in \{0,1\}^m$: $$ \Pr_{h \leftarrow H}[h(x_1)=y_1 \...
user avatar
  • 189
0 votes
0 answers
18 views

Calculate unique secrets of a hash algorithm, which produces a deterministic bit array of length 7

I can't really wrap my head around it. So given a hash algorithm which always produces a 12 bit array. How would I calculate the count of unique secrets with a collision rate of 75%.
user avatar
  • 1
0 votes
2 answers
93 views

Isn't an asymmetric cipher (like RSA) algorithm sufficient for all basic needs, when speed is irrelevant?

Why I care: I want to implement some secure sessions for communicating over internet and since I am a complete amateur in this and don't want to spend a lot of time learning about cryptography or ...
user avatar
  • 115
1 vote
1 answer
51 views

Hash of concatenated values (one public, one private)

Assume two end-points $A, B$. $A$ sends to $B$ a $Hash(pv||key)$, where $pv$ is a public value that can be intercepted by attackers. The $key$ is a common secure shared key in both end-points, and $||$...
user avatar
  • 303
1 vote
2 answers
88 views

Relative bits of security of slower functions

Leaving memory-hardness assumptions aside, some slow hash functions are iterated salted hash-chain versions of regular cryptographic hashes. This is usually defined by a ...
user avatar
0 votes
0 answers
41 views

Is there a hash function that is semi-two-way?

I am looking for a hash function that uses a timestamp as salt, and produces an output that when run through another function only returns the timestamp used. What would this be called? It's not a one-...
user avatar
2 votes
0 answers
49 views

Is it possible to adapt Keccak to use 60-bit native words, without having to emulate U64?

Assume an architecture with fast 60-bit native words (a close example would be Ocaml, which has unboxed 63-bit numbers, and only boxed 64-bit numbers). We're looking for the fastest hash function in ...
user avatar
  • 1,295
1 vote
1 answer
61 views

Hash functions with constant number of 1's

In the following paper: https://eprint.iacr.org/2018/056.pdf, the random oracle is defined as follows: $ H: *\xrightarrow{} \{ \mathbf{v} | \mathbf{v} \in R_{q,[1]}, || \mathbf{v}||_{1}=\omega\}$ ...
user avatar
0 votes
1 answer
111 views

non-reversible additive cryptographic hash algorithm

I need a lightweight cryptographic hash function which is additive but not reversible, however I'm not sure such a function exists! (it would be better if it works in multisets as well) By additive I ...
user avatar
15 votes
2 answers
4k views

Provably fair card deck used by client and server

Say a server plays a game of blackjack with a client, and the cards are shuffled and dealt by the server. The shuffle itself may or may not be fair, but what needs to be shown is that the cards dealt ...
user avatar
  • 253
0 votes
0 answers
19 views

Why we need DSPR or Eq. 14 for the proof of SPHNICS+?

The paper says that We show that preimage resistance (PRE) follows tightly from the conjunction of second-preimage resistance (SPR) and decisional second-preimage resistance (DSPR). As I understand ...
user avatar
  • 73
1 vote
1 answer
73 views

Offset Parameters in BLAKE2b

In my course about cryptography, we started looking at hash functions. As homework, we had to pick a modern hash function and describe it in class. I chose BLAKE2b, which I can understand well when ...
user avatar
0 votes
0 answers
17 views

BB - IBE and the BDDH assumption

Given the BB-IBE scheme how can changing the hash fnc. result in the scheme no longer being IND-SID-CPA secure?
user avatar
  • 35
1 vote
1 answer
54 views

Can Bob and Alice do an authenticated Diffie–Hellman key exchange if Bob only knows the hashsum of Alice's key?

Tor vanilla bridges look like this: Bridge x.x.x.x:1234 9DD03662B50FEDBF6F8D5630CB86D7E8CE4F4432 It's only the IP/Port and a hash of the key. Can Bob and Alice do an authenticated Diffie–Hellman key ...
user avatar
0 votes
0 answers
29 views

Collision and pre-image resistances of a hash function based on SPRP

Assume we have a secure block cipher $E$ (strong pseudorandom permutation) and a fixed key $k$ which are publicly known. We construct our hash function $H(m)$ as $$ H(m) = E_k(m_1) \oplus \dots \oplus ...
user avatar
0 votes
0 answers
77 views

How to prove knowledge of a secret and allow the receiver to deduplicate it?

Consider the following scenario: We have two agents, A and B. B needs to prove that they know a secret to A, without sharing the actual secret. e.g.: A needs a way to de-duplicate the secrets they ...
user avatar
1 vote
1 answer
87 views

Why are zk-STARK quantum secure?

I have a rough idea of how STARK work, but I want to know which part makes them quantum secure. Is it because when the prover generates the proof they use the random number from the Merkle root, which ...
user avatar
1 vote
2 answers
80 views

"Reverse" Reed-Solomon error correction, given prefix of input

I have a string $S$ of length (say) 34, that I know the first (say) 24 bytes of, but not the last 10. I also have the 10-byte error correcting code $RS_{44,34}(S)$ in full. Do I have any hope of ...
user avatar
0 votes
0 answers
69 views

1st Preimage, 2nd Preimage, Collision resistance of powers of 2 mod n

Let $n$ be a product of two odd, distinct large primes $p$ and $q$. Define the hash function as $$ H_{F}(x)=2^{x} \bmod n $$ Is this hash function resistant to 1st/2nd preimage and collision attacks? ...
user avatar
1 vote
2 answers
67 views

Would this hash based encryption algorithm work in theory?

I was just thinking about this and couldn't seem to find anything on it online. So the idea I had was this: Generating a random key of some length. Then hashing this key with SHA256 (or something of ...
user avatar
2 votes
1 answer
58 views

Finite fiber of SHA512

Let $\{0,1\}^*$ be the set of finite $\{0,1\}$-strings. Then SHA512 can be viewed as a map $s: \{0,1\}^*\to \{0,1\}^{512}$. The pidgeonhole principle implies that there is $y\in \{0,1\}^{512}$ such ...
user avatar
2 votes
1 answer
170 views

Generate a key with a size bigger than the hash output length/security, is it possible?

Let's suppose I want to generate a 2048-bit key from a hash function with security up to 512-bits (such as Blake2b). I take 4 high-resolution photos, hash them with a hash output length of 512-bits ...
user avatar

1
2 3 4 5
55