Caught in the Net

Why Wright's proof is a fake

I explained in my previous post (in italian) that the signature that Wright provided as a public proof is in fact invalid. I want to explain briefly how you could check this claim. The key in Wright's post is this:

------------------------- Signature File -------------------------
MEUCIQDBKn1Uly8m0UyzETObUSL4wYdBfd4ejvtoQfVcNCIK4AIgZmMsXNQWHvo6KDd2Tu6euEl1
3VTC3ihl6XUlhcU+fM4=
------------------------- End Signature --------------------------

Now we can use some bash utilities:

  • base64, that translates encoded ASCII text;
  • hexdump, that displays hexadecimal contents from the input;
  • cut, used to remove the binary part of the input;
  • tr, used to delete spaces and carriage return from the input;
base64 -d <<<'MEUCIQDBKn1Uly8m0UyzETObUSL4wYdBfd4ejvtoQfVcNCIK4AIgZmMsXNQWHvo6KDd2Tu6euEl13VTC3ihl6XUlhcU+fM4=' | hexdump -C| cut -b 11-60| tr -d ' \n'

3045022100c12a7d54972f26d14cb311339b5122f8c187417dde1e8efb6841f55c34220ae0022066632c5cd4161efa3a2837764eee9eb84975dd54c2de2865e9752585c53e7cce

Let's analyze the command one by one:

  • base64 -d decodes the redirected string, the output is some gibberish characters so I won't display them here;
  • hexdump -C is used with a pipe to convert to hexadecimal:
00000000  30 45 02 21 00 c1 2a 7d  54 97 2f 26 d1 4c b3 11  |0E.!..*}T./&.L..|
00000010  33 9b 51 22 f8 c1 87 41  7d de 1e 8e fb 68 41 f5  |3.Q"...A}....hA.|
00000020  5c 34 22 0a e0 02 20 66  63 2c 5c d4 16 1e fa 3a  |\4"... fc,\....:|
00000030  28 37 76 4e ee 9e b8 49  75 dd 54 c2 de 28 65 e9  |(7vN...Iu.T..(e.|
00000040  75 25 85 c5 3e 7c ce                              |u%..>|.|
  • cut -b 11-60 displays only the characters from column 11 to 60:
30 45 02 21 00 c1 2a 7d  54 97 2f 26 d1 4c b3 11  
33 9b 51 22 f8 c1 87 41  7d de 1e 8e fb 68 41 f5  
5c 34 22 0a e0 02 20 66  63 2c 5c d4 16 1e fa 3a  
28 37 76 4e ee 9e b8 49  75 dd 54 c2 de 28 65 e9  
75 25 85 c5 3e 7c ce                            
  • tr -d ' \n' is used to delete spaces and carriage returns from the output so that is shown in one line and it gives us the final result:
3045022100c12a7d54972f26d14cb311339b5122f8c187417dde1e8efb6841f55c34220ae0022066632c5cd4161efa3a2837764eee9eb84975dd54c2de2865e9752585c53e7cce

If you noticed, there is also another cleartext string at the beginning of Wright's post:

$ base64 -d <<<'IFdyaWdodCwgaXQgaXMgbm90IHRoZSBzYW1lIGFzIGlmIEkgc2lnbiBDcmFpZyBXcmlnaHQsIFNhdG9zaGkuCgo='
Wright, it is not the same as if I sign Craig Wright, Satoshi.

Now let's head to blockchain.info. Blockchain.info has a little utility to get hexadecimal informations out of a transaction on the blockchain, so let's use it to get the related info about this transaction:

tx/828ef3b079f9c23829c56fe86e85b4a69d9e06e5b54ea597eef5fb3ffef509fe tx/828ef3b079f9... in hexadecimal

As you can see the entire output of the first bash command, that is 3045022100c12a7d54972f26d14cb311339b5122f8c187417dde1e8efb6841f55c34220ae0022066632c5cd4161efa3a2837764eee9eb84975dd54c2de2865e9752585c53e7cce is contained in: "script":"483045022100c12a7d54972f26d14cb311339b5122f8c187417dde1e8efb6841f55c34220ae0022066632c5cd4161efa3a2837764eee9eb84975dd54c2de2865e9752585c53e7cce01" except for the 48 at the beginning and the 01 at the end.

That is a signature hash: this page explains that the 48 is just a decimal prefix given to uncompressed transactions, and the 01 at the end is just a SIGHASH_ALL code that flags the end of the signature.

So, is it a fake?

Yes, indeed. At the end, I ask, why would you choose anything else than the easiest and most conclusive way to prove something?

Wright "signs" the blockchain

#JeSuisSatoshiNakamoto

Ieri mattina appena sveglio mi sono imbattuto in questo post di Gavin Andresen, uno dei più importanti membri della Bitcoin Foundation. In quelle righe Gavin attribuisce l'identità di Satoshi Nakamoto, il padre dei Bitcoin, a Craig Wright, un imprenditore australiano. Sono stato subito scosso dall'articolo, dove si spiega:

Part of that time was spent on a careful cryptographic verification of messages signed with keys that only Satoshi should possess.

Continuo la mia navigazione imbattendomi nei seguenti titoli di alcune testate italiane:

Gli articoli da clickbait e la completa mancanza di spiegazioni tecniche hanno fatto squillare immediatamente il mio campanello antibufala. Voglio approfondire la questione in questo post.

Prova numero 1: il post ufficiale di Wright

Craig Wright in data 2 maggio ha pubblicato sul suo sito personale questo articolo dove spiega che utilizzando 10 chiavi private associate agli indirizzi utilizzati da Satoshi ha firmato dei messaggi inviati da alcuni giornalisti e mostra gli script utilizzati per la firma sotto forma di screenshots. Prima di tutto, ad un'analisi più attenta si vede che lo script di Wright ha un typo e quindi non è eseguibile. Il motivo per cui ho dubitato maggiormente però è il fatto che nonostante Wright abbia speso molto tempo nel suo blog post ha evitato di darci una prova riproducibile del fatto che la chiave privata di uno dei genesis block sia in suo possesso. Quindi il post di Wright non basta a verificare che egli sia in effetti Nakamoto.

Prova numero 2: Jon Matonis e Gavin Andresen

Il primo post che ho letto e che inizialmente mi aveva convinto della sincerità di Wright è stato il quello di Andersen. A poche ore da quella lettura ho appreso grazie ad un tweet che è stato revocato a Gavin l'accesso ai commit relativi allo sviluppo di Bitcoin in quanto si sospetta che sia stato hackerato. Così il post di Gavin ha perso ogni valore nel tentativo di chiarire la vicenda. Invece ho ancora molti dubbi relativamente al post di Matonis (uno dei fondatori della Bitcoin Foundation) dove afferma che a Marzo Wright si è rivelato a lui firmando in sua presenza un messaggio con le chiavi crittografiche del blocco #1 e del blocco #9. Queste sarebbero le prove decisive per dimostrare l'autenticità delle affermazioni di Wright, ma non ne abbiamo prove pubbliche e riproducibili. Anzi, dal post si deduce che Wright abbia utilizzato il suo laptop personale piuttosto che un computer sicuramente non manomesso in precedenza.

Prova numero 3: Gavin su Reddit

Alcuni redditor in risposta al post di Gavin hanno chiesto a lui stesso maggiori dettagli. Questa è stata la risposta di Gavin:

Craig signed a message that I chose ("Gavin's favorite number is eleven. CSW" if I recall correctly) using the private key from block number 1. That signature was copied on to a clean usb stick I brought with me to London, and then validated on a brand-new laptop with a freshly downloaded copy of electrum. I was not allowed to keep the message or laptop (fear it would leak before Official Announcement). I don't have an explanation for the funky OpenSSL procedure in his blog post.

Dall'articolo di Wired:

Andresen says an administrative assistant working with Wright left to buy a computer from a nearby store, and returned with what Andresen describes as a Windows laptop in a “factory-sealed” box.

Naturalmente queste non sono prove sufficenti poichè non abbiamo la certezza che il portatile sia stato manomesso in anticipo.

Prova numero 4: gli articoli di BBC ed Economist

Wright ha avuto un colloquio privato con la BBC e un giornalista dell'Economist ed ha fornito delle prove che loro ritengono sufficenti a verificare le sue affermazioni. Vorrei poter andare più in profondità con le affermazioni delle due testate, ma esse stesse non forniscono alcuna dimostrazione concreta delle procedure che Wright ha eseguito. Si legge:

At the meeting with the BBC, Mr Wright digitally signed messages using cryptographic keys created during the early days of Bitcoin's development. The keys are inextricably linked to blocks of bitcoins known to have been created or "mined" by Satoshi Nakamoto.

In mancanza di una spiegazione più approfondita e prettamente tecnica non vedo perchè dovrei prendere queste parole per certe.

Prova numero 5: Gran Finale

L'unica prova concreta che tutta la community ha a disposizione è la firma che Wright ha utilizzato per autenticarsi firmando il discorso in cui Sartre spiega perchè rinuncia al premio Nobel. Questa firma: MEUCIQDBKn1Uly8m0UyzETObUSL4wYdBfd4ejvtoQfVcNCIK4AIgZmMsXNQWHvo6KDd2Tu6euEl13VTC3ihl6XUlhcU+fM4= non è altro che la versione esadecimale della transazione che Satoshi ha fatto nel 2009. Quella stringa (in base64) non è affatto una firma, bensì è un messaggio in chiaro: "Wright, it is not the same as if I sign Craig Wright, Satoshi.\n\n".


wikiHow: how to claim you're Satoshi

Charlie Lee, il creatore dei Litecoin su medium ci ha dato una dimostrazione semplice e concisa di come il vero Satoshi si sarebbe dovuto autenticare. Non abbiamo bisogno di colloqui privati, laptop nuovi di fabbrica e screenshot di script. Nei primi blocchi, i genesis blocks, rimangono registatrate un numero sufficiente di chiavi pubbliche appartenenti al creatore della blockchain. Chiunque dichiari di essere Satoshi deve poter firmare un messaggio utilizzando una di quelle chiavi. Questo è quello che il creatore dei Litecoin mostra in 4 righe. Ogni altra prova è discutibile e non necessaria.

EDIT 22:12

Su Twitter il profilo ufficiale di Electrum scrive:

Note: There was no download of a signature file of electrum (.asc file) from a UK IP on Apr 7th.

Questo significa che il 7 Aprile, quando Wright ha mostrato a Gavin le sue chiavi utilizzando Electrum, nessuna delle due parti si è preoccupata di verificare che il client fosse autentico. Questo invalida ulteriormente tutte le affermazioni di Gavin.

Kyuss Music Player

For a long time I have been using Clementine music player on my workstation. Recently I reinstalled Gentoo on my desktop and I wanted to avoid installing QT libraries of any sort. So I switched to mpd and I have fallen in love with it. It is very flexible, fast and enriched by a lot of community software. For some weeks I used mpc client as my primary client for mpd but I was not satisfied with it. Even though it is pretty minimal but packed with every feature mpd permits, the search feels uncomfortable because is case sensitive and need artist, album, etc. flags before any entry. This is why I have written kpd together with Francesco Gallà

Kyuss Player Client

kpd is an acronym for Kyuss Player Client because we have been listening only to Kyuss while programming this client. We have reimplemented the search functions to suit our habits. No more case sensitive, optional 'artist, album, title' flags. kpd accepts only one string as the search argument and implements optional filter arguments to narrow the search in a grep like way. I welcome you to read the readme in my git to understand how the search works. Anyway in this post I want to explain bits of the code.

Main

The main kpd file invoked when the command is run in the console is kpd.py The most interesting part in this file IMHO is these lines:

 
    for el in argsOrder:
        if dictArgs[el] != False:
            client.update_status ()
            methodToCall = getattr (util, el)
            retUtil = methodToCall (client, dictArgs[el], searchRes)

argsOrder is a list of the arguments on the command line in the order the user wrote them. kpd uses a dictionary to store for every argument the corrispective string for the function that will be invoked using getattr. In this way any argument can be added to the main file without writing any other line of code. WE used this method to avoid using switch alike solutions.

Util

The util.py source file is a pretty easy source file to read. It contains every function that can be invoked by command line arguments. Every function has the same 'prototypes' so that they can be called using the method explained above. To implement no-output and output function I have used a class: to suppress the output on the console the program assign to sys.stdout a dummy class that save the original stdout on a variable and replaces write and flush functions so that they are just pass. and no output is written. To permit output after suppression the program just reassing the original value to sys.stdout.

In MPDdatabase.py we have written the search functions. Originally we intended to just read and import in a dictionary the whole mpd database that is stored compressed in the home directory. This list of dictionaries stores every entry related to the song and if any of them matches the search string or the filter string (considering also flags if any) the related song is printed on the output and saved in a list so it can be added by the add function. This approach result very efficent in term of precision but it lacked speed. For a database of about 77 thousand songs (about 550k lines) a search query could last almost 2 seconds. To improve the speed of the search we used the pickle module. The pickle module allows kpd to dump the data structure used to store the database in memory on a file that can be read easily by using the pickle.load function. In this way the search lasts about 40 milliseconds on the same database that wastes about 16MiB of memory on disk.

Conclusion

This was really fun. It was our first hand on python project and the first real program we have written since we started learning programming at our university. I discovered that programming allows me to relax and that is really cool to have custom software for activities you do every day. The source for our program is stored in my git here and you are free to modify it.

Bright Father

My father used to tell us ridiculous false information all the time. The catch was if we could catch one out and prove him wrong he'd give us a dollar. As we got older it would got a little less outrageous, but we'd still get that dollar if we could prove it. Looking back it was a good way to get us to think for ourselves.

zedoria on reddit

Lifehacks

  • Even though you may be nervous about talking to random people, the worst you can get is "Go away".

  • Do not buy your girlfriend or wife flowers in an attempt to make nice after you pissed her off. Every time she looks at the flowers, she will just be reminded that you pissed her off, unless she has the memory span of a goldfish.

  • To keep lettuce fresh for days longer, wrap it in paper towels instead of inside a plastic bag, it works very well.

  • Cubes of sugar in biscuit barrels help the biscuits stay crisp.

  • To clear your sinuses, eat a lot of wasabi. It will hurt tons, but your sinuses clear almost instantaneously.