As we've been discussing things about Bitcoins, I'd like to know more (or I'd say an in-depth as well as detailed) analysis about the 51% attack. Can anyone here explain me that how it could actually affect the whole network and how it makes the whole thing centralized? The times when we witnessed even $100 as transaction fees should be considered as such attacks only that might have taken place to rise the value of fees to such incredible levels? Is there anything to prevent such attacks when quantum computing takes place? I know that quantum computing will just give the power to the institution to grab the privkeys directly, still if they want to go the ^legal^ way, can they ruin it for everyone?
When you have more than 50% of the hashrate, you make more than 50% of the blocks. That means, your chain of blocks will always been the longest. Since the network generally trusts the longest chain, the blocks of all other miners can't compete against you. Therefore you can manipulate the chain long enough to fabricate your own transaction history and trick nodes into thinking that an amount you already spend is still unspend and thus you can run a double-spend attack (the very thing the blockchain is supposed to prevent).
The network is still decentralized but in a dysfunctional way, means your miner will control the whole blockchain no matter what everyone else on the network claims.
Quantum computers can run multiple guesses parallel and that enables them to guess a private key to an address with no effort at all. If quantum computers exist, all hashing and encryption methods that are industry standard today become useless. However when that happens, we need quantum resistant algorithms anyhow everywhere on the internet and Bitcoin can implement one of these algorithms too. Quantum computers can steal your coins by just guessing your private key if they know your public address, since every public address is generated from a private key. It's an one-way function that means, calculating a public key from a private is simple but the other way around is extremely difficult, however quantum computers can do it by just trying in literally no-time.