# 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.

2,741 questions
Filter by
Sorted by
Tagged with
1 vote
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 ...
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 ...
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 ...
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-...
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 ...
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, ...
1 vote
49 views

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%.
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 ...
1 vote
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 $||$...
1 vote
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 ...
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-...
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 ...
1 vote
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,}, || \mathbf{v}||_{1}=\omega\}$ ...
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 ...
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 ...
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 ...
1 vote
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 ...
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?
1 vote
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 ...
29 views

1 vote
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 ...
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 ...