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.

241 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
0answers
38 views

What does the server do on receipt of a one-time-password?

I'm trying to understand this question and I do not understand part of it. I have part of figured out, part of it not. Considering the hash function h(i) = (i + 5) mod 7, used in an implementation ...
1
vote
0answers
82 views

Can I prove that hash of modified preimage is valid

Assume that hash(X) == Y Alice knows both X and Y Bob only knows Y Alice generates a random nonce N and shares it with Bob. Alice calculates H = hash(X⊕N) and shares H with Bob. Can Alice prove to ...
1
vote
0answers
190 views

How to encrypt small pieces of data (2 - 4 bytes) within Beacon advertising packet?

I'm developing a medical device that operates under extreme low-power constraints and transmits data with BLE, where every unnecessary millisecond of air time matters. I am developing a Beacon ...
1
vote
0answers
137 views

Overcome MD5-RSA Signature verification

I asked this question already at the Information Security SO site, but my research on how to overcome this problem ended always on the crypto site. That's why I will try to find some help here :) I ...
1
vote
0answers
41 views

Round counts and permutation usage for hashing for a Merkle tree

Are there any current recommendations for performant hashing in a Merkle tree? It appears the hash based signatures in Sphincs use Blake2 everywhere (see Table 1 on page 22 of https://sphincs.cr.yp....
1
vote
0answers
44 views

How to prove security of scheme constructed by Hash then PRP

Suppose there is a scheme where a message is first hashed and then sent to a PRP. If the hash is done using an $\epsilon$-bounded universal hash function and the PRP $K\times \{0,1\}^n\rightarrow\{0,1\...
1
vote
0answers
336 views

Show that the CBC-MAC construction applied to a PRP is not collision resistant

I'm trying answer the following question. Yes, it is a homework question, so I'm not asking for the answer directly but would like to get some pointers on how to solve it. So far I have spent several ...
1
vote
0answers
126 views

Is text description of MD2 algorithm wrong?

I'm trying to implement MD2 from scratch of RFC 1319. It feels like there is a gap between steps 3.2 & 3.3. After step 2, the checksum C is appended to the message and never mentioned again. We ...
1
vote
0answers
79 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 ...
1
vote
0answers
215 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 ...
1
vote
0answers
328 views

Private Key Sharding - How is it Secure in a Distributed Network?

In a Distributed Network in order for a private key not to be compromised sharding will have to take place off the network, correct? If so: Why is it when a Distributed Network shards private keys ...
1
vote
0answers
62 views

Why isn't a range proof calculated using size?

For example a Pedersen commitment for an elliptic curve of maximum $2^{64}$, requires every number between $0 \to 2^{64}$ to be checked. Why do range proofs, in the case of a Pedersen commitment, not ...
1
vote
0answers
58 views

Validation of Merkle branch for a root

In the paper of the Honey Badger BFT link, which is a BFT algorithm, that makes use of cryptography, there is described an algorithm for a reliable broadcast with erasure codes. Following part of the ...
1
vote
0answers
134 views

Backwards Length Extension Attack

Can SHA 256 be modified to make it vulnerable to length extension attack both by appending text to the front and adding text to the end?
1
vote
0answers
611 views

Signed XML SignatureValue element value (hash in base64) contains &#xd

My application is .NET based. I have signed xml from third-party environment (Java based). Its signature value base64 string contains carriage return #xd;. ...
1
vote
0answers
279 views

Composition of hash functions

My scenario is as follows: Two entities $A_1$, $A_2$ host same versions of replicated data $M$. An entity $A_1$ computes $h_1 = H_1(M)$ and another entity $A_2$ computes $h_2 = H_2(M)$. Is there ...
1
vote
0answers
41 views

What security properties were required by NIST on the SHA3 project?

From this link, NIST claims that: A cryptographic hash algorithm (alternatively, hash "function") is designed to provide a random mapping from a string of binary data to a fixed-size “message ...
1
vote
0answers
200 views

Is a hash function based on multiple nested iterations of HMAC-SHA-256 cryptographically weaker than SHA-512?

Let $M$ denote a message. Choose (arbitrarily or randomly) five different sequences of bits (their lengths are allowed to be arbitrary, assuming that our HMAC construction will not exceed the ...
1
vote
0answers
29 views

Exchanging pre-image of hash over a network securely

Suppose A and B both have a secret value $S_a$ and $S_b$. A sends the hash of his secret $H(S_a)$ to B and B sends $H(S_b)$ to A. At a later point in time, if both of them want to exchange their ...
1
vote
0answers
233 views

BLS aggregate signatures for relay node non-interactive incentive accounting

This is a practical application of cryptography question and I hope this is the right place to ask it. Any advice would be very much appreciated. I'm looking for a low-bandwidth, non-interactive ...
1
vote
0answers
65 views

Grøstl MixBytes Python implementation

I am trying to find an efficient way to implement the Grøstl matrix multiplication on python3. So far I have managed to get this result : ...
1
vote
0answers
510 views

Hash function on byte arrays, with independent order

I would like to have a hash function $H(a_1,...,a_n)$ with the following properties: $a_1 ... a_n$ are byte arrays with same size (typically 32 or 64 bytes). It should also allow "easy" update or ...
1
vote
0answers
90 views

Why it is necessary idealized hash functions in Random Oracle Model?

I have reading about how to bring provable security for cryptographic schemes. There are two models: the standard model and the random oracle model. In random oracle model, is necessary to idealize ...
1
vote
0answers
29 views

Can we prove that an element in a fractal tree traces back to a certain point?

To know, if D traces back to A by comparing two hashes on D and ...
1
vote
0answers
104 views

Does a distinguisher for an PRF based on a hash make the hash function insecure?

I recently found a distinguisher for the PRF $f(s, i) = H(s || i)$ where $s$ is the seed and $i$ is a counter and $H$ is a cryptographic hash function, which is able to distinguish $f(s, i)$ from true ...
1
vote
0answers
65 views

Rotatable hash-based duplicate check

I want to check duplicates of secret information which is also already encrypted in our database(using ECC algorithm, one of the std curves). plaintexts can be phone numbers, zip codes, etc. Since it'...
1
vote
0answers
164 views

How many times does a hash function have to be evaluated?

I have the following homework assignment: $n$ is an even number, $1^n$ and $0^n$ are $n$-bit strings and $x$, $y$ and $z$ are arbitrary strings of length $n$. How many evaluations of hash ...
1
vote
0answers
924 views

Why is a "Signed Digest" different from a "Digest which has been Signed"

I want to understand why creating a signed-digest of a file is different from creating a digest and then signing it. IE. If I do the latter, the verify fails. Here is my test script. Can someone ...
1
vote
0answers
528 views

Relationship between "Entropy" and "Security" in crypto functions

There is a lot of confusion between "entropy" and "security" of a cryptographic function. I like to visualize it as the entropy being the water, and the crypto function being a glass. So for ...
1
vote
0answers
71 views

Why does facebook uses two secrets to secure API

I am working on a public API for my personal forum. Concerning the authentification of the requests and responses I plan to hash the payloads with a secret, known to me and the API user, and send the ...
1
vote
0answers
381 views

Use of Initialization Vector in a Hash Function

Why is an Initialization Vector used in a hash function? Some hash functions do not seem to need an IV, why do other hash functions need one?
1
vote
0answers
89 views

Decryption and Hashing in random order of a file

I have a requirement where an encrypted file is read in random order of 32k chunks and decrypted and final content hash is computed. This hash should match the original content of file. I need this ...
1
vote
0answers
178 views

Why is one scheme “hiding” while the other one is OK?

I'm presented with these 2 following commitment schemes $Commit(x;r) = (c,k) $. This is presented as bad (not hiding) $Commit(x;r) = (H(x), x)$ So, not hiding means that attacker can deduce $x$ ...
1
vote
0answers
95 views

How to formalize a partial preimage task?

Part of the bitcoin mining proof of work is associated with solving a partial preimage problem. For example, output a preimage message $M′$ which computes to a hash value $Y$ with $|Y| = n$ bits ...
1
vote
0answers
1k views

Padding in hash functions

What are the consequences, in terms of security, of using a padding rule at the beginning of the message? Instead of the end? For instance, in most hash functions, we are using the following padding ...
1
vote
0answers
147 views

Authentication of short message based on 6-digit alphanumeric compare-and-confirm

I have two parties that want to communicate with each other based on a shared password. The protocol is using PBKDF2 (with HMAC-SHA256) to create a shared key on both sides (due to restrictions on the ...
1
vote
0answers
70 views

Hash function notations and their corresponding existing cryptographic hash algorithm

I am implementing Role-based access control by referencing the paper Enforcing Role-Based Access Control for Secure Data Storage in the Cloud. In page 6, they have mentioned to choose hash functions $...
1
vote
0answers
66 views

Build a hash function that returns a digest in $\mathbb{Z}_{N}^{\ast}$

I want to know if there is a way to build a Hash Function in a such way? $\mathcal{H}:{\left\{ {0,1} \right\}^*} \to \mathbb{Z}_{N}^{\ast}$, $N=pq$ and where $p,q$ are primes.
1
vote
0answers
125 views

How to invert a linear hash function?

My friend is trying to convince me that his linear hash function (with a few bit operations) is secure. Is there a way to disprove this? (Or prove this, but I've read from multiple sources that this ...
1
vote
0answers
536 views

Parallel hashing function that always gives the same hash despite a variable number of cpus

The title pretty much sums it up :) I'm looking for a hashing algorithm that does not need to be cryptographically secure beyond reducing the number of accidental collisions. There is no need to ...
1
vote
0answers
61 views

Keys and key-stretching when authenticating requests?

I'm making a REST application and still a bit confused about this issue. basically, to authenticate incoming requests, I give out userId, issued timestamp, expiry timestamp (normally 3 months after ...
1
vote
0answers
181 views

Example describing Baek and Zheng’s threshold identity-based decryption scheme

I am trying to work through an example of Baek and Zheng’s “threshold identity-based decryption scheme” and I tried a lot to solve this, but somewhere I’m doing something wrong. I hope someone can ...
1
vote
0answers
95 views

Forward Secrecy with pseudorandom functions

Let $H_1$, $H_2$ be keyed hash functions (e.g. $H_i(x) = SHA_{256}(s_i||x)$ for pseudorandom $s_1$, $s_2$). Let $s_n = H_1^k(s_0)$, $k_n = H_2(s_n)$, where $s_0$ is a secret (pseudorandomly chosen ...
1
vote
0answers
126 views

advantages of hashing over elliptic curve signatures for a proof of work protocol

I'm trying to create a proof-of-work protocol for a proof-of-concept software, and it's basically something like this: ...
1
vote
0answers
282 views

Are partial hashes used in cryptographic protocols?

In my question (and answer) about a partial hash code used within a signature application I found out that partial hash codes are sometimes used within protocols with a relatively restricted security ...
1
vote
0answers
258 views

Convergent encryption has dictionary attack, but why hash function doesn't?

Convergent encryption (CE), $E_k(d)$, is a way to encrypt the data $d$, with the characteristic that the encryption key $k$ is $k=h(d)$, where $h(\cdot)$ is a cryptographic hash function. Consider a ...
1
vote
0answers
611 views

Accelerated hashing on consumer-grade CPU?

Question is a follow-up to this one. The question was about accelerating SHA1. I am writing an application, where I do have a choice of hash algorithm, as long as it's a strong one. I want to be able ...
1
vote
0answers
190 views

Is this a correct understanding of Universal Hash Functions?

I'm studying universal hash functions and have been reading several papers but now i'm focusing on Wegman and Carters original paper from 1979 (Universal classes of hash functions) and the H1 class. ...
1
vote
0answers
256 views

Client puzzle using hash

When a server is under attack, it send the client the following data: Nonce - a byte array of Y length Hash - the hash digest of the puzzle solution The client has to find X such as Hash(Nonce||...
1
vote
0answers
304 views

Hash function that is efficient on GPU and poorly suited to ASIC

I have such requirements to the hash function in my project: operating on 32-bit data, not mathematically breakable (built on existing hashes known to be secure), free of branching, as much as ...