So... this code is substantially an older copy of Bitcoin Core (maybe copied from the ppcoin codebase? I see some fragments of that) with the attribution removed (in violation of the software license for Bitcoin core) and run through an ugly auto-formatter.
It also doesn't agree with the binary on the site (linux64 sha256sum b07f40515ee75b768424189942d44af8c68b816bfc3018da65f4af273a283183):
E.g. ECDSA verification in the binary on the site gives this disassembly:
54bc00: 48 89 5c 24 e8 mov %rbx,-0x18(%rsp)
54bc05: 48 89 6c 24 f0 mov %rbp,-0x10(%rsp)
54bc0a: 4c 89 64 24 f8 mov %r12,-0x8(%rsp)
54bc0f: 48 83 ec 18 sub $0x18,%rsp
54bc13: 48 8b 2a mov (%rdx),%rbp
54bc16: 48 8b 5a 08 mov 0x8(%rdx),%rbx
54bc1a: 4c 8b 27 mov (%rdi),%r12
54bc1d: 48 89 f7 mov %rsi,%rdi
54bc20: e8 bb a1 03 00 callq 585de0 <_ZNK4coin6sha2566digestEv>
54bc25: 48 89 e9 mov %rbp,%rcx
54bc28: 31 ff xor %edi,%edi
54bc2a: ba 20 00 00 00 mov $0x20,%edx
54bc2f: 48 29 eb sub %rbp,%rbx
54bc32: 4d 89 e1 mov %r12,%r9
54bc35: 48 89 c6 mov %rax,%rsi
54bc38: 41 89 d8 mov %ebx,%r8d
54bc3b: e8 d0 59 1e 00 callq 731610
54bc40: 83 f8 01 cmp $0x1,%eax
54bc43: 48 8b 1c 24 mov (%rsp),%rbx
54bc47: 48 8b 6c 24 08 mov 0x8(%rsp),%rbp
54bc4c: 0f 94 c0 sete %al
54bc4f: 4c 8b 64 24 10 mov 0x10(%rsp),%r12
54bc54: 48 83 c4 18 add $0x18,%rsp
54bc58: c3 retq
54bc59: 90 nop
54bc5a: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1)
compared to this source code:
const sha256 & h, const std::vector
)
{
bool ret = false;
if (signature.size() > 0)
{
auto ptr_signature = &signature[0];
ECDSA_SIG * ecdsa_sig = 0;
/**
* Make sure that the signature looks like a valid signature before
* sending it to OpenSSL (like in the test cases).
*/
if (
(ecdsa_sig = d2i_ECDSA_SIG(
0, &ptr_signature, signature.size())) != 0
)
{
std::uint8_t * pp = 0;
auto len = i2d_ECDSA_SIG(ecdsa_sig, &pp);
ECDSA_SIG_free(ecdsa_sig), ecdsa_sig = 0;
if (pp && len > 0)
{
ret = ECDSA_verify(
0, h.digest(), sha256::digest_length, pp, len, m_EC_KEY
) == 1;
OPENSSL_free(pp), pp = 0;
}
}
}
return ret;
}
Which contains a workaround for the change in OpenSSL behavior that the john-connor was so busily insulting us about. The disassembly shows no calls to d2i_ECDSA_SIG in that function-- the only one in the whole binary is the one inside OpenSSL that was there all along. Extra fun is the fact that this change appears to have been deceptively backdated in the git repository to December 9th.
Doesn't appear to have any of the GUI code either; I wonder what other ways the source doesn't agree with the binary?