I googled about this term but I am still not able to understand what collisions are. Can you explain a real example for a begginer ? People are losing money because of that? Any cryptocurrency protected against that?
Bitcoin IS protected against collisions (as far as we know).
To understand this a bit better we need to look into the bitcoin protocols:
1. A bitcoin address is the hash of the private key.
2. The private key is the only thing that controls the money on the network.
If we imagine a bitcoin address is a number from 1 to 1000000 (for example) and a private key is 1 to 1000000000000. The modulus of an address max (the division after a remainder) is considered the hash.
Say a private key of 1000000000001
The modulus of this with 1000000 = 1
The modulus of the private key 1100000000001 with 1000000 would also spit out a remainder of one. That's a collision and it's a big issue when it happens.
Bitcoin uses a hashing algorithm of SHA256 which is still considered computationally secure/collision free (as far as I know).
When funds are sent, they're sent to an address. If two addresses match, BOTH private keys can spend the funds. As miners only have the address to hash when an input is signed. Therefore, this causes a huge issue if a collision gets found.
Something that is mistaken as a collisions is a mutual generation of the SAME private key and it's normally due to bad number generation (either intentional or accidental). It is partly the reason why things such a vanity addresses (where you try to get a specific address by mining for it through multiple ones that follow the same protocol rules) are considered less secure than regular RANDOM addresses.