Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
8 views

Multi-Message Broadcast System

I'm looking to create a system that can be used to transmit a single message which when decrypted/broken down, can represent a variety of different character interpretations (or messages), based on a ...
1
vote
1answer
18 views

How to encrypt sensitive files in a business application? Is it needed?

I'm currently working on a business Java application, and we store sensitive files related to our users. What is the appropriate approach to store them securely? Is it viable to encrypt/decrypt all ...
3
votes
1answer
48 views

Could we use a more efficient hash for signature generation?

Is it possible to use a more efficient hash - such as one based on GHASH - instead of a cryptographic hash for signature generation? In other words, could a combination of a fast hash and the private ...
0
votes
1answer
45 views

Does hashing an encrypted message suffer from any drawbacks?

I am working on this problem where the set up is like this: There are three hosts: A, B and C. A wants to send a message to C which passes through B. At A the message is hashed, the hash is padded to ...
0
votes
1answer
68 views

Newbie question: one-way functions in cryptography

I'm reading this article on the basics of cryptography and it says that the main principle is about taking such an algorithm that knowing the end result and the algorithm, an eavesdropper wouldn't be ...
2
votes
0answers
49 views

How to derive a hash function from another hash function?

Problem: I'm trying to figure out how to solve this, apparently it's hashing the hash value itself. So G has two rounds of hashing the original message x. I tried searching for the relationship ...
1
vote
0answers
46 views

What lightweight cryptographic hash function for short input could I use for HMAC?

I am looking for a cryptographic hash function that I can configure for HMAC. The input that I will hash is around 50 bytes. The function must be fast, and computationally lightweight.
1
vote
1answer
40 views

Instead of sending a set of random values, send a key for a PRF

Some Protocols require one party to send $n$ random challenges (or random values) to another party. For communication efficiency purpose, one can pick a random key for a pseudorandom function, and ...
3
votes
2answers
56 views

KDF Salt: How/When is it Okay for it to be public?

Post Structure: Prior source material studied Question & Details Assumed threat model Example Assumptions Clarifications Prior source material studied 0.1. RFC 2898 0.2. HAC (Handbook of ...
-1
votes
0answers
16 views

Hash function without compression [duplicate]

I know compression is the most important thing in hashing. It's to help the release of the product time. What happens if the hash function does not provide compression?
-2
votes
2answers
82 views

How to determine if a Hash function is preimage resistant?

So I'm trying to solve this problem. There are of course more but I'm trying to figure out how would I even solve this first one in order to do the rest. Any hints or help in the steps would be ...
0
votes
1answer
45 views

Why do m and m' both hash to H2?

I'm trying to understand the following text: I'm having trouble understanding why $m$ and $m'$ both hash to $H_2$. I tried doing truth tables for $m_1'$ and $m_2'$ given the equations but I don't ...
0
votes
1answer
49 views

How long would it take to crack a double hash if salt and final hash are public?

I have a hash of a file $H_1$ and then I add salt and rehash it: $H_2$. I make my $H_2$ and salt public and I use my $H_1$ as a password. How long would it take for this to be cracked with someone ...
-1
votes
0answers
23 views

Using Lattice Based Cryptography as Salt [closed]

Can Lattice Based Cryptography be used to generate random numbers in order to use as Salt?
1
vote
0answers
38 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 ...
0
votes
0answers
40 views

Rainbow Table Reduction Function to reduce MD5 to a string that belongs to a specefic Regular Expression [duplicate]

I am trying to build Rainbow Tables for MD5 hashes. Let us say my password space is [A-Za-z]{5}[0-9]{2} How can I come up with a thousands of Reduction functions ...
8
votes
5answers
2k views

Hash to prime numbers?

Is there some provably secure hash function to prime numbers? Say, a function $H: \{0, 1\}^* \rightarrow \{e: e \in \{0, 1\}^\lambda \land e$ is prime$\}$ I'm asking because there are some ...
0
votes
1answer
30 views

Secure offline treasure hunt

Say I would like to create an app that would allow users to organize treasure hunts for their parties. The host of the party would create a list of GPS coordinates for each hiding spot and distribute ...
4
votes
1answer
75 views

Need help with NFC Tags and cryptography

I have some NFC-Tags, which will be added to my devices. These NFC Tags are basically EEPROMs with an unique UUID (7-Byte, readonly, public) and some constant parameters (approx. 7-15 Bytes, read and ...
0
votes
1answer
51 views

Practical attack on md5 hashing algorithm?

I have the following conditions: String which consist of "STRING+key+ID+key" is hashed with md5. I have a knowledge of STRING (10 chars), ID is probabilistic (int 15), key is 15 chars long (a-z A-Z 0-...
0
votes
0answers
39 views

Private Set Intersection Protocol

Are there any protocols to perform private intersection for two sets of string hold by two different parties
3
votes
1answer
80 views

Is there any way to check hash of homomorphic encrypted data?

I need some algorithm that satisfies: H - hash function Enc - encryption function (using public key) M - secret data $Enc(H(M)) = H(Enc(M))$ Let this system exist: the First person has a secret ...
3
votes
3answers
338 views

What is different below two Ciphersuites?

I have two questions; I need an explanation for the differences of below two cipher suites. How do they work with SSL/TLS protocol? (my main concern first one doesn't have '...
1
vote
0answers
43 views

Hashing into a supersingular elliptic curve

Is there any way to hash from a string $\in \{0,1\}^{*}$ into a supersingular elliptic curve $E(F_p)$ such that the hash function behaves(provably) like a random oracle, and is efficient? Using ...
3
votes
1answer
91 views

What does Keccak being “efficiently invertible” mean?

Reading through Wikipedia, I saw this: It has been shown that the Merkle–Damgård construction, as used by SHA-2, is collapsing and, by consequence, quantum collision-resistant, but for the sponge ...
2
votes
2answers
414 views

Optimal bit-change-probability of the avalanche effect for hashes

Avalanche effect: The strict avalanche criterion (SAC) is a formalization of the avalanche effect. It is satisfied if, whenever a single input bit is complemented, each of the output bits changes ...
1
vote
0answers
27 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 ...
3
votes
1answer
73 views

MD5 - Chosen Prefix Collision Attack

Given 2 messages $m_1$ and $m_2$, in a chosen prefix attack, we want to find $s_1$ and $s_2$ such that: $\text{MD5}(m_1 || s_1) = \text{MD5}(m_2 || s_2)$ Are $s_1$ and $s_2$ found by brute force ...
0
votes
1answer
79 views

Is there an $n$-bit hash function such that $n$ is equal to the length of input and the collision resistance is close/equal to $2^{n/2}$?

Let $B$ denote a non-empty bitstring of arbitrary length. Then let $n$ denote the length of $B$. The question: does there exist a cryptographic hash function $H$ that outputs a hash $h$ of $B$ such ...
1
vote
1answer
71 views

AES-128 as compression function in Merkle-Damgard construction

Using a compression function $f : A × A → A$. A basic version given by: $W_0 = IV$ $W_1 = f(W_0, m_1)$ $W_2 = f(W_1, m_2)$ ... $W_n = f(W_{n-1}, m_n)$ $W_n$ is the output of the hash function, $...
3
votes
1answer
67 views

Can length extension attacks be avoided by a single bit flip?

It always seemed to me that length extensions are possible simply because no special operation is performed after the last operation - for instance in a Merkle-Damgård construction. Basically the MD ...
0
votes
0answers
24 views

Simplifying the description of the Keccak padding rules

I would like to check if my following understanding of Keccak padding has any flaws and if there are, please feel free to point them out and correct them. The Keccak version I am interested is the ...
0
votes
2answers
59 views

Can I find the IV of a single block of SHA256, given the plaintext and digest?

Each 512-bit block of SHA256 takes an initialization vector (IV) and message schedule and returns a digest. Knowing the message schedule and resulting digest, is it feasible to reverse the algorithm ...
3
votes
2answers
136 views

Are Hash Palindromes Possible?

I'm trying to figure out whether the following is impossible or merely improbable: Does there exist an input, I and its hashed value, ...
0
votes
1answer
75 views

Does hashing a PRNG by a cryptographically secure hashing algorithm result in a CSPRNG?

Or specifically, does ChaCha20 hashing of the xoroshiro128+ random number generator result in a cryptographically secure random number generator?
0
votes
0answers
57 views

How to prove this hash function does not achieve preimage resistance

I have the following hash function and I am trying to prove it is not preimage resistant ...
0
votes
1answer
39 views

Hash ratchets with truncating hash function

I'm working on a forward secret messaging system that relies on hash ratchet. I'm using BLAKE2b as the one-way function, which by default produces 512-bit digests. These digests are truncated by my ...
1
vote
0answers
32 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 ...
0
votes
2answers
56 views

Clarification of one-way property of hash functions

One-way property: computationally infeasible to find data mapping to specific hash The definition above is a little vague, if we have h(x) = floor(log(x)), ...
0
votes
1answer
47 views

Implementation of MiMC over Edward curve

I'm trying to use MiMC-hash function [1] over Edwards curve, in order acheive an hash function that output a point on Edwards curve. However, in Section 5.1 ([1]), they state that $gcd(3,p-1)=1$, ...
0
votes
0answers
35 views

“Efficient” hash function that also acomplishes computation

I was wondering recently when I heard about bitcoins energy consumption. It seems very expensive way to have a currency. But then I got to wondering what if all that mining which is essentially ...
1
vote
0answers
66 views

How does Skype hash the phone number to a fixed length? [closed]

I have a Skype account with a phone number and I noticed that my contacts and I who created the accounts with a phone number have the Skype ID in some form of a hash. But all the Skype IDs have the ...
0
votes
4answers
997 views

Can the same One-Time-Pad be re-used with some tricks

Let’s say I have a message $m$ of $n$ bits. And a predetermined pad of $k*n$ bits. And for every bit $b$ of this message $m$, I’m creating random sequence $s$ of $k$ bits. I also have a predetermined ...
-1
votes
1answer
78 views

finding encoding based collision

For example, If I enter as a sample "hello world" in English, how hashing protocol generates a hash of it? is in the first step, change it to ASCII or Unicode or Binary? What if I find a word in other ...
0
votes
1answer
120 views

Hash-Then-Encrypt or Encrypt-the-Hash?

My question is would it make any difference if I use SHA3 and hash a block of data and then encrypt it using RSA is most secure to do the reverse? The question is about Site-To-Site transmission ...
0
votes
0answers
23 views

In AES-GCM, is it secure to not GHASH the lengths to create a tag?

In AES-GCM, one of the steps includes a GHASH of the length(A) || length(C). Under the condition that that the length of A == 0, ...
2
votes
2answers
138 views

Differences between hash- and encryption algorithms?

There is a lot of confusion between hash- and encryption algorithms; I would like to understand: When do we use a hash algorithm and when do we use an encryption algorithm (a cipher)? How difficult ...
0
votes
1answer
70 views

Where should I start to learn cryptography? [duplicate]

I want to learn cryptography. I just wanted to ask people who experienced about the field that where should I start? Any recommendation would be something for me. Thank you in advance.
8
votes
3answers
1k views

Can I hash a secret key and used the hash as key ID?

I am using AES-CBC to provide confidentiality for protocol messages. I want to allow the receiver to know the secret key by using a key ID. For this I hash the secret key to generate a key ID. Every ...
8
votes
2answers
160 views

Why aren't hash values for “nothing” (empty) defined as all zeros?

Any decent hash algorithm will produce basically "random like" values for any given input including the empty input. For example MD5 produces d41d8cd98f00b204e9800998ecf8427e on an empty input. I ...