handouts/ho08.tex
changeset 426 6d13b8da019e
parent 371 690d778b9127
child 428 39fa24c5d85e
equal deleted inserted replaced
425:4a0bff167159 426:6d13b8da019e
     1 \documentclass{article}
     1 \documentclass{article}
     2 \usepackage{../style}
     2 \usepackage{../style}
     3 \usepackage{../graphics}
     3 \usepackage{../graphics}
     4 \usepackage{../langs}
     4 \usepackage{../langs}
       
     5 \usepackage{../data}
       
     6 
     5 
     7 
     6 \begin{document}
     8 \begin{document}
     7 \fnote{\copyright{} Christian Urban, 2014}
     9 \fnote{\copyright{} Christian Urban, 2014, 2015}
     8 
    10 
     9 \section*{Handout 8 (Bitcoins)}
    11 \section*{Handout 8 (Bitcoins)}
    10 
    12 
    11 In my opinion Bitcoins are an elaborate Ponzi
    13 In my opinion Bitcoins are an elaborate Ponzi
    12 scheme\footnote{\url{http://en.wikipedia.org/wiki/Ponzi_scheme}}---still
    14 scheme\footnote{\url{http://en.wikipedia.org/wiki/Ponzi_scheme}}---still
   395 leading zeros a hash-value has, but rather whether it is below
   397 leading zeros a hash-value has, but rather whether it is below
   396 a \emph{target}. The hardness of the puzzle can actually be
   398 a \emph{target}. The hardness of the puzzle can actually be
   397 controlled by changing the target according to the available
   399 controlled by changing the target according to the available
   398 computational power available. I think the adjustment of the
   400 computational power available. I think the adjustment of the
   399 hardness of the problems is done every 2060 blocks
   401 hardness of the problems is done every 2060 blocks
   400 (appr.~every two weeks). I am not sure whether this is an
   402 (appr.~every two weeks). The aim of the adjustment is that on
   401 automatic process. The aim of the adjustment is that on
       
   402 average the Bitcoin network will most likely solve a puzzle
   403 average the Bitcoin network will most likely solve a puzzle
   403 within 10 Minutes. 
   404 within 10 Minutes. 
   404 
   405 
   405 \begin{center}
   406 \begin{center}
   406 \includegraphics[scale=0.37]{../pics/blockchainsolving.png}
   407 \includegraphics[scale=0.37]{../pics/blockchainsolving.png}
   528 amassing such an amount of computing power is practically
   529 amassing such an amount of computing power is practically
   529 impossible for a single person or even a moderately large 
   530 impossible for a single person or even a moderately large 
   530 group.
   531 group.
   531 
   532 
   532 Connected with the 6-confirmation rule is an interesting
   533 Connected with the 6-confirmation rule is an interesting
   533 phenomenon. On average, it would take several years for a typical
   534 phenomenon. On average, it would take several years for a
   534 computer to solve a proof-of-work puzzle, so an individual’s chance of
   535 typical computer to solve a proof-of-work puzzle, so an
   535 ever solving one before the rest of the world, which typically takes
   536 individual’s chance of ever solving one before the rest of the
   536 only 10 minutes, is negligibly low. Therefore many people join groups
   537 world, which typically takes only 10 minutes, is negligibly
   537 called \emph{mining pools} that collectively work to solve blocks, and
   538 low. Therefore many people join groups called \emph{mining
   538 distribute rewards based on work contributed. These mining pools act
   539 pools} that collectively work to solve blocks, and distribute
   539 somewhat like lottery pools among co-workers, except that some of
   540 rewards based on work contributed. These mining pools act
   540 these pools are quite large, and comprise more than 20\% of all the
   541 somewhat like lottery pools among co-workers, except that some
   541 computers in the network. It is said that BTC, a large mining pool,
   542 of these pools are quite large, and comprise more than 20\% of
   542 has limited its number of members in order to not solve more than 6
   543 all the computers in the network. It is said that BTCC, a
   543 blocks in a row. Otherwise this would undermine the trust in Bitcoins,
   544 large mining pool, has limited its number of members in order
   544 which is also not in the interest of BTC, I guess.  Some statistics on
   545 to not solve more than 6 blocks in a row. Otherwise this would
   545 mining pools can be seen at
   546 undermine the trust in Bitcoins, which is also not in the
       
   547 interest of BTCC, I guess. Some statistics on mining pools can
       
   548 be seen at
   546 
   549 
   547 \begin{center}
   550 \begin{center}
   548 \url{https://blockchain.info/pools}
   551 \url{https://blockchain.info/pools}
   549 \end{center}
   552 \end{center}
   550 
   553 
   551 \subsubsection*{Bitcoins for Real}
   554 \subsubsection*{Bitcoins for Real}
   552 
   555 
   553 Let us now turn to the nitty gritty details. As a participant in the
   556 Let us now turn to the nitty gritty details. As a participant
   554 Bitcoin networ you need to generate and store a public-private key
   557 in the Bitcoin network you need to generate and store a
   555 pair. The public key you need to advertise in order to receive
   558 public-private key pair. The public key you need to advertise
   556 payments (transactions). The private key needs to be securely stored.
   559 in order to receive payments (transactions). The private key
   557 For this there seem to be three possibilities
   560 needs to be securely stored. For this there seem to be three
       
   561 possibilities
   558 
   562 
   559 \begin{itemize}
   563 \begin{itemize}
   560 \item an electronic wallet on your computer
   564 \item an electronic wallet on your computer
   561 \item a cloud-based storage (offered by some Bitcoin services)
   565 \item a cloud-based storage (offered by some Bitcoin services)
   562 \item paper-based
   566 \item paper-based
   563 \end{itemize}
   567 \end{itemize}
   564 
   568 
   565 \noindent The first two options of course offer convenience for making
   569 \noindent The first two options of course offer convenience
   566 and receiving transactions. But given the nature of the private keys
   570 for making and receiving transactions. But given the nature of
   567 and how much security relies on them (recall if somebody gets hold of
   571 the private keys and how much security relies on them (recall
   568 it, your Bitcoins are quickly lost forever) I would opt for the third
   572 if somebody gets hold of it, your Bitcoins are quickly lost
   569 option for anything except for trivial amounts of Bitcoins. As we have
   573 forever) I would opt for the third option for anything except
   570 seen earlier in the course, securing a computer system that it can
   574 for trivial amounts of Bitcoins. As we have seen earlier in
   571 withstand a breakin is still very much an unsolved problem.
   575 the course, securing a computer system that it can withstand a
       
   576 targeted breakin is still very much an unsolved problem.
   572 
   577 
   573 An interesting fact with Bitcoin keys is that there is no
   578 An interesting fact with Bitcoin keys is that there is no
   574 check for duplicate addresses. This means when generating a
   579 check for duplicate addresses. This means when generating a
   575 public-private key, you should really start with a carefully
   580 public-private key, you should really start with a carefully
   576 chosen random number such that there is really no chance to
   581 chosen random number such that there is really no chance to
   648 unexpected ways. You probably have heard about, or even used,
   653 unexpected ways. You probably have heard about, or even used,
   649 Amazon's Elastic Compute Cloud (EC2). Essentially, Amazon is
   654 Amazon's Elastic Compute Cloud (EC2). Essentially, Amazon is
   650 selling computing power that you can use to run your web site,
   655 selling computing power that you can use to run your web site,
   651 for example. It is \emph{elastic} in the sense that if you
   656 for example. It is \emph{elastic} in the sense that if you
   652 have a lot of visitors, you pay a lot, if you have only a few,
   657 have a lot of visitors, you pay a lot, if you have only a few,
   653 then it is cheap. In order to bill you they, you need to set
   658 then it is cheap. In order to bill you, you need to set
   654 up an account with Amazon and receive some secret keys in
   659 up an account with Amazon and receive some secret keys in
   655 order to authenticate you. The clever (but also dangerous) bit
   660 order to authenticate you. The clever (but also dangerous) bit
   656 is that you upload the code of your web site to GitHub and
   661 is that you upload the code of your web site to GitHub and
   657 Amazon will pull it from there. You can probably already guess
   662 Amazon will pull it from there. You can probably already guess
   658 where this is going: in order to learn about Amazon's API, it
   663 where this is going: in order to learn about Amazon's API, it