Part of the Bitcoin Takeover Satoshi research archive. A companion to [Satoshi Nakamoto's Coding Style](/satoshi-archive/coding-style/). Every distance and habit count on this page comes from the locked 29-feature measure and the 24-habit checklist in the [research report](/satoshi-archive/report.md) (§3, §3b–3e, §5 and §9). No figure was invented here.
Satoshi's November 2008 pre-release and Bitcoin v0.1.0 sit 0.30 apart on that measure (exactly 0.295) and share 23 of the 24 habits we checked. That is what the same hand looks like. The closest independent pre-2009 code we scored is Wei Dai's Crypto++ 5.5.2, at 1.02 (exactly 1.023), about three and a half times farther. No scored suspect comes close to the 0.30 control.
Code written inside Bitcoin's tree after 2009 is a different matter. It inherits Satoshi's naming, his macros and his layout rules, so a high habit count proves nothing about authorship. Peter Todd's added Bitcoin Core lines match 19 of 23 habits for that reason, and still sit 2.04 away overall. Gavin Andresen's 1990s Open Inventor code, written long before Bitcoin, is among the farthest we measured (2.59, 9/23). His later work inside Bitcoin looks much closer, because he had learned the house style.
The sections below take each person's own software (preferably written before 2009, or at least outside Bitcoin) and set it against Satoshi's habits. Where they do resemble him, that is said plainly, and then why it is not enough. Short excerpts are copied verbatim from the scored sources. Tab indentation is shown as four spaces, with a note; nothing else was changed.
Summary
Distances are the 29-feature z-distance to Satoshi v0.1.0. Habits are shared items on the 24-habit checklist, counting only the habits that apply to that corpus.
Independent code
| Person | Software | Lang, era | Distance | Habits | Note |
|---|---|---|---|---|---|
| Wei Dai | Crypto++ 5.5.2 | C++, pre-2009 | 1.023 | 15/23 | Closest independent code; still far from 0.30 |
| Paul Le Roux | E4M 2.01 | C, 1998–99 | 1.328 | 7/24 | A different Hungarian dialect, and a different layout |
| Len Sassaman | Mixmaster blamed lines | C, 2001–08 | 1.338 | 10/22 | Weak attribution; project tree is 1.406, 6/23 |
| Hal Finney | RPOW 1.2.0 | C, ~2004–05 | 1.408 | 8/23 | GNU style, goto |
| Dan Kaminsky | DakaRand | C, 2012 | 1.426 | 10/21 | Independent, but post-Bitcoin and one small file |
| Adam Back | hashcash 1.21 | C, ~2006 | 1.577 | 10/22 | Distinctive padded if ( x ), mostly K&R |
| Zooko Wilcox-O'Hearn | pycryptopp / zfec | C++/C, 2007–09 | 1.595 | 8/20 | Python C-API idioms |
| Pieter Wuille | JIF | C, 2011 | 1.603 | 10/22 | Independent, post-2009; 2-space K&R |
| Dan Kaminsky | Paketto Keiretsu 2.00pre5 | C, 2002–03 | 1.628 | 7/23 | Pre-Bitcoin; tabs, mixed braces, pk_ snake_case |
| Mike Hearn | Wine added lines | C, 2002–06 | 1.691 | 8/23 | Imposed Wine house style |
| Jeff Garzik | nfs4d / itd / hail | C, 2005–09 | 1.720 | 9/23 | Imposed Linux-kernel style; 30 goto per KLOC |
| Wladimir van der Laan | etna_viv | C, 2012–13 | 2.054 | 8/23 | /* */, T *p, snake_case |
| Gregory Maxwell | CELT blamed lines | C, 2008–09 | 2.246 | 7/22 | Imposed Xiph style; his later Opus lines are 1.443, 6/22 |
| Gavin Andresen | SGI Open Inventor | C++, ~1991–96 | 2.590 | 9/23 | His real pre-Bitcoin style is far from Satoshi |
| Andrew Poelstra | RamseyScript | C, 2011–13 | 2.747 | 9/22 | GNU-ish func (x), 2-space, /* */ |
| Dustin Trammell | C snippets | C, undated | 3.424 | 6/19 | Tiny sample (509 lines) |
Same-author control: Satoshi November 2008 vs v0.1.0 = 0.295, 23/24 habits.
Inherited or language-mismatched (not evidence of a pre-Bitcoin match)
| Person | Software | Lang, era | Distance | Habits | Note |
|---|---|---|---|---|---|
| Gavin Andresen | Own repos | C++, 2014–15 | 0.809 | 15/23 | After years in Satoshi's codebase |
| Gavin Andresen | Bitcoin blamed lines | C++, 2010–12 | 1.058 | 20/24 | Written inside Bitcoin |
| Nick Szabo | jTime | JavaScript, 2011–14 | 1.119 | 10/19 | Language mismatch; no pre-2009 C/C++ |
| Jed McCaleb | newcoin / early rippled | C++, 2011 | 1.748 | 14/23 | Built on Bitcoin's code |
| Daira Hopwood | zcashd added lines | C++, 2015–26 | 1.937 | 16/24 | zcashd is a Bitcoin Core fork; no pre-2009 C/C++ |
| Peter Todd | Bitcoin Core added lines | C++, 2012–23 | 2.043 | 19/23 | Inherited conventions; no pre-2009 C/C++ |
| Ian Grigg | WebFunds / SOX | Java, 2000–01 | 2.402 | 11/22 | Language mismatch |
Bitcoin-adjacent rows such as Cory Fields' libbtcnet (0.819, 17/24) are in the same inherited group: they reuse CFoo, fFoo and PascalCase methods years after those conventions had become Bitcoin Core house style. They are listed in the report §6, not here as independent matches.
Adam Back (hashcash 1.21)
C, about 2006. Distance 1.577, habits 10/22.
He does share a few surface habits with Satoshi: the * sits on the type (DB* h, const char* key, 91.5% of the time), there is no space between a function name and (, he uses printf, and the indent unit is four columns. That is not a small thing (most of the C corpora put the * on the name), but it is not a fingerprint on its own.
The differences are larger, and some of them are highly personal:
- Padded parentheses, as in
if ( fd == -1 ). Hashcash has 1,566 padded pairs against 261 unpadded. Satoshi has two padded pairs in the whole of v0.1.0. - Braces usually stay on the same line (Allman only 18.5%), one-line bodies are wrapped in braces, and
} elseis common. Satoshi is Allman 99.9% of the time and never writes} else. - Mixed tabs and spaces (51% of indented lines are tabs). Satoshi uses four spaces and never a tab.
- snake_case on 41% of declared names, no Satoshi-style Hungarian (0%), and no PascalCase (6.7% of function names).
/* */comments only, uppercase hex,goto fail, and a very heavy use of#define(61 per KLOC, against Satoshi's 2.8).
From hashcash 1.21, sdb.c, lines 38–47 (spaces in the original, including the trailing space after the ) on the first line):
int sdb_open( DB* h, const char* filename, int* err )
{
int fd = 0 ;
FILE* fp = NULL ;
*err = 0;
h->file = NULL;
if ( filename == NULL ) { return 0; }
fd = open( filename, O_RDWR | O_CREAT, S_IREAD | S_IWRITE );
if ( fd == -1 ) { goto fail; }
The DB* h and FILE* fp pointers look like Satoshi. The padded if ( filename == NULL ), the spaces before the semicolons, the braced one-line body and the goto fail do not. Apart from T* p, nothing distinctive matches.
Peter Todd (Bitcoin Core added lines, 2012–2023)
C++, 2012–23, written inside Bitcoin Core. Distance 2.043, habits 19/23. There is no public pre-2009 C or C++ of his to score.
On a habit checklist this looks close: four spaces and no tabs, fFoo / nFoo Hungarian on 45% of declared names (13 f flags and no b), T& x / T* p 71% of the time, int64, // comments, LOCK / foreach macros, and printf / error(). That is why 19 of 23 habits match.
It is not a personal match, for two reasons. First, every line in this corpus was written after 2012, inside Satoshi's codebase, under its conventions and later Core style rules. The same prefixes, the same macros and the same int64 typedef were already in the tree. Second, the overall distance is still 2.04, farther than Wei Dai, and farther than almost every independent pre-2009 corpus. That is because the fragments are comment-heavy (37% comment lines) and because Todd's own added code is only 56% Allman and does use } else (8.5 per KLOC). Satoshi never does. Even the naming, which is the closest sub-score (0.46), is the house dialect.
From Bitcoin Core src/main.cpp, added in his commit 28bf0623 (25 May 2015, "Fix off-by-one error w/ nLockTime in the wallet"):
bool CheckFinalTx(const CTransaction &tx)
{
AssertLockHeld(cs_main);
return IsFinalTx(tx, chainActive.Height() + 1, GetAdjustedTime());
}
CTransaction, cs_main and IsFinalTx are Bitcoin's names, not a private style. The & in const CTransaction &tx is even bound to the name, which Satoshi almost never does. A high habit count in this setting is what inherited style looks like. It cannot tell us how Todd wrote C or C++ before Bitcoin existed.
Wei Dai (Crypto++ 5.5.2)
C++, pre-2009. Distance 1.023, habits 15/23. This is the closest independent pre-2009 corpus, and the closest "school": Satoshi bundled Wei Dai's SHA code into Bitcoin, then re-indented it from tabs to four spaces.
What they share is real. Both write C++ with Allman braces (Crypto++ 97%) and never } else. Both put a space after if / for / while, comment with // (Crypto++ 87%), use lowercase hex, name methods in PascalCase (93%), and put short one-line bodies in headers. Neither uses goto much, == NULL is rare, and both have a named 64-bit type (word64 in Crypto++, int64 in Bitcoin).
What they do not share is just as stable, and it is why a 1.02 distance is still about 3.5 times the same-author control:
- Tabs, 98.6% of the time, instead of spaces. Satoshi's copy of
sha.cppis the same file with every tab expanded, which shows they did not share an editor setting. - The
*and&sit on the name (Type &name,Type *p): only 6% are on the type. Satoshi puts them on the type 97% of the time. - An
m_member prefix (5,819 tokens) and almost no Hungarian (1.9% of declared names, against Satoshi's 52.6%). - Class names are not
C-prefixed (4%). - No
printfat all. Crypto++ uses exceptions,throwandcout. - No
loop,foreachorCRITICAL_BLOCKmacros.
From Crypto++ 5.5.2, files.cpp, lines 22–33 (tabs in the original, shown here as four spaces):
void FileStore::StoreInitialize(const NameValuePairs ¶meters)
{
m_file.reset(new std::ifstream);
const char *fileName;
if (parameters.GetValue(Name::InputFileName(), fileName))
{
ios::openmode binary = parameters.GetValueWithDefault(Name::InputBinaryMode(), true) ? ios::binary : ios::openmode(0);
m_file->open(fileName, ios::in | binary);
if (!*m_file)
throw OpenErr(fileName);
m_stream = m_file.get();
}
The bracing and the late-1990s Visual C++ look are the same culture. The tabs, the & on parameters, the m_file / m_stream members, the throw and the lack of a C prefix or a Hungarian name are a different person. Sharing Allman braces and PascalCase is not the same as sharing Satoshi's naming system, which is the real fingerprint.
Hal Finney (RPOW 1.2.0)
C, about 2004–05. Distance 1.408, habits 8/23.
RPOW is the closest thing on the list to a personal, pre-Bitcoin proof-of-work program, and it does not look like Bitcoin. Finney writes GNU-style C: the return type stands on its own line (96.5%), there is a space before the ( in a call (80%), indentation is tabs, and comments are /* */ only (// is 1.9%). Error handling is goto error (12.7 per KLOC). Pointers are Type *p (0% on the type side). Names are ordinary lowercase words such as buf, rc and size (Hungarian 0.2%). He also uses many #defines (32 per KLOC) and == NULL tests (8.8 per KLOC). Satoshi has no goto, almost no #defines, and four-space Allman C++ with CNode* pnode.
He does share a four-column indent unit, a space after if, lowercase hex, printf, and the absence of Microsoft Hungarian or m_ prefixes. Those are common C habits, not a personal dialect.
From RPOW 1.2.0, client/rpowutil.c, lines 148–159 (tabs in the original, shown here as four spaces):
/* Read an rpow value */
rpow *
rpow_read (rpowio *rpio)
{
rpow *rp = calloc (sizeof(rpow), 1);
int hclen;
int value;
gbig_init (&rp->bn);
if (rp_read (rpio, &rp->type, 1) != 1)
goto error;
The split return type, the space in rpow_read ( and calloc (, the rpow *rp pointer and the goto error are the opposite of Satoshi's layout. That RPOW is C rather than C++ widens the gap, but the layout habits would still stand out in C++.
Len Sassaman (Mixmaster 3.0)
C, 2001–08. Blamed lines: distance 1.338, habits 10/22. The whole Mixmaster 3.0 tree, which earlier authors also shaped, is 1.406 and 6/23. Attribution is weak: Mixmaster's style was set by Lance Cottrell and Ulf Möller, Sassaman was often the committer, and even blame-filtered lines may include code others wrote.
The blamed lines are still a different dialect from Satoshi's. They are K&R (Allman only 17%), with } else on one line (23.6 per KLOC), /* */ comments only, Type *p pointers (0% on the type side), lowercase and snake_case names (Hungarian 0%), and return (-1). The project tree is even farther: 2-space indent, mixed tabs, and 14.9 goto per KLOC. Sassaman's own blamed lines actually have little goto (0.87 per KLOC) and few == NULL tests, which is fair to note, but that is not enough to offset the bracing, comments and naming.
From Mixmaster Src/crypto.c, in the commit blamed to Sassaman on 22 July 2002 (d2f0a7b6, "Added support for AES in Type I messages"), lines 458–464:
int buf_aescrypt(BUFFER *buf, BUFFER *key, BUFFER *iv, int enc)
{
int n = 0;
AES_KEY ks;
if (key == NULL || key->length == 0)
return (-1);
BUFFER *buf, the 2-space indent, the /* */ culture of the file, and return (-1) are ordinary Unix C. There is no f / n / vch naming, no Allman layout, and no //. Beyond generic C conventions, there is little in common.
Nick Szabo (jTime, JavaScript, 2011–14)
JavaScript, 2011–14. Distance 1.119, habits 10/19. There is no pre-2009 C or C++ corpus of his to score, so this row is a language mismatch: pointers, classes, hex literals and macros drop out as not applicable, and the mid-table distance mostly reflects that.
What can be compared is not a match. jTime uses a 2- or 3-space indent (not four), K&R braces (Allman 0.9%), } else, and camelCase, with no Hungarian. It also has a quirk Satoshi never shows: a stray semicolon after a block brace (}; after an if). The shared habits (spaces rather than tabs, a space after if, // comments, and no space before a call's () are normal JavaScript.
A Reddit claim that Szabo alone shares Satoshi's long //////// comment borders was checked in the report. An unscored HTML test page does contain those banners; the scored jTime.js has none. The same banners also appear in SGI's house templates and, twice, in Wei Dai's Crypto++, so they are not distinctive.
From jTime, jTime.js at commit f7511b2e, lines 150–161:
JTime.prototype.every = function(period, start, timeout, actionObj, context) {
var p;
var curTime = (new Date()).getTime();
if (timeout <= start) {
console.error("jTime.every() ERROR: timeout must be greater than start");
return;
};
The K&R braces, the 3-space indent, the camelCase method and the }; after the if are all unlike Satoshi. A JavaScript file cannot confirm or clear him on C++ habits.
Zooko Wilcox-O'Hearn (pycryptopp and zfec, 2007–09)
C++ and C, 2007–09. Distance 1.595, habits 8/20.
This is independent, pre-launch code, but much of it is shaped by the Python C-API. Braces are K&R everywhere (Allman 0%). Comments are /* */ 97% of the time. Error handling uses goto at 19.5 per KLOC, the CPython idiom. Names are snake_case (13.5%), with no Hungarian, and pointers are mostly Type *p (only 35% on the type side).
He does share a four-space indent and PascalCase method names (77%). The latter comes from Crypto++ and from CPython type-method naming, not from Satoshi's CBlock / AddToWallet system.
From zfec, zfec/_fecmodule.c, lines 54–63 (commit 6c11c740 of tahoe-lafs/zfec):
static int
Encoder_init(Encoder *self, PyObject *args, PyObject *kwdict) {
static char *kwlist[] = {
"k",
"m",
NULL
};
int ink, inm;
if (!PyArg_ParseTupleAndKeywords(args, kwdict, "ii:Encoder.__init__", kwlist, &ink, &inm))
return -1;
The return type on its own line, the { at the end of the signature, Encoder *self and the CPython call are a different world from bool AddToWallet(const CWalletTx& wtxIn). Mojo Nation and Tahoe-LAFS, his other well-known work, are mostly Python and were not scored on this C/C++ measure.
Gavin Andresen (Open Inventor, then Bitcoin)
Three corpora, and the clearest lesson in the study that style can be learned.
SGI Open Inventor, about 1991–96, sole-author files. Distance 2.590, habits 9/23. This is his independent pre-Bitcoin C++, and it is among the farthest from Satoshi:
- Classic SGI layout: return type on its own line (96%), K&R braces inside functions, and
} else. - Mixed tabs and spaces; pointers written
Type *p(only 6% on the type side). - camelCase methods and members (
numIndices,whichToTraverse); Hungarian only 1.3%. - A 52% comment-line share driven by SGI's mandatory
////…// Description:banners, used by all SGI authors. Those are house style, not a link to Satoshi's//////separators.
From Open Inventor, lib/database/src/so/nodes/SoLOD.c++, lines 237–247, at commit 791cc9c (tab stops are 8 columns in the original; the leading indent of the case arms is a tab):
SoLOD::GLRender(SoGLRenderAction *action)
//
////////////////////////////////////////////////////////////////////////
{
int numIndices;
const int *indices;
switch (action->getPathCode(numIndices, indices)) {
case SoAction::NO_PATH:
case SoAction::BELOW_PATH:
The return type stands alone, the pointer is SoGLRenderAction *action, and the names are camelCase. There is no C prefix and no n / f / str system.
Bitcoin 2010–12, blamed lines. Distance 1.058, habits 20/24. Here he writes like Satoshi: four spaces, Allman, fFoo / nFoo / strFoo Hungarian (37%), Type& x, foreach, printf, int64. He was editing Satoshi's codebase under Satoshi's conventions.
His own repositories, 2014–15. Distance 0.809, habits 15/23, numerically the closest non-control corpus in the whole table. He keeps four-space indent, //, Type& x, lowercase hex, and Allman for function bodies. Inside functions, though, he uses K&R for (...) { (Allman ratio 0.34), snake or camel variable names (Hungarian only 5%), and uint64_t / std:: types.
The pre-Bitcoin habits (GNU-style headers, K&R inner braces, Type *p, camelCase, no Hungarian) do not match Satoshi. The later closeness is acquired style. It is evidence against reading a post-2010 resemblance as authorship, not evidence for it.
Dan Kaminsky (Paketto 2002–03, and DakaRand 2012)
Paketto Keiretsu 2.00pre5, C, 2002–03, 3,772 code lines. Distance 1.628, habits 7/23. This is the pre-Bitcoin corpus, and it sits in the lower half of the table, about 5.5 times the 0.30 control.
- Tabs on 71% of indented lines, with a 3-column unit, where Satoshi uses four spaces.
- Mixed braces, Allman only 41%, and
} else8.2 per KLOC. if(without a space (keyword spacing 31%).T *ppointers (only 1% on the type side).- Mostly
/* */comments (//is 30%). - snake_case on 36% of declared names, with
pk_prefixes. No Hungarian of either kind (0% and 0%). - Heavy
printf/fprintf(90 per KLOC) and== NULL6.4 per KLOC.
He does match Satoshi on a few ordinary habits: no goto, few #defines, the return type on the same line, no m_ prefixes, and lowercase hex. That is Unix / libpcap / libnet C culture, not Satoshi's CFoo / fFoo / T* p / int64 / custom-macro dialect. Jason Spence is credited with "programmatic minutae", so a minority of lines may be his; there is no per-line history to separate them.
DakaRand, C, 2012, 435 code lines. Distance 1.426, habits 10/21. Still tabs (80%), K&R (Allman 7%), if(, T *p and snake_case (19%). It does use // comments 93% of the time and many one-line bodies, both of which match Satoshi, but it is a small single file, so the distance is unstable, and it was written after Bitcoin existed.
Daira Hopwood (zcashd added lines, 2015–26)
C++, 2015–26, written inside zcashd, a fork of Bitcoin Core 0.11.2. Distance 1.937, habits 16/24. There is no pre-2009 C or C++ to test: their earlier public code is Java (Cryptix) and later Tahoe-LAFS work is Python.
What matches Satoshi is the house style of that fork: four spaces and no tabs, if (, T* p / T& x (81% on the type side), // comments (96%), fFoo booleans (28 to 0), Satoshi-style prefixes on 25% of declared names, an int64_t typedef family, and no goto. Peter Todd's Bitcoin Core lines score 19/23 at 2.04 for the same reason.
What differs is Hopwood's own layout in that tree. Braces are mostly K&R (Allman 16%, } else 7.7 per KLOC). Snake_case is 8.5% of declared names (Satoshi 1%). Only 11% of declared classes are C-prefixed, and 57% of functions are PascalCase (Satoshi 85% and 89%). Hex literals are often uppercase (lowercase only 46%). Custom loop and lock macros are almost absent (0.6 per KLOC; Satoshi 17). Lines are much longer (mean 56.4 characters, against Satoshi's 33.3), which is one reason the layout sub-distance is 2.47.
From zcashd src/main.cpp, commit 473a11324, 4 April 2018, "Don't increase banscore if the transaction only just expired":
// Don't increase banscore if the transaction only just expired
int expiredDosLevel = IsExpiredTx(tx, nHeight - 1) ? dosLevel : 0;
return state.DoS(expiredDosLevel, error("ContextualCheckTransaction(): transaction is expired"), REJECT_INVALID, "tx-overwinter-expired");
nHeight is a Bitcoin name already in the tree. The long one-line return is not how Satoshi laid code out. As with Todd, the Satoshi-like naming is inherited, and even with that help the layout is far from his.
Jeff Garzik (nfs4d, itd and hail, 2005–09)
C, 2005–09. Distance 1.720, habits 9/23. This is independent pre-Bitcoin code, but it is written in Linux-kernel style, so the row measures a convention as much as a person. (His kernel work itself was not scored; the tree is huge, and these daemons use the same style.)
It is close to the opposite of Satoshi on the habits that matter most:
- 99.6% tab indentation, with an 8-column unit, not four spaces.
- Allman only 29%, and only on function bodies;
} elseappears (3.6 per KLOC). - Almost no
//comments (//is 0.6%). - Pointers are
T *p(0% on the type side). - snake_case on 52% of declared names; no Satoshi Hungarian; no PascalCase.
- 30 `goto` per KLOC. Satoshi has none.
He does share some generic C habits: a space after if, few #defines, a named 64-bit type, lowercase hex, the return type on the same line, and no space before a call's (. Those are not enough to pull a kernel-C dialect up to Satoshi's Windows C++ naming system.
Paul Le Roux (E4M 2.01)
C, 1998–99. Distance 1.328, habits 7/24. This is the only other Hungarian user in the original comparison, and it is still a different dialect and a different layout.
The superficial overlap is that both are Windows programmers who use Allman braces (E4M 100%) and never } else, who use printf, and who write PascalCase function names (73%). About 9.8% of E4M's declared names use Satoshi-like prefixes such as nStatus and pThreadBlock.
The contradictions are stronger:
- The Hungarian is classic Microsoft:
hwndDlg,szTmp,lpszTitle,dwResult. Booleans are `bFoo`, 90 to 3fFoo. Satoshi usesfFoo139 to 0, and almost neverdw/lp/sz. - Tabs, not spaces.
- GNU layout: return type on its own line (99.6%), and a space before the
(in a call (97.5%, as inDeleteObject (hSmallFont);). Satoshi has 0% on both. /* */comments only, frequentgoto(10.7 per KLOC), frequent== NULL, andreturn TRUE/FALSE. It is plain C, with no classes.
From E4M 2.01, common/Dlgcode.c, lines 36–45 (tabs in the original, shown here as four spaces):
void
cleanup ()
{
/* Cleanup the GDI fonts */
if (hSmallFont != NULL)
DeleteObject (hSmallFont);
if (hBoldFont != NULL)
DeleteObject (hBoldFont);
if (hSmallBoldFont != NULL)
DeleteObject (hSmallBoldFont);
Allman braces are shared. The split void / cleanup (), the call-paren space, the /* */ comments, hSmallFont and == NULL are not. Windows culture explains the overlap; the personal habits go the other way.
Other independent scores
These rows are also scorable, and none of them looks like the same hand. Several are dominated by a project house style, which the report treats as a confound, not a personal fingerprint.
Mike Hearn, Wine added lines, 2002–06. Distance 1.691, habits 8/23. Mixed four-space indent with 12% tabs, only 52% Allman, no // comments at all (Wine banned C++ comments), 3.8 goto per KLOC, and some Win32 Hungarian (BOOL, DWORD, LPWSTR, bFocussed, 6.4%). Wine's house rules shape all of it.
Gregory Maxwell, CELT 2008–09 and Opus v1.0.0. CELT: distance 2.246, habits 7/22. Opus: 1.443, 6/22. Both follow Xiph style: /* */ only, T *p, snake_case, and, in CELT, 3-space indent and 15.5 goto per KLOC. His Opus tests also pack expressions into one line without spaces, so keyword spacing drops to 18%. That is the opposite of Satoshi's consistent if (.
Pieter Wuille, JIF, 2011. Distance 1.603, habits 10/22. Independent, but after Bitcoin existed. 2-space indent, almost pure K&R (Allman 4%), cuddled } else (10.7 per KLOC), T *p (only 22% on the type side), and 85% all-lowercase function names. He does use // comments 95% of the time. The layout sub-distance (1.85) is one of the farthest.
Wladimir van der Laan, etna_viv, 2012–13. Distance 2.054, habits 8/23. Four-space indent, mixed braces (59% Allman), mostly /* */ (// only 24%), struct etna_ctx *ctx (pointer on the name 99.5% of the time), snake_case 47%, and many #defines (17 per KLOC). Part of driver/ follows Mesa / Gallium conventions; his own etnaviv/, fb/ and lib/ code is the same.
Andrew Poelstra, RamseyScript, 2011–13. Distance 2.747, habits 9/22. Among the farthest of all corpora. GNU flavour: 2-space indent, Allman 93%, a space before the call parenthesis in 99% of calls (func (x)), /* */ only, snake_case 50%, and many == NULL tests.
Ian Grigg, WebFunds / SOX, Java, 2000–01. Distance 2.402, habits 11/22. Language mismatch. The layout is surprisingly close (spaces, mostly Allman (68%), a space after if), but the naming is ordinary Java camelCase, with no Hungarian, and the comments are Javadoc-heavy (50% comment lines).
Dustin Trammell, C snippets. Distance 3.424, habits 6/19. Only 509 lines, so the result is unreliable. Tabs, K&R, if( x ) with no keyword space but padded parentheses (the opposite of Satoshi), /* */ only, and } else.
Jed McCaleb, newcoin, 2011, is inherited rather than independent: distance 1.748, habits 14/23. The BOOST_FOREACH, int64, Type* p, Allman and // matches are expected from someone who started from Bitcoin's code. His own compact spacing (if( with no space, return(x), a=b) is the opposite of Satoshi's. The repo also contains Satoshi's uint256.h, bignum.h and key.h. eDonkey / Overnet was closed source and was not scored.
People with no scorable code
A 29-feature distance needs attributable C or C++ source. These names were proposed in public, or appeared on earlier suspect lists, but have no such corpus in this study. The reasons are from the report §9.
- Craig Wright. No verifiable pre-2009 C/C++. This page does not use documents the UK High Court in COPA v Wright found forged or backdated, or blog posts whose provenance is not independent. Those are discussed, and excluded, in the writing-style section.
- Dorian Prentice Satoshi Nakamoto. No public software corpus was found.
- James A. Donald. Crypto Kong's C++ source was not obtained. The unpacked installer is a Visual Basic 5 program plus a small VC++ 5 OCX, so it cannot enter this ranking. Recoverable binary traits do not match official
bitcoin.exe. - David Chaum. DigiCash / ecash source was never released; only team SDK binaries were available, and they were not scored as personal code.
- Dave Kleiman, Vili Lehdonvirta, Michael Clear, Shinichi Mochizuki, Ross Ulbricht, Elon Musk. No usable personally authored public C/C++ was scored (Ulbricht's 2013 attribution was later retracted).
- Neal King, Vladimir Oksman and Charles Bry. Named only through a 2008 patent filing; no public code.
- Ross Anderson. The Serpent C implementation was written by others.
- Michael Weber, Kevin Groves, Phil Wilson ("Scronty"). No attributable public code.
- Martti Malmi, Laszlo Hanyecz, Marco Falke, Alex Morcos, Russell O'Connor, Patrick Strateman, Jonas Nick, Nils Schneider. No usable independent C/C++ (their public C or C++ is inside Bitcoin, tiny, or in another language).
- Team theories (the 2016 Financial Times group; the 2026 Finding Satoshi film) have no joint corpus; the named members are in the rows above. A "European computer collective" is not a named author.
A caveat
Coding style is evidence, not proof. Layout and naming are learned conventions, they are often imposed by a project, and a person can write in more than one style; Gavin Andresen's three corpora are the demonstration. Someone hiding an identity could also change style on purpose. Several of the C corpora (Finney, Back, Le Roux, Mixmaster, Paketto, Garzik) cannot show C++-only habits such as class names and references, and C culture itself favours goto, /* */, snake_case and == NULL, which pushes those rows away from Satoshi. The metrics are regex measurements, not a full parse, and some samples are small or only fragments.
With those limits stated, the comparison is still consistent. Satoshi's two builds sit 0.30 apart. The closest independent pre-2009 code is Wei Dai at 1.02, and even that file fails the habits that make Satoshi's naming a fingerprint. Code that looks like his was written later, inside Bitcoin itself.
The habit-by-habit account of Satoshi's own style, with samples from the November 2008 build and from v0.1.0, is in Satoshi Nakamoto's Coding Style. Full method, tables, source mirrors and the writing-style section are in the research archive.
Licenses and sources
Excerpts are short quotations from the scored corpora, for comparison. Bitcoin v0.1.0 is MIT/X11, copyright 2009 Satoshi Nakamoto. Crypto++ 5.5.2 is under its Boost / historical public-domain dedication; see mirror/weidai/cryptopp-5.5.2/License.txt in this archive. zfec is an open-source extract in the public tree (typically GPL / TGPPL; the research manifest's Crypto++ label on that extract is imprecise, as LICENSES.md notes).
hashcash 1.21 may be used under CPL, a public-domain dedication, a 3-clause BSD license, LGPL 2.1 or GPL 2, as stated in its LICENSE file. RPOW carries a BSD-style license, copyright 2004 Hal Finney, in the source headers. Mixmaster 3.0 may be redistributed and modified under the terms in its COPYRIGHT file (copyright 1999–2006 Anonymizer Inc. and others). E4M 2.01 is copyright 1998–99 Paul Le Roux; the file header points to its license.txt. jTime, Open Inventor, Bitcoin Core, zcashd and the other quoted projects remain under their upstream licenses.
The full source trees for hashcash, RPOW, Mixmaster, E4M and several later corpora are not in the public archive, because their redistributability was marked unclear. They are listed with retrieval URLs in EXCLUDED.csv. This page quotes only short passages already used in the research report.
