A length extension attack on a hash or message authentication code function, which allows extra information to be added to the input message without changing the output value.

learn more… | top users | synonyms

0
votes
0answers
39 views

MD5 - Length extension

I am currently trying to get a working understanding of MD5 length extension. I have been following the first exercise located here: https://www.cis.upenn.edu/~cis331/proj1.pdf (it looks like the ...
0
votes
0answers
38 views

Find SHA256(secret||data) using SHA256(secret) and data

I need to find the SHA256 hash of s string like this: "part1-part2". I know the SHA256(part1), length of part1 and I know part2, but I don't know what is the contents of part1. Is there any chance I ...
1
vote
1answer
38 views

Do I need to use null bytes and \x80 in hash length extension attack?

Say I want to perform a hash length extension attack. All the tools I have used use \x00 and \x80 to pad hashes (hlextend and hashpump). But is it necessary to use these bytes? Based on my ...
0
votes
0answers
30 views

Length extension attacks or prefix attacks on HMAC

Why HMACs are not vulnerable to length extension attacks or prefix attacks? (As commented by @codesinchaos, That's a different construction. So it's related, but no duplicate of Why is ...
3
votes
1answer
48 views

What are fixed points and length extension attack in hash functions?

I was recently reading about hash functions, and I came across fixed points (one or more fixed points, interested in both) and length extensions, but I didn't exactly understand how these work. If ...
4
votes
1answer
59 views

Does length-prepending stop length-extension attacks?

Does length-prepending stop length-extension attacks on Merkle-Damgård hash functions, assuming that the length is checked?
0
votes
0answers
17 views

Length Extension Attack on SHA1 [duplicate]

I am trying to understand how to perform a length extension attack on a SHA1 hash function that is used as a MAC (where the key is prepended to the hash output). If I am given the message, ...
4
votes
1answer
102 views

How does the Flickr length extension attack work?

I am currently reading about the length extension attack on Flickr (pdf) but not understanding what's going on there. ...
2
votes
2answers
250 views

Keyless integrity checking with SHA-256

Currently a program is loading some files from an untrustworthy source (e.g. a CDN) which could have been tampered with. It has a known SHA-256 hash of the file stored locally, then it downloads the ...
9
votes
1answer
333 views

Why isn't outputting only a portion of the hash state a simple defense against length extension attacks?

As I understand length extension attacks, they depend on the coincidental property of most cryptographic hash functions that the hash value is exactly the hash function state after hashing the last ...
20
votes
3answers
1k views

Purpose of outer key in HMAC

From what I know, the HMAC constructions has two strength: It's resistant to length extensions Since the key is consumed before the message, the attacker does not know the initial state, preventing ...
2
votes
1answer
152 views

Hash length extension attack - SHA256 to 512 - impossible, correct?

Just want to be sure about something before I sign off on a method we're about to put into place. We have a secret, to which a user-defined key is appended. The user can see the SHA256 hash of the ...
1
vote
1answer
147 views

Solve a problem, thought it was hash length extension, hours later, am I wrong?

Here is my situation. I'm working with an application for which uses hashing to authenticate data. I have a string, which is hashed. It is, like in a hash length extension attack, H(key:known_value) ...
0
votes
1answer
439 views

What is the exact purpose of length padding in Merkle–Damgård hash functions? [duplicate]

Is a length padding technique in a hash function used to avoid length extension attacks ?
2
votes
1answer
657 views

CBC-MAC length extension attack with IV simulation

I'm doing Matasano's challenges and struggling with second part of 49th problem where I'm asked to do the length extension attack with CBC-MAC without IV manipulation. There is a hint that I can ...
2
votes
1answer
93 views

Is concatenated data hashed with scrypt vulunarable to a length extension attack?

scrypt takes a salt, and a password plus some cost paramters to generate a key. So say we define it as this: key = scrypt(password, salt, cost) I am interested ...
6
votes
1answer
2k views

How does the secret key in an HMAC prevent modification of the HMAC?

Just as a preface: I'm not implementing a HMAC - I just want to understand it, as it is part of of my Computer Science course. When using Hash-based message authentication codes, I understand that ...
0
votes
0answers
86 views

Why is Merkle-Damgård construction insecure? [duplicate]

I've been reading about SHA-1. I read that SHA-1 is insecure as it uses the Merkle-Damgård construction and the Merkle-Damgård construction is — according to Wikipedia — susceptible to a variety of ...
5
votes
1answer
801 views

Why is H(message||secret_key) not vulnerable to length-extension attack?

Given a Merkle-Damgård hash function $H$, I know that an attacker can forge a message protected by a MAC computed as $H(\textrm{secret_key}||\textrm{message})$. Why can't he perform the same ...
5
votes
1answer
333 views

md5: is reverse length-extension attack possible?

If I know H = md5( SECRET_KEY | DATA ) then I can calculate H' = md5( SECRET_KEY | DATA | DATA' ) That's length-extension ...
2
votes
0answers
131 views

Is it possible to derive the midstate of a sha256 hash?

Let's say I have an unknown string with the known sha256-hash of it. I was wondering if it was possible to now calculate the sha256 of the concatenation of the unknown string and "abc". (In PHP: ...
21
votes
2answers
7k views

understanding a length extension attack

I have been trying to understand exactly how a length extension attack works on SHA-1. I'll detail below what I've understood so far, so that I can convey my understanding of the same and hopefully ...
2
votes
1answer
601 views

length extension attack on an MD5 hash of a text file of about 10K Bytes?

How much computing time on a typical desktop computer would it take to find a new length and new data to extend a text file of about 10K Bytes with a given MD5 hash?
2
votes
0answers
40 views

Will length-extension work if secret is not prefixed but appended to the data? [duplicate]

Possible Duplicate: Why is h(m||k) insecure? Length-extension allows to append any data to the message while not knowing the secret. Any length-extension explaination one the web considers ...
4
votes
2answers
216 views

Is a random length-extension worth the effort?

I'm conceiving an application that uses cryptographic tools and concepts for securing data. I know that's difficult and risky, therefore I prefer to ask around before implementing anything. When ...
7
votes
1answer
1k views

In which situations is a length-extension attack a problem?

A lot of hash functions, including the SHA-2 family(but not the SHA-3 candidates and SHA256d) are vulnerable to length extension attacks. But when is this property a problem? I guess certain naive ...