# How do P2P clients like uTorrent maintain authenticity of files?

I am very new to concepts of cryptography so bear with me and feel free to fill in any information that may seem obvious but something you think someone may not know.

At first I was under impression that people use checksums to determine if files are legit or not. Which didn't make sense for obvious reasons… for example it's not hard to get the same sum for different numbers. So all a hacker has to do is make a file with smaller sum and then fill in the rest with garbage that way file would have equivalent checksum, but completely different content. Then later on, I found out that a checksum isn't used at all for this purpose.

So, what is used instead? I’ve been reading that some asymmetric functions are used and that files are encrypted using the destination's public key.

But I am unable to wrap my head around it and say* “ok, this will work in P2P”*.

Let’s say there are files $A$, $B$, $C$ among 10 seeders and I am the receiver. And chunks of them are being sent. How does uTorrent make sure that the chunk received is the chunk it should be getting. Sometimes there is only 1 seeder. So the option of checking what most people have is out of the question…

Thinking about it ,I am not sure how uTorrent or P2P clients really work after all.

For example:

• Does each torrent file has some unique ID? If, how is it generated?
• Am I correct to believe that all torrents connect to a server to get the list of all other people?
-
people use checksum I'm afraid you've got this wrong. Torrents use hashsums, or as they are better known, cryptographic hash functions. I'm not familiar with the inner workings of the protocol but making such a forgery, much less in a way that the resulting file could be passed as valid to a human, is a highly non-trivial task. – rath May 22 '14 at 16:57
For the rest of the question I think this and similar articles would be of help. – rath May 22 '14 at 17:01
I know it was wrong and didn't make sense...And finally i am getting somewhere.."hashsums" a lead to wonderland :D thanks. – Muhammad Umer May 22 '14 at 17:03
thanks for the edit – Muhammad Umer May 22 '14 at 17:12