Understanding Bitcoin
Cryptography, engineering, and economics
PEDRO FRANCO
This edition first published 2015
2015 Pedro Franco
Registered office
John Wiley & Sons Ltd, The Atrium, Southern Gate, Chichester, West Sussex, PO19 8SQ, United Kingdom
For details of our global editorial offices, for customer services and for information about how to apply for permission to reuse the copyright material in this book please see our website at www.wiley.com.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, except as permitted by the UK Copyright, Designs and Patents Act 1988, without the prior permission of the publisher.
Wiley publishes in a variety of print and electronic formats and by print-on-demand. Some material included with standard print versions of this book may not be included in e-books or in print-on-demand. If this book refers to media such as a CD or DVD that is not included in the version you purchased, you may download this material at http://booksupport.wiley.com. For more information about Wiley products, visit www.wiley.com.
Designations used by companies to distinguish their products are often claimed as trademarks. All brand names and product names used in this book are trade names, service marks, trademarks or registered trademarks of their respective owners. Neither the publisher nor the author are associated with any product or vendor mentioned in this book. The material contained in this book is not related to any work the author has performed for any present or past employer. Opinions expressed in the book are solely those of the author and do not express the views of the authors current or past employers.
Limit of Liability/Disclaimer of Warranty: While the publisher and author have used their best efforts in preparing this book, they make no representations or warranties with respect to the accuracy or completeness of the contents of this book and specifically disclaim any implied warranties of merchantability or fitness for a particular purpose. It is sold on the understanding that neither the publisher nor the author are engaged in rendering professional services and neither the publisher nor the author shall be liable for damages arising herefrom. If professional advice or other expert assistance is required, the services of a competent professional should be sought.
A catalog record for this book is available from the Library of Congress.
A catalogue record for this book is available from the British Library.
ISBN 9781119019169 (hardback/paperback)
ISBN 9781119019145 (ebk)
ISBN 9781119019152 (ebk)
ISBN 9781119019138 (ebk)
Dedicated to Alvaro, Rafael, Luis, and Nayra
About the Author
Pedro Franco was born in Astorga, Leon (Spain). He holds a MSc in Electrical Engineering from ICAI, a BSc in Economics, and an MBA from INSEAD. Pedro has been a consultant with McKinsey and Boston Consulting Group and a researcher with IIT prior to gaining more than 10 years of experience in financial markets holding Quant and Trading positions in Credit, Counterparty Risk, Inflation, and Interest Rates. He has created various mathematical libraries for financial derivatives, and managed teams of software developers.
The author can be contacted at .
Acknowledgments
Thanks to Juan Ramirez for helping me gather the courage to write this book.
Thanks to Jon Beracoechea, Manuel Castro, and Robert Smith for exhaustively reviewing an early version of the book and providing many excellent suggestions. Thanks also to Eli Ben-Sasson, Alejandro and Alvaro Franco, Jeff Lim, Jan Pelzl, Stefan Thomas, Evan Schwartz, Rodrigo Serrano, Alena Vranova, and Bob Way for reviewing parts of the book and providing insightful comments.
Finally, thanks to my family for their patience and support; without them this book could not have been written.
Foreword
I have been hoping for some time for a good book covering the technology and ideas behind Bitcoin to be written.
There is certainly a wealth of information about cryptocurrencies, but the field advances rapidly and it is sometimes difficult for the non-initiated to understand the fundamentals and catch up with new developments. This book takes readers to a thorough understanding of the current state-of-the-art cryptocurrencies technology, as well as its future economic and technological implications, without assuming any previous knowledge of the many fields than constitute Bitcoin. This is an enabling book that empowers the reader to participate in and contribute to this great adventure.
The book clearly exposes many concepts previously mainly known to insiders of the cryptocurrencies world. It covers a wide range of topics, from the economics or the basic technology (such as elliptic curve cryptography, Merkle trees or the blockchain) to advanced cryptographic concepts (such as non-interactive zero-knowledge proofs), and explores many applications based on these ideas (such as multi-signature wallets or fully anonymous payment systems). All this is accomplished in a book that is very approachable and comprehensible.
Readers new to Bitcoin will surely be surprised by the ingenuity of the technology and the broad range of applications it enables. Those familiar with Bitcoin will find many sections, such as the sections on economics or advanced applications of cryptocurrencies, informative and thought provoking.
I believe Pedros book will be well received in the business and financial community as well as by the general public, spreading the knowledge about Bitcoin and contributing to this technology crossing the chasm to the early majority.
Jeff Garzik
Bitcoin Core Developer at BitPay, Inc.
Prologue
What is Bitcoin?
Its a digital currency.
Yeah, I get that, but who is behind Bitcoin?
Nobody.
What do you mean by nobody? Somebody must be controlling it!
Nobody is controlling it, it is an algorithm.
What? You mean like Terminator? So you say the world is going to be taken over by machines?
Well, not the world, but maybe some businesses.
Right... (rolling her eyes) But who controls the algorithm? Some mad scientist?
Its an open source project.
An open what?
Yes, free code. You can download it from the internet and do with it whatever you want.
So you dont have to pay for the program"?
Well, its free as in freedom, not free as in beer.
What does beer have to do with it?
The code is not only free in the sense that you can use the program free of charge. It is also free in the sense that you can take the code, modify it, and release a program of your own with it.
Wait a second! If I can do that then I can make my own bitcoins. What value does a bitcoin have then?
No, you cannot mint your own bitcoins. What you can do is invent your own currency. And then you have to somehow make it gain acceptance...
Oh, but this surely is the end of Bitcoin. If you can make as many currencies as you want, none of them would have any value.
Currencies have value because of social convention. Bitcoin has value because people are willing to give value to it.
I dont think you are right. Euros or dollars have value, everybody knows that.
Next page