slides/slides08.tex
changeset 561 17cd7fdee7c8
parent 520 bd25d9f9d9dc
child 562 69580b23c480
equal deleted inserted replaced
560:85521d542da4 561:17cd7fdee7c8
     5 \usepackage{../data}
     5 \usepackage{../data}
     6 
     6 
     7 \usetikzlibrary{shapes}
     7 \usetikzlibrary{shapes}
     8 
     8 
     9 % beamer stuff 
     9 % beamer stuff 
    10 \renewcommand{\slidecaption}{SEN 08, King's College London}
    10 \renewcommand{\slidecaption}{SEN 06, King's College London}
    11 \newcommand{\bl}[1]{\textcolor{blue}{#1}}
    11 \newcommand{\bl}[1]{\textcolor{blue}{#1}}
    12 
    12 
    13 \newcommand{\DOWNarrow}[3]{%
    13 \newcommand{\DOWNarrow}[3]{%
    14 \begin{textblock}{0}(#2,#3)%
    14 \begin{textblock}{0}(#2,#3)%
    15 \onslide<#1>{%
    15 \onslide<#1>{%
    32 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    32 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    33 \begin{frame}[t]
    33 \begin{frame}[t]
    34 \frametitle{%
    34 \frametitle{%
    35   \begin{tabular}{@ {}c@ {}}
    35   \begin{tabular}{@ {}c@ {}}
    36   \\
    36   \\
    37   \LARGE Security Engineering (8)\\[-3mm] 
    37   \LARGE Security Engineering (6)\\[-3mm] 
    38   \end{tabular}}\bigskip\bigskip\bigskip
    38   \end{tabular}}\bigskip\bigskip\bigskip
    39 
    39 
    40   \normalsize
    40   \normalsize
    41   \begin{center}
    41   \begin{center}
    42   \begin{tabular}{ll}
    42   \begin{tabular}{ll}
    47   \end{center}
    47   \end{center}
    48 
    48 
    49 \end{frame}
    49 \end{frame}
    50 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
    50 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
    51 
    51 
    52 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
    53 % student prticipation
       
    54 %\begin{frame}
       
    55 %\frametitle{Bitcoins}
       
    56 %
       
    57 %P2P, 21 Mio, $10^-8$, Mt~Gox, value decreased?, anonymity, 
       
    58 %Silk Road, verification incentive, puzzle, SHA-256, slow 
       
    59 %transactions, 
       
    60 %
       
    61 %\end{frame}
       
    62 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
       
    63 
    52 
    64 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    53 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    65 \begin{frame}[t]
    54 \begin{frame}[t]
    66 \frametitle{Last Week's Survey}
    55 \frametitle{Over to you\ldots}
    67 
    56 
    68 {\bf About Bitcoins:}
    57 {\bf What do you know about Bitcoins:}
    69 
    58 
    70 \begin{textblock}{2.5}(11.5,10)
    59 \begin{itemize}
    71 \begin{bubble}[2.5cm]
    60 \item ???
    72   \it bitcoins cannot get lost,
    61 \end{itemize}  
    73   all transactions are recorded
    62 
    74 \end{bubble}
       
    75 \end{textblock}
       
    76 
       
    77 \begin{textblock}{5}(3.5,4)
       
    78 \begin{bubble}[5cm]
       
    79 \it not regulated by any government
       
    80 \end{bubble}
       
    81 \end{textblock}
       
    82 
       
    83 \begin{textblock}{4}(2,9)
       
    84 \begin{bubble}[4cm]
       
    85 \it untracable spending of money?
       
    86 \end{bubble}
       
    87 \end{textblock}
       
    88 
       
    89 \begin{textblock}{5.7}(3,13)
       
    90 \begin{bubble}[5.7cm]
       
    91   \it fixed amount of bitcoins in circulation (no inflation)
       
    92   
       
    93 \end{bubble}
       
    94 \end{textblock}
       
    95 
       
    96 \begin{textblock}{5.6}(8,7)
       
    97 \begin{bubble}[5.6cm]
       
    98 \it Should one mine for Bitcoins?
       
    99 \end{bubble}
       
   100 \end{textblock}
       
   101 
       
   102 %\begin{textblock}{2}(12,12.5)
       
   103 %\begin{bubble}[2cm]
       
   104 %\it mined by GPUs
       
   105 %\end{bubble}
       
   106 %\end{textblock}
       
   107 
       
   108 \begin{textblock}{3}(11,2.3)
       
   109 \begin{bubble}[3cm]
       
   110 \it bitcoins are anonymous
       
   111 \end{bubble}
       
   112 \end{textblock}
       
   113 
    63 
   114 \end{frame}
    64 \end{frame}
   115 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
    65 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
   116 
    66 
   117 
    67 
   150 \begin{itemize}
   100 \begin{itemize}
   151 \item electronic (on your computer, passwords)
   101 \item electronic (on your computer, passwords)
   152 \item cloud-based (passwords)
   102 \item cloud-based (passwords)
   153 \item paper-based
   103 \item paper-based
   154 \end{itemize}
   104 \end{itemize}
   155 and contains only the public-private key
   105 and contains only your private key(s)
   156 
   106 
   157 \item Bitcoins can be stolen or lost
   107 \item Bitcoins can be stolen or lost
   158 \item Mt.~Gox: hacked $\Rightarrow$ insolvent
   108 \item Mt.~Gox: hacked $\Rightarrow$ insolvent
   159 \item no form of dispute resolution\\ (against current
   109 \item no form of dispute resolution\\ (against current
   160 consumer laws)
   110 consumer laws)
   170 It establishing trust in a completely 
   120 It establishing trust in a completely 
   171 untrusted environment\medskip
   121 untrusted environment\medskip
   172 
   122 
   173 \begin{itemize}
   123 \begin{itemize}
   174 \item public-private key encryption\medskip
   124 \item public-private key encryption\medskip
   175 \item digital signatures\medskip
   125 \item cryptographic hashing (SHA-256)\medskip
   176 \item cryptographic hashing (SHA-256)
   126 \item digital signatures
   177 \end{itemize}
   127 \end{itemize}
   178 
   128 
   179 \begin{center}
   129 \begin{center}
   180 If Alice sends you: \bl{$msg, \{msg\}_{K^{priv}_{Alice}}$}
   130 If Alice sends you: \bl{$msg, \{msg\}_{K^{priv}_{Alice}}$}
   181 \ldots ?
   131 \ldots ?
   193 \end{center}\bigskip
   143 \end{center}\bigskip
   194 
   144 
   195 \begin{itemize}
   145 \begin{itemize}
   196 \item no-one else could have created that message
   146 \item no-one else could have created that message
   197 \item Alice cannot deny the ``intend'' of sending Bob money\pause\bigskip
   147 \item Alice cannot deny the ``intend'' of sending Bob money\pause\bigskip
   198 \item Q: What is money?\\ 
   148 \item Q: What is crypto money?\\ 
   199   A: Well a string like above
   149   A: Well a string like above
   200   (or later messages like that)
   150   (or later messages like that)
   201 \end{itemize}
   151 \end{itemize}
   202 
   152 
   203 
   153 
   306 \begin{bubble}[10cm]
   256 \begin{bubble}[10cm]
   307 \begin{itemize}
   257 \begin{itemize}
   308 \item I , Alice, am giving Bob one infocoin, with serial
   258 \item I , Alice, am giving Bob one infocoin, with serial
   309       number 1234567. 
   259       number 1234567. 
   310 \item I, Alice, am giving \alt<2->{\alert{Alice}}{Charlie} 
   260 \item I, Alice, am giving \alt<2->{\alert{Alice}}{Charlie} 
   311       one infocoin with number 1234567.
   261       one infocoin with number 1234567. 
   312 \end{itemize}
   262 \end{itemize}
   313 \end{bubble}
   263 \end{bubble}
   314 
   264 
   315 How should other people update their blockchain (public
   265 How should other people update their blockchain (public
   316 register)?\\[-10mm]\mbox{}\pause
   266 register)?\\[-10mm]\mbox{}\pause
   371 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   321 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   372 \begin{frame}[t]
   322 \begin{frame}[t]
   373 \frametitle{Solving Puzzles}
   323 \frametitle{Solving Puzzles}
   374 
   324 
   375 Given a string, say \code{"Hello, world!"}, what is the 
   325 Given a string, say \code{"Hello, world!"}, what is the 
   376 \alert{salt} so the hash starts with a long run of 
   326 \alert{salt} so that the hash starts with a long run of 
   377 zeros?\bigskip
   327 zeros?\bigskip
   378 
   328 
   379 \begin{bubble}[10cm]
   329 \begin{bubble}[10cm]
   380 \footnotesize\code{h("Hello, world!0") =}\\
   330 \footnotesize\code{h("Hello, world!0") =}\\
   381 \;\;\scriptsize\pcode{1312af178c253f84028d480a6adc1e25e81caa44c749ec81976192e2ec934c64}\\
   331 \;\;\scriptsize\pcode{1312af178c253f84028d480a6adc1e25e81caa44c749ec81976192e2ec934c64}\\
   395 \begin{frame}[t]
   345 \begin{frame}[t]
   396 \frametitle{Hardness}
   346 \frametitle{Hardness}
   397 
   347 
   398 If we want the output hash value to begin with 10 zeroes,
   348 If we want the output hash value to begin with 10 zeroes,
   399 say, then we will need, on average, to try $16^{10} \approx
   349 say, then we will need, on average, to try $16^{10} \approx
   400 10^{12}$ different salts before we find a suitable nonce. 
   350 10^{12}$ different salts before we find a suitable salt. 
   401 
   351 
   402 Hardness can be controlled by setting a \alert{target} (maximum
   352 Hardness can be controlled by setting a \alert{target} (maximum
   403 number).
   353 number).
   404 
   354 
   405 \begin{center}
   355 \begin{center}
   528 
   478 
   529 \small
   479 \small
   530 The rule is: if a fork occurs, people on the network keep
   480 The rule is: if a fork occurs, people on the network keep
   531 track of all forks. But at any given time, miners only work
   481 track of all forks. But at any given time, miners only work
   532 to extend whichever fork is longest in their copy of the block
   482 to extend whichever fork is longest in their copy of the block
   533 chain.
   483 chain. \pause(It is actually not a rule, but an incentive!)
   534 
   484 
   535 \end{frame}
   485 \end{frame}
   536 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
   486 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
   537 
   487 
   538 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   488 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   561 \includegraphics[scale=0.3]{../pics/bitcoin_transaction_order_race.png}
   511 \includegraphics[scale=0.3]{../pics/bitcoin_transaction_order_race.png}
   562 \end{column}
   512 \end{column}
   563 \end{columns}\bigskip\bigskip\pause
   513 \end{columns}\bigskip\bigskip\pause
   564 
   514 
   565 \small
   515 \small
   566 A transaction is ``confirmed'' if:\smallskip
   516 By convention, a transaction is ``confirmed'' if:\smallskip
   567 
   517 
   568 (1) it is part of a block in the longest fork, and (2) at
   518 (1) it is part of a block in the longest fork, and (2) at
   569 least 5 blocks follow it in the longest fork. In this case we
   519 least 5 blocks follow it in the longest fork. In this case we
   570 say that the transaction has ``6 confirmations''.\bigskip
   520 say that the transaction has ``6 confirmations''.\bigskip
   571 
   521 
   585 minutes, is negligibly low.
   535 minutes, is negligibly low.
   586 \end{bubble}\pause
   536 \end{bubble}\pause
   587 
   537 
   588 \small
   538 \small
   589 Many people join groups called mining pools that collectively
   539 Many people join groups called mining pools that collectively
   590 work to solve blocks, and distribute rewards based on work
   540 work to solve blocks, and distribute rewards based on the work
   591 contributed. These act somewhat like lottery pools among
   541 contributed. These act somewhat like lottery pools among
   592 co-workers, except that some of these pools are quite large,
   542 co-workers, except that some of these pools are quite large,
   593 and comprise more than 20\% of all the computers in the
   543 and comprise more than 50\% of all the computers in the
   594 network.\medskip
   544 network.\medskip
   595 
   545 
   596 \footnotesize
   546 \footnotesize
   597 BTCC, the largest mining pool, has limited its members to 
   547 BTCC, the largest mining pool, has limited its members to 
   598 not solve more than 6 blocks in a row.
   548 not solve more than 6 blocks in a row.
   649 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   599 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   650 \begin{frame}[t]
   600 \begin{frame}[t]
   651 \frametitle{Dispute Mediation}
   601 \frametitle{Dispute Mediation}
   652 
   602 
   653 \begin{itemize}
   603 \begin{itemize}
   654 \item say, client and (online) merchant do not trust 
   604 \item say, a client and an (online) merchant do not trust 
   655   each other\bigskip\pause
   605   each other\bigskip\pause
   656 
   606 
   657 \item 2-of-3: mutually trusted escrow service
   607 \item 2-of-3: mutually trusted escrow service
   658   \begin{enumerate}
   608   \begin{enumerate}
   659   \item client sends money to 2-of-3 transaction
   609   \item client sends money to 2-of-3 transaction
   660   \item merchant sends out goods
   610   \item merchant sends out goods
   661   \item if goods are OK, client sends signed transaction
   611   \item if goods are OK, client sends signed transaction
   662     to merchant, merchant can sign and receive the money
   612     to merchant, merchant can sign and receive the money
   663     (publish in blockchain)
   613     (publish in blockchain)
   664   \item if goods are defective, merchant sends signed transaction
   614   \item if goods are defective, and merchant is nice,
       
   615     merchant sends signed transaction
   665     to client, client can sign and receive the money back
   616     to client, client can sign and receive the money back
   666   \item if client and merchant disagree, then they ask escrow
   617   \item if client and merchant disagree, then they ask escrow
   667   servive who signs a transaction and sends it to ``winning''
   618   service who signs a transaction and sends it to ``winning''
   668   party 
   619   party 
   669  \end{enumerate}
   620  \end{enumerate}
   670 \end{itemize}
   621 \end{itemize}
   671 
   622 
   672 \end{frame}
   623 \end{frame}
   783 \item create coins out of thin air
   734 \item create coins out of thin air
   784 \item send coins that never belonged to an attacker
   735 \item send coins that never belonged to an attacker
   785 \item you cannot meddle with the ``history''
   736 \item you cannot meddle with the ``history''
   786 \end{itemize}\bigskip
   737 \end{itemize}\bigskip
   787 
   738 
   788 The system can be scaled to all world transactions. 
   739 The system can be scaled to all world transactions??
   789 
   740 
   790 \end{frame}
   741 \end{frame}
   791 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
   742 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
   792 
   743 
   793 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   744 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   797 \begin{center}
   748 \begin{center}
   798 \includegraphics[scale=0.4]{../pics/bitcointornetwork.png}
   749 \includegraphics[scale=0.4]{../pics/bitcointornetwork.png}
   799 \end{center}
   750 \end{center}
   800 
   751 
   801 \only<1>{
   752 \only<1>{
   802 ledger is public ``forever''; everybody can inspect
   753 the ledger is public ``forever''; everybody can inspect
   803 how money was transferred from which address to
   754 how money was transferred from which address to
   804 which address; maybe not ideal for money laundering}
   755 which address; maybe not ideal for money laundering}
   805 \only<2>{
   756 \only<2>{
   806 You should use a new PKI-pair for \alert{every} transaction;
   757 You should use a new PKI-pair for \alert{every} transaction;
   807 but few do (merchants). A design flaw(?): combining transactions.}
   758 but few do (merchants). A design flaw(?): combining transactions.}
   841         
   792         
   842   \item the transaction stands for a share in ``Foo Inc, UK''.
   793   \item the transaction stands for a share in ``Foo Inc, UK''.
   843   
   794   
   844     
   795     
   845   \item only makes sense if the share is much more
   796   \item only makes sense if the share is much more
   846   valueable than just 1 Bc.          
   797   valuable than just 1 Bc.          
   847 \end{itemize} 
   798 \end{itemize} 
   848 
   799 
   849 \end{frame}
   800 \end{frame}
   850 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   801 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   851 
   802 
   920 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   871 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   921 \begin{frame}[t]
   872 \begin{frame}[t]
   922 %\frametitle{Take Home Points}
   873 %\frametitle{Take Home Points}
   923 
   874 
   924   \begin{center}
   875   \begin{center}
   925   Next 2 weeks by Jose Such
   876     Next 4 weeks by Jose Such\bigskip\bigskip
       
   877 
       
   878     You can still send me homework for weeks 1 - 6.
   926   \end{center}  
   879   \end{center}  
   927       
   880       
   928 
   881 
   929 \end{frame}
   882 \end{frame}
   930 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
   883 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%