Rusty Russell
e899c47260
bitcoin/base58: don't segv if key_to_base58 / key_from_base58 called first.
We need to initialize b58_sha256_impl here too.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Christian Decker
452656f5a1
base58: Making check-source happy again
Trailing whitespace and include ordering was broken.
8 years ago
Lucas Betschart
3e6bb958eb
Add libbase58 as git submodule
Pointing to the latest release (0.1.4)
8 years ago
Rusty Russell
a4fdaab5b3
Use global secp256k1_ctx instead of passing it around.
If I'd known how large this patch would be (though trivial), I'd
have done it in parts.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
bcd3e5f60e
base58: fix check-source header order check.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
9 years ago
Christian Decker
1f4a056009
Switched base58 to use libbase58.
9 years ago
Rusty Russell
364c2cd2c0
key_from_base58 / pubkey_from_privkey: don't support non-compressed keys.
It just clutters the API, and we don't support them on the wire anyway.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
9 years ago
Rusty Russell
9aa0eac814
bitcoin: hand in a secp256k1_context to all routines.
We don't want to re-create them internally, ever.
The test-cli tools are patched to generate them all the time, but
they're not performance critical.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
9 years ago
Rusty Russell
04fd2c861f
bitcoin/base58: p2sh address support.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
9 years ago
Rusty Russell
9ebbe16b1e
source cleanup: sort include lines into alpha order
This makes merging easier in future.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
9 years ago
Rusty Russell
242fa1b2dd
pubkey: pubkey_eq helper.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
9 years ago
Rusty Russell
e7856e6e69
Update libsecp to git@github.com:bitcoin/secp256k1.git 52fd03f
We want the ecdh stuff for onion routing.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
9 years ago
Rusty Russell
8f64eb90af
Switch over to CCAN's ripemd160.
Avoids handing naked u8 arrays around, too.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
d20ddb5a90
Use libsecp256k1 instead of openssl for crypto.
We still use openssl for bignums (base58) and for ripemd.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
ef9463f6b1
Sort include lines (ignoring hacky cli test utils).
Put ccan first, openssl next, then standard headers, then locals.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
612d713470
Move bitcoin stuff into bitcoin subdir.
It's not very interesting if you're looking for LN code.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
07c7214edb
Explicit pubkey structure.
This checks that the protobuf is the right form, also handles uncompressed
keys (though you shouldn't be using those any more, should you?)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
1c4fdce514
Initial silly cmdline util to create an openchannel packet.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago