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 predict the output for a given input, find two inputs with the same output, or reconstruct the input from the output.

learn more… | top users | synonyms (2)

0
votes
1answer
80 views

Why does TLS 1.2 use GCM with additional SHA hash? [duplicate]

I am studying the cipher suites provided by TLS 1.2 and found an interesting question. TLS 1.2 adopts GCM for encryption and SHA256 or SHA384 for hash (e.g. TLS_RSA_WITH_AES_128_GCM_SHA256). But, GCM ...
1
vote
1answer
319 views

SHA256: Padding a 512 bits length message

I am currently implementing the SHA256 hash-algorithm for a "custom-built" embeded-device. Obviously I have a problem with message padding. The routine I wrote does not work with message whose size ...
0
votes
2answers
88 views

The benefit of PBKDF2 for big keyfile?

The man page of cryptsetup says: Whenever a passphrase is added to a LUKS header (luksAddKey, luksFormat), the user may specify how much the time the passphrase processing should consume. The ...
3
votes
3answers
851 views

For any hash value, is there an infinite number of inputs that hash to it?

Bruce Schneier writes (back in 2005) in a post on cryptanalysis of SHA-1: SHA-1 produces a 160-bit hash. That is, every message hashes down to a 160-bit number. Given that there are an ...
2
votes
1answer
268 views

Testing hash functions for collision resistance

I was hoping to implement a software that allows testing a user-defined hash function for cryptographic properties (Meant to pique interest in cryptographic hash function for a school showcase), as ...
1
vote
2answers
162 views

MD5 Collision Attack Explained

In one of my assignments, I came across this line Due to MD5’s length-extension behavior, we can append any suffix to both messages and know that the longer messages will also collide. This lets ...
-1
votes
1answer
100 views

About end to end algorithm SMS from Jo Mehmet Sollihagen Øztarman [closed]

This is a signcryption scheme from End-to-End Data Protection of SMS Messages by Jo Mehmet Sollihagen Øztarman (pdf, section 4.3.1): Public parameters C: an elliptic curve over GF(ph) with p ≥ 2^...
4
votes
1answer
108 views

Effect of message length on collision attacks

I know that message collisions are supposed to be hard to calculate for a good cryptographic hash. Given 1k worth of data, it's hard to find another 1k worth of data that collides with the same hash. ...
2
votes
1answer
99 views

Are there full cycle cryptographic/one-way hash primitives?

I'm looking for behavior similiar to that of LCGs, (i.e. input and output sizes are same). Full cycle of $2^{32}$ different inputs generates full cycle of $2^{32}$ different outputs, distribution of ...
1
vote
1answer
76 views

Encrypt hash using hash of hash?

I wonder what is wrong with this scheme for authentication. Server sends random challenge, C Client returns (C, B(P)) encrypted in H(B(P)) where B(P) is high work factor salted hash of the user ...
2
votes
2answers
115 views

How does perfect hash function works?

According to wikipedia, a perfect hash function is a hash function that uses algorithms that has a certain random aspect to their logic. It is suppose to be collision-free. However due to the pigeon ...
40
votes
1answer
4k views

What is a “freestart collision”?

In their work on SHA-1 collisions (cf. the EUROCRYPT-2016 paper “Freestart collision on full SHA-1” by Stevens, Karpman, and Peyrin) Stevens et al show that they are able to generate "freestart ...
0
votes
1answer
308 views

Computing the padding of MD5

So I'm reading this question to learn more about length extension attack, and I want to make sure I understand the basics of padding. It says in the post that given the hash and the length of the ...
1
vote
1answer
55 views

Hash functions vs. keyed hash functions in the context of private key generation

I'm designing a key distribution mechanism and have thought of using a securely generated/acquired private key as a seed for a sequence of private keys to be distributed to a number of users using a ...
1
vote
1answer
39 views

For the scrypt HMAC storage format, why run the input of the hash and the hash itself into the HMAC

Generally if the body is hashed, why provide the body and the hash as input into the HMAC. Instead wouldn't the same security be achieved by hashing the body and providing only the hash as input into ...
0
votes
0answers
72 views

MD5 SSL Collision Attack

I want to create fake certificate for test purposes. I have read about the http://marc-stevens.nl/p/hashclash/index.php project but I am unable to understand the two files that I have to put as input ...
3
votes
0answers
137 views

Are there MD5 collisions for inputs of different length?

There are many examples of MD5 collisions (some of them can be found here Are there two known strings which have the same MD5 hash value?). But as far as I know two inputs should have the same length ...
4
votes
1answer
203 views

How have MD5 constants been determined?

For instance, the per round shift amounts, ...
1
vote
1answer
277 views

SHA-256 “almost unique”?

I have seen numerous references on the internet of people describing SHA-256 as generating an "almost unique" hash. Exhibit A. there are more. Is there some mathematical basis to the almost ...
0
votes
0answers
30 views

Is a timing side channel attack effective when the leaked information is related to the result of a hash?

I'm writing a function to act as a cryptographic hash of a number within a range that returns another number of the same range. The catch is that the result needs to have certain properties. I run a ...
8
votes
4answers
542 views

Can an encryption method be used as a hash function?

As I understand, there are a few requirements for a good hash function. Hard to find any message from a given hash Hard to find any 2 messages which give the same hash A single bit change in the ...
8
votes
1answer
279 views

Quantum on hash

Perhaps this has been answered before. Grover's algorithm should result in a 256 bit hash being complexity 128 bits to crack. I was wondering, what if you had a 512 bit hash , and xor'd the lower 256 ...
0
votes
2answers
181 views

If I compute the SHA-1 of all possible 40 digits hexadecimal strings, will I get all possible sha1 hashes? [duplicate]

Wikipedia says sha1 produces a 160-bit (20-byte) hash value. So if I compute the SHA-1 of all possible SHA-1 values, which as far as I understand is at current time impossible both to calculate and ...
2
votes
0answers
151 views

Bobcat hash, trying to find a 48-bit hash collision for x

I am trying to find a collision with the Bobcat hash of the 48-bit hash. I am a beginner coder so please point out any flaws in my modification of the bobcat program. It does find a truncated 12-bit ...
3
votes
1answer
131 views

Encrypt a message with hash function, shared symmetric key, but no cipher

I am very new to Crypto and need some clarification or input. The question is: Suppose that Alice wants to encrypt a message for Bob, where the message consists of three plaintext blocks, $P_0$, $...
3
votes
2answers
137 views

How does DSA provide non-repudiation in proving a document was properly displayed (not altered or displayed incorrectly)?

I am building an iOS app that allows the user to sign a document served to them by a web server. So that page of the app simply has a document in the top pane, and at the bottom pane, a place to sign ...
4
votes
1answer
95 views

Are shorter password hashes safe?

How much can I shorten a password hash before it begins to impact security? Suppose that I use PBKDF2 (correctly salted) with HMAC-SHA256 as the PRF. From what I've seen, it's typical to use 256 ...
7
votes
2answers
133 views

Would it matter if my miner was hashing random vs incremental values?

I'm working on my miner for my "game" site that's basically a pre-image attack from a hash posted online. You submit a hash input, it's hashed, and your score is the hamming distance (the number of ...
1
vote
3answers
101 views

Cryptographically linkable random tokens

Are there any algorithms/protocols that let you produce a specific length of random tokens/bits in such a way that you can cryptographically determine which 2 or more tokens/bitstrings where produced ...
1
vote
0answers
36 views

If I know the hash function that produced a hash key, how easily can I generate an input to hash to the same key? [duplicate]

The title is pretty descriptive of my question. As an example, say I use the MD5 hash function to create a hash key of the word "hello": 5d41402abc4b2a76b9719d911017c592. There are two questions I ...
1
vote
3answers
344 views

Why can't we use a hash with no collision to compress data reliably?

According to wikipedia, a hash maps digital data of arbitrary size to digital data of fixed size. For all practical measures, a hash is a unique signature of a big chunk of data. But there is such a ...
2
votes
0answers
94 views

Is there a way to slow down collision attacks using iteration?

The simple way to iterate a hash function $H(H(m))$ only makes brute force preimage finding slower, but leaves collision attacks as fast since a collision in the inner hash function is a collision in ...
5
votes
2answers
290 views

When is the Random Oracle model (not) necessary?

Hash functions are often used in cryptographic schemes and protocols, and that doesn't necessarily mean that their proofs are on the Random Oracle model. That leads to the following question: What is ...
3
votes
2answers
68 views

Hiding identifying data while allowing matching?

I do research with people about their illegal drug use, and for one project I'm doing surveys with them when they visit a needle exchange. So over time the same people get repeatedly surveyed as they ...
0
votes
0answers
29 views

Is it bad practice to use the message digest of the plaintext as the initialization vector? [duplicate]

Data is being encrypted in a database. A message digest is being created for deduplication purposes. Is it ok to use the message digest that will be the key of the table that houses the encrypted ...
0
votes
1answer
157 views

1024 RSA Hash Signature attack. Forge a valid signature

I have an RSA signature of 1024 bit where i know the following: Public modulus N Public exponent (0x03) Cypher message Summary: An MD5 hash is calculated from a collection of byte and is used as ...
2
votes
1answer
83 views

Crypto-period for keys used in PRF

I am wondering about the crypto-period for keys used in pseudo-random functions. For example, let's say I am using HMAC-SHA256 with a secret key $K$. After how many computes do I have to update $K$?
3
votes
1answer
126 views

What is tiger192,4 in PHP?

PHP supports hashing of the following Tiger algorithms: tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 Wikipedia's entry on Tiger says there's Tiger and Tiger2 and provides ...
5
votes
2answers
959 views

What are the strenghts and weaknesses of Whirlpool Hashing Algorithm

I want to find out if the Whirlpool hashing algorithm have any weaknesses. There are quite a bit of articles explaining the strengths of this algorithm, but for some reason I cannot find any on its ...
2
votes
1answer
64 views

Using Skein as PRNG

I have read that the Skein hash can be used for quite a few different functions, including a PRNG. Would using the 1024 Skein hash to return 16KB of data be appropriate for a PRNG? Or would it only be ...
1
vote
0answers
70 views

Can a block cipher encrypt the message to itself (plaintext equal to ciphertext) [duplicate]

The result of the cipher should be indistinguishable from random, but can it happen that cipher produces the ciphertext that is equal to the plaintext as it also lies in the corresponding space? I ...
2
votes
1answer
727 views

Are there ANY text strings that will generate the same SHA-512 Hash output? [duplicate]

Are there ANY text strings that will generate the same SHA-512 Hash output? Please provide an example, and how you came to that conclusion. I've tried thousands of variations, including ".." vs. "." ...
4
votes
2answers
100 views

A periodic PRNG based on hash function?

I need a PRNG which provides 128 bytes numbers. Let's say that given a symmetric key $K$ and an internal state $s$ I use the PRF HMAC-SHA512 this way: The output is PRNG($K, s$) = HMAC-SHA512$_K$($s$...
5
votes
1answer
258 views

Can iterated hashing be used to mitigate collision and preimage weaknesses?

How much security does double hashing add regarding collisions and preimages? Is it helpful to iterate a hash function even more times than two? For example, can MD5 be fixed (in practice) by ...
9
votes
1answer
158 views

What was the NSA's reasoning for making their bitwise combination functions in SHA-1 the way they did?

I know that these functions are there to actually make the program work. What I want to know is why they made the functions one way but not another. For example, why did they pick F1(B, C, D) = (B ...
2
votes
1answer
87 views

Possible to determine equivalence of hash codes from different hashing functions?

Let $H_{1}(x)$, $H_{2}(x)$, ..., $H_{n}(x)$ be a list of $n$ secure one-way hash functions such that for a given input $x$ each $H_{i}(x) \neq H_{j}(x)$ when $i \neq j$. Give one hash function to ...
3
votes
2answers
147 views

Combine two sha512 hashes to a single hash

Assume I have two data fragments: $Frag_1$ and $Frag_2$. I can build sha512 hashes the usual way with $SHA512(Frag_1)$ and $SHA512(Frag_2)$ and then hash the two fragments appended to each other: $$...
2
votes
2answers
200 views

How to formally prove that a given hash construction is collision resistant or not?

Is there a precise procedure or strategy to follow in order to prove in a formal way the (not) collision-resistance of a certain given hash construction? I.e. let $H_1$ and $H_2$ be two hash functions,...
2
votes
1answer
96 views

How does the small n attack work?

I'm studying the Lamport's Hash one-time password scheme. This is the scheme: Alice wants to authenticate herself to Bob from a workstation that knows nothing about her. Alice only knows her ...
2
votes
1answer
111 views

Hash and salt or salt and hash?

People say "hash and salt", but aren't you supposed to salt password the first, and then hash it? So that means its called "salt and hash" right?