LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   md5sum (https://www.linuxquestions.org/questions/linux-newbie-8/md5sum-843430/)

saurabhpandey39 11-10-2010 07:00 AM

md5sum
 
i have a file and i want to change the content of file but i also want that md5sum of that file remains same.
is it possible?
if yes then send me the procedure.

H_TeXMeX_H 11-10-2010 07:05 AM

Yes, it is possible, but it's a hack, and I suspect malevolent intent, so no I will not help. Unless, you say what you need it for.

saurabhpandey39 11-10-2010 02:12 PM

md5sum
 
i just want to know how it can be done.
i have no intention to do anything wrong.
so please tell me how i can do it.

honeybadger 11-10-2010 03:16 PM

Umm... if you say that then I am in trouble. I have my debian 4 connected to the internet and all I am betting on is the md5sum that I check ocassionally. So far I do not think there is anything wrong with my pc. I can install tripwire but then I suppose it is too late. Any suggestions for me?

martinbc 11-10-2010 04:12 PM

Well one way could be to add 128bits to the end of the file and then try every combination possible in those 16 bytes performing md5sum on each until it produces the right value.

Might take a few days though!

honeybadger 11-10-2010 04:22 PM

@Martinbc, sorry but I am not that fluent in Linux:). Can you simplify the answer please?

hilyard 11-10-2010 10:50 PM

I thought I detected sarcasm there, maybe in both posts! LOL

mlangdn 11-10-2010 10:59 PM

You would think he/she could make up an example.

saurabhpandey39 11-11-2010 11:01 AM

md5sum
 
if anyone know what i asked then please tell me with a example on linux or windows

H_TeXMeX_H 11-11-2010 11:09 AM

If you don't intend to do something bad with it, why don't you say what you need it for ?

saurabhpandey39 11-12-2010 10:19 AM

md5sum
 
i told u that it is just for my knowledge and nothing more
so if u know please tell me
or send it to my mail

honeybadger 11-12-2010 04:34 PM

I hope I did not offend anyone with saying something I did not really mean.
@martinbc I apologise if somehow I said something that was rude or offensive. I did not mean it.
I speak, write and understand four languages... and english is in someway my fourth language so please bear with me. Adding to it is the complication that all I have is a mobile (a very basic one) to post so it is that somehow I have only a limited screen space that I can see and I have to pack everything in very small place.
I am not a programer neither will I ever be but then I love the philosophy of linux and so I will stick around for perhaps my lifetime. So making some people like you all my enemies is something I am not really willing to do.
Sorry again if sarcasm was detected - I did not mean it.

martinbc 11-12-2010 04:54 PM

Hi SilverBack

I took no offence to anything you said and did not think you rude.
I wish I had the knowledge, intelligence, skill and patience to master four languages. What talent I have is in a different direction.
If there was any misunderstanding, it comes from me not making it obvious that the suggestion was not a serious one.

Your friend

Martin


I haven't done a calculation but I doubt there is enough coal and oil on this planet to power the computers long enough to solve the problem in the inefficient way I suggested. It would certainly give rise to a very high electricity bill.;)

honeybadger 11-12-2010 05:11 PM

@martinbc - thanks that is really appericiated. Getting back to me was very polite. Thanks again.
BTW: I speak with my wife in one language and then with family (joint family) a different one, at work english ofcourse and with my sister-in-law and her family another one. And I have to it on a daily basis :)

AnanthaP 11-12-2010 07:11 PM

I wonder
Quote:

I thought I detected sarcasm there, maybe in both posts! LOL
hGiven that it is common knowledge that practically, changing a message will result in a different digest, may be the poster should clarify which two posts seem sarcastic.

To the OP. It is not possible unless you cheat the system - by hard-coding the output - irrespective of the computed result.

I give you the following reference from wikipedia: http://en.wikipedia.org/wiki/Md5sum

and quotes from it:
Quote:

md5sum is a computer program that calculates and verifies 128-bit MD5 hashes, as described in RFC 1321. The MD5 hash (or checksum) functions as a compact digital fingerprint of a file. It is extremely unlikely that any two non-identical files existing in the real world will have the same MD5 hash
OK.


All times are GMT -5. The time now is 05:25 AM.