Is md5(x)&md5(y&x) secure?

I was wondering if the following hash function

f(x) := md5(x) & md5('abc'&x)

(with & as concatenation operator) is secure.

This schema can be even extended like this:

g(x) := md5(x) & md5('abc'&x) & md5('def'&x)

To find a collission in f(x), following requirements would be met:

f(x)=f(x'), x!=x' <==> md5(x)=md5(x') ^ md5('abc'&x)=md5('abc'&x')

or

g(x)=g(x'), x!=x' <==> md5(x)=md5(x') ^ md5('abc'&x)=md5('abc'&x') ^ md5('def'&x)=md5('def'&x')

Is this realistic that such a condition can be found? I can't imagine that.

[I would be happy to learn more about the math behind it]

migrated from security.stackexchange.comOct 24 '15 at 20:58

This question came from our site for information security professionals.

• I agree with @NeilSmithline. My response, and probably the response of others is going to be "just avoid using MD5 and any constructions using MD5." But crypto.SE can better respond to the math part. – HexTitan Oct 24 '15 at 17:06
• For collision resistance, this question reduces to Are there MD5 collisions for inputs of different length? – CodesInChaos Oct 24 '15 at 21:57
• @CodesInChaos, how so? Does not seem like different-length collisions would be required (or immediately helpful) for breaking this. – otus Oct 25 '15 at 10:59