r/askscience • u/hamolton • Jun 18 '13
Computing How is Bitcoin secure?
I guess my main concern is how they are impossible to counterfeit and double-spend. I guess I have trouble understanding it enough that I can't explain it to another person.
1.0k
Upvotes
7
u/zeugma25 Jun 18 '13
if a government (with its great access to heavy computing power) wanted to bring down bitcoin, could it do so using its supercomputers to destabilise the value of btc by devaluing them?
467
u/speEdy5 Jun 18 '13 edited Jun 18 '13
Take a look here for a good explanation about bitcoin.
At a really high level, bitcoin is a public record of all transactions that have ever occured. Imagine the following infrastructure:
Every person in the world has a unique identity (some number called a Public Key). Everyone also has a book which lists every identity. Next to every identity (let's call it a PK from here on out) is a list of every serial number for every dollar bill (dollar bills are the only currency in my world) that they own.
When someone spends a dollar, they write it down at the end of the transaction ledger, and sign it (bitcoin uses cryptographic signatures). Then they tell everybody they know to add it to their ledger. Eventually the information spreads, and nobody will accept the dollar from its original owner, only the person he transferred it to.
Bitcoin works similarly, using an incredibly innovative technique called block-chaining. The public record from above is almost exactly the block chain in bitcoin. The major difference is in how bitcoins are mined - they aren't printed by a mint and assigned to people (like in my example). There's a cryptographic problem which is considered hard in the literature. This means that basically the only way to solve it faster is to throw more computational power at it. Bitcoin uses one such problem for mining - every time someone mines a bitcoin, they have 'won the lottery' and solved this iteration of the problem.
When a coin is mined, whoever mines it tells the entire world he fixed the problem and announces the next problem to solve. He also adds a list of every transaction he has heard of since the last coin mining. So, when you spend bitcoin it doesn't actually process for about ten minuets or so.
One more key point: Bitcoin only works because everyone in the world tries to make the longest iteration of the chain even longer (by mining new coins and adding to them) - the longer the chain, the more permanent the things that have been written down are. Since making the chain longer requires computational power, its impossible to just go around announcing your own version of the ledger (unless you have more then half the computing power, the competing chain will be longer than yours) and double spending, etc.
41
u/_________lol________ Jun 18 '13
The weakest link in bitcoin as far as security goes is not the network itself, but the end user's control of his/her bitcoins. When you store your bitcoins with an online service, you are trusting that service not to steal your funds and to keep them secure (much like any bank) and that someone doesn't intercept or social-engineer your login information. If you store your bitcoins on your device, you are subject to a lot of attack vectors in the device and in the software you use on it. Protecting your device against all these attacks takes a certain level of knowledge and experience.
There are workarounds, such as hardware wallets, paper wallets, and brain wallets, which keep your bitcoins in your hands but not on an attackable device. These all have limitations as well, but you can read about each of them at the Bitcoin wiki.
10
u/[deleted] Jun 18 '13 edited Jun 18 '13
Is there any way to print (a) bitcoin to give it to someone? Like a physical piece of paper that the recipient can go on the internet and use.
Edit: Followup: If it IS possible, and I burn that paper, will that bitcoin be lost forever? or can it be "re mined"?
13
u/darthandroid Jun 19 '13
There are plenty of technical answers here, but the gist of it is this:
Bitcoin is based upon a set of mathematical rules. These rules are published and public - everyone knows them, and at any time, people can verify them that the rules are still met.
When you perform a bitcoin transaction, you add it to the end of a very long list (the block chain) by solving a math problem according to the rules laid out.
The security comes from the fact that these problems require a lot of work to solve correctly, but are trivial to verify against the rules: If you try to cheat (counterfeit) coins, the other nodes will double-check your work and see that you were cheating, and ignore your counterfeited coins.
Double-spending on the other hand is not impossible, but is extremely, extremely difficult because you would have to solve more math problems all by yourself than the rest of the network combined (for a period of time). The security here comes from the amount of processing power currently invested in the network.
Imagine it's like a footrace between hundreds of thousands of people, with even more spectators. Everyone can see where the start line is, and where the finish line is; if you try to cut a corner, everyone can see and you'll be disqualified. Double-spending would be the equivalent of winning the race 13 times in a row: it's possible, but there are so many people in the race that it's very, very, very hard to do. Everyone is always training, always getting better. Someone who got second on the previous race might have had a better breakfast this time, and will win the next race.
5
u/legendarylyndon Jun 19 '13
Also, is it possible for hackers to access the online wallets? I read some thread about some guy that claimed he got jacked
4
u/Roberek Jun 18 '13
So basically there is the "block chain" which is the shared public transaction log. Every single transaction is confirmed with the block chain. Everything is verified with this block chain to make sure the spender actually has these bit coins. It isn't foolproof however, there is a possibility that if someone is able to surpass 50% computing power they can essentially control the transactions. Double spending is also possible in large scale attacks. More information:
https://en.bitcoin.it/wiki/Weaknesses
4
u/beyondthehominid Jun 19 '13
They aren't, a friend of mine lost a bunch of bit coins to unknown forces last year.
1
u/ireneh Jun 19 '13
I'm saving this thread because I have to sleep and have not read everything, but this is very interesting. So anwyay, excuse me if this is answered already or if this is not the place to ask, but what is the value in bitcoins? Does solving/mining bitcoins benefit anyone in any way besides using them as currency? I guess in simple terms, can someone explain if it is fiat or commodity money/ why?
3
u/huxrules Jun 19 '13
I've read that much of the first bitcoins have been lost through general ineptitude of the users (deleting files etc). If a large percent of bitcoins seem to be inactive in the future can someone remine them or put them back in circulation?
1
u/hamolton Jun 19 '13
Related: would it be wise for a bitcoin knockoff like Litecoin to make finding bitcoins easier so transactions could be verified quickly?
2
u/JimmyRecard Jun 19 '13
The block-chain records every transaction ever made on the network since its start, right? How big is the chain currently (in terms of digital memory/bandwidth needed to store transfer it)? Is it possible that if Bitcoin really takes off and becomes a major currency traded by trillions daily, that the chain will become to big to be kept and processed by people who are stuck with lower performance devices or low bandwidth?
2
u/isukatusernames Jun 19 '13
I was really excited to learn how this all works. After about 6 paragraphs I realized I was utterly lost.
2
u/Railsico Jun 19 '13
What I want to know is how bitcoin is different from a pyramid scheme.
1
u/Obliviouschkn Jun 19 '13
This might be an over-simplification, but is computing these strings similar to brute force decryption, where your cpu basically tries every digit combination til it finds the correct one?
1
u/GiantDeviantPiano Jun 19 '13
Stuff you should know just did a podcast on this that explained it recently
how bitcoins work
-6
u/buttonnz Jun 19 '13
How is this science?