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

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

Reveal all information up to n-th message

Is there a way to generate a sequence of keys that have the property that exposing any of those keys will reveal all previous keys, but no future key? I'm thinking about an application that sends an ...
3
votes
0answers
45 views

Ambainis quantum collision-finding alg; triple hash output lengths?

I just stumbled onto a series of 2017 papers about applying the Ambainis quantum collision-finding algorithm to hash functions. (disclaimer: I haven't read all of them in full yet): Post-quantum ...
0
votes
1answer
94 views

Padding vs Hashing Encryption Key

I am making a program for personal use that will not contain super-sensitive information. I am using this to explore cryptography. Would it be acceptable to use a password to generate a key for AES, ...
2
votes
1answer
108 views

Which hash function to be used with DSA 2048

I'm preparing for an examination of an Information Security course at university, but I'm not sure about an explanation I created for a specific exercise. The question is: There are now DSA ...
4
votes
1answer
713 views

Are hash functions strong against quantum cryptography and/or independent enough of mathematics?

I work on ethereum and other blockchain technologies. And seeing that quantum pc's are someday going to see the light I have some questions / doubts. I was wondering if hash functions are strong ...
1
vote
1answer
30 views

if a hash is difference-unpredictable, will it keep unpredictable given an offset?

Let $H(k,m)$ an universal hash function that is difference-unpredictable. Let $\mathcal{A}$ be an attacker who sends tuples $(m_0, m_1, \delta)$, and $\mathcal{A}$ wins the game if one of the tuples ...
0
votes
2answers
51 views

Technical term for hash value being uncorrelated to input message?

Is there a technical term for the desirable property of hash functions. That a small change to the input message will produce a massive unpredictable and seemingly uncorrelated change to the output ...
2
votes
2answers
465 views

collisions on hash functions

Why do we say that collision-resistance is a "harder" property than second pre-image for hash functions whereas if you have an attack on the second pre-image then you find a collision ? Moreover, a ...
0
votes
1answer
89 views

is XOR-hash difference-unpredictable

Let $F$ be a PRF. The $XOR\text{-hash}$ is defined as: ...
0
votes
0answers
42 views

What Set and MultiSet Hash allows Secure, Homomorphic, commutative comparison of key-value databases? (Orderless, Online alternative to Merkle trees)

I am interested in Merkle tree like hashes that do not require the data to be ordered, but will hash the data, not the byte by byte, page by page storage but rather hash UNORDERED data (presumably ...
5
votes
2answers
214 views

Proof that MAC and hash composition is insecure

Let $F$ be a secure PRF and $H$ a universal hash function. How can I exhibit a pair $(F,H)$ whose composition $$S'((k_1, k_2), m) = F(k_2, H(k_1,m))$$ is an insecure MAC (or an insecure PRF, since a ...
0
votes
1answer
34 views

messages to break hash modulus 2^n

Let $H_{2^n}(k,m)$ be a hash function where $k$ and $n$ are unknown and $m$ is a message in the format $(m[0], m[1], ..., m[s])$, with $m[i] < 2^n$ for all $0 < i \le s$. Define the hash as: $...
1
vote
2answers
108 views

Does GHASH use XOR or addition?

I've been looking into GHASH and some sites describe it as a polynomial: A1*(H* *M-1)+A2*(H* *M-2)...C1*H(H* *M-N)+C2*H(H* *(M-N-1))...+len(A||C)*H+E(0)=t while ...
-1
votes
2answers
49 views

Encrypt login id in database

I am developing a solution where each user is identified with a social security number (SSN). So they log in with their SSN and a password. I would like to encrypt the SSN somehow (client-side) ...
1
vote
1answer
180 views

Security of XORing hashes vs concatenating

On this question https://stackoverflow.com/questions/5889238/why-is-xor-the-default-way-to-combine-hashes a couple of the answers say that xoring is a bad/insecure choice for combining hashes. However,...
1
vote
1answer
110 views

how hashing algorithm is shared in public key

I am reading about public key working at following linkenter link description here Here picture is provided My question is how hashing algorithm is shared between sender and receiver?
4
votes
2answers
284 views

Benchmark (hash rate) for SHA-3 (SHAKE128)

To estimate the time for brute-force attack we need to compute keyspace size divided by hash rate, where the hash rate (hash/second) varies depending on the computer's capabilities. The website https:...
0
votes
1answer
97 views

Benchmark for SHA-3 (Shake128) [duplicate]

I am trying to find the average of hash rate (benchmark) for SHA-3(Shake128) for a normal and supercomputer in order to estimate the brute-force attack which I can get if from ( keyspace / hash rate )....
-1
votes
2answers
78 views

about DL hash function proof

$$h(m) = g^m(\bmod p)$$ where $p$ is a prime number, how can I prove that this is a one way function and collision free? $$h(m) = g^m(\bmod n) $$ where $n=pq$ for two distinct primes $p,q$, how can I ...
-1
votes
2answers
279 views

(strong) collision resistance Example

I'm studying Cryptography & Network Security. It has the following example for collision resistance: "Suppose Bob writes an IOU message, sends it to Alice, and she signs it. Bob finds two ...
0
votes
0answers
40 views

Implementation of Post-quantum Authenticated Key Exchange from Ideal Lattices

I am implementing the Authenticated Key Exchange from Ideal Lattices on sage maths. On page number 3 the full key exchange scheme is presented. In this key exchange scheme, they are using the Hash ...
2
votes
1answer
64 views

Encrypted Hash vs MAC [duplicate]

I (believe I) am aware of the general difference between a hash and a MAC; the former is used for integrity and the latter for integrity and authentication as it also takes a secret key as an input in ...
1
vote
2answers
72 views

Hashing login and password?

For a login the user credentials are typically some form of "username" and a matching "password". The password is (hopefully) stored as a hash in the database. But what about the username? Is the ...
2
votes
0answers
80 views

Merkle tree to prove integrity of subset of data

I'm thinking up a scheme where a merkle tree is used to ensure integrity of a set of data items, and different parties are allowed to verify the integrity of different subsets of that data. Let's ...
1
vote
2answers
59 views

Can `hash( messageA ) + messageB` be used to determine `hash( concat( messageA, messageB ) )`?

In .NET and other programming platforms all hash functions (such as MD5, SHA256, etc) can be used with streams of bytes, potentially forever - so it isn't necessary to read an entire multigigabyte ...
4
votes
1answer
206 views

How secure is using a hash function as Key Derivation Function?

I am developing a personal project and I have the following need: given a randomly generated seed (with enough entropy) I need to generate a number $x$ of Ed25519 key pairs. These key pairs are not ...
1
vote
2answers
301 views

Rolling your own crypto

I know this is usually frowned upon, but supposing you were to roll your own encryption cipher (completely on your own or with a small group of friends, with no peer review possible), what could you ...
1
vote
0answers
42 views

Hash Function SHA-3 [duplicate]

I would like to discuss the minimum input of hash function to consider strong (e.g Shack128 (SHA-3)). I have a mechanism based on SHA-3, but the input is just 40-bit, some friends told me 40-bit input ...
0
votes
1answer
84 views

Taking $n-1$ bits from hash function will also be hash function?

If $\mathcal{H}=\left(\text{Gen},H\right)$ is a collision resistant hash family does $\mathcal{W}=\left(\text{Gen},W\right)$ where $W_{s}\left(x\right)$ denote the $n-1$ left most bits of $H_{s}\left(...
0
votes
1answer
71 views

MD5 hashing Algorithm

I created a repository on github to write some of the computer security algorithms, and it's time to write MD5 Algorithm, i searched about papers/videos explain the algorithm with examples alongside ...
3
votes
2answers
527 views

Attack MD5 with partial information?

If I generate an MD5 hash from 2 pieces of information – i.e. by concatenating two strings – how easy is it to guess what that hash is, assuming an attacker has knowledge of only 1 piece of those info?...
2
votes
2answers
456 views

Does having a hash of the plaintext compromise the ciphertext?

If I have a SHA512 hash of my plaintext, does it weaken or break the encryption of my ciphertext?
5
votes
1answer
155 views

What is the collision resistance of a 2048-bit hash based on SHA-3?

Let $M$ denote the message. Let $B_i$ denote eight different bitstrings (chosen arbitrarily or randomly) such that $$0 \le \text{length}(B_i) \le 12345678.$$ Consider the following function (it ...
3
votes
1answer
171 views

How is pre-image resistance defined, formally?

Earlier today, forest asked in our chat, The Side Channel whether the definition of first pre-image security actually requires that an input that evaluates to the challenge hash result must be known ...
1
vote
1answer
104 views

Is authentication more computationally expensive than encryption?

newbie in crypto here. I've a application that needs integrity protection. Confidentiality would be nice but has less priority over performance throughput. So I test "openssl speed" on my laptop, and ...
3
votes
1answer
282 views

What is the Common Reference String (CRS) model

I came across the notion of Common Reference String (CRS) model while reading this paper on a protocol for UC Oblivious Transfer: https://eprint.iacr.org/2007/348.pdf I did some research and it seems ...
0
votes
2answers
279 views

Does the double-hash H(H(x)) have greater collision probability than H(x)?

Let $H$ be a collision resistant hash function and $P_c[H](S)$ the collision probability about a sample set $S$ of input elements (eg. random numbers). It increases with double hash? That is, $P_c[H\...
0
votes
2answers
49 views

Does applying resources improve time?

A password hash function is applied 12 times to secure a password. If it takes 21 minutes to brute force one application of the hash with the available resources, how long will it take to brute force ...
1
vote
0answers
35 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 ...
2
votes
1answer
95 views

Hash function for a small, enumerable set of elements

Suppose you have a set of elements, that is relatively small (e.g. 100M) and its elements can be easily enumerated. For example phone numbers, that have a maximum fixed length and they are composed of ...
2
votes
1answer
72 views

Why is modulo being used for congruence in SHA-2 padding when the outcome is always the same?

I am reading up on SHA-2 algorithms and I came across this paper: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf In section 5.2.1 it talks about the formula for padding a message. There ...
4
votes
1answer
58 views

Understanding double hash and 0 block prepending to mitigate length extension attacks

So, reading the chapter about hash functions from the book "Applied Cryptography". There's a point where, as a conclusion, the construction: SHA-X(SHA-X(0^b || m)) ...
0
votes
1answer
72 views

6 Byte for HMAC in wireless system secure?

A wireless system has 8 byte payload and 6 byte for message authentication. Scheme: ...
4
votes
1answer
276 views

Zero Knowledge Proof using hash chains - Is there a flaw in the algorithm?

I came across this blog post http://blog.stratumn.com/zkp-hash-chains/ which provides a ...
1
vote
1answer
67 views

Does public-key + hashing create a security vulnerability?

The title says it all really...let's say I have a packet of data that one of my applications needs to store encrypted with a public key (RSA, say, with the private key kept elsewhere). Let's say the ...
0
votes
1answer
65 views

merkle tree motivation

Here author seems to give overview of merkle trees. However, I have one problem. As in the article author claims you can use merkle trees to verify authenticity of data, e.g. if piece of data is ...
0
votes
2answers
119 views

Security of password hash with known prefix and appendix

Assume I have a password that is exactly 32 characters long. I hash it the following way: Prepend 1524 bytes (known to an attacker) Append 3356 bytes (known to an attacker) Do the checksum It is ...
0
votes
0answers
30 views

Can a hash-input be the same as the hash-output? [duplicate]

Could it be that (i.e. for SHA-2) the hash-output is identical to the input or is this deliberately prohibited by some sort of mechanism?
1
vote
1answer
48 views

Why exactly is a root hash used in relation to hash lists?

Wikipedia has an rticle about hash lists, although I find it technically not very detailed. For example: We could solve same problem by sending (authenticated) hash of each data block, together with ...
24
votes
4answers
12k views

How can hashes be unique if they are limited in number? [duplicate]

I'm curious, how can for example SHA-256 be unique if there are only a limited number of them?! For clarification: how many MD5 hashes are there? $16^{32}$ MD5 hashes can be produced. $16^{64}$ SHA-...