Hot answers tagged

3

The preimage used when signing messages with Bitcoin Core is a combination of the "Magic" phrase: Bitcoin Signed Message:\n and the Message you are signing. However there is one caveat, being you must have a VarInt prepended to both the "Magic" and the Message. The VarInt encodes the byte-length of the message (encoded in UTF-8). Since the "Magic" value ...


2

The dangers are minimal. There is no restriction on which addresses can send to which other addresses. Most common issues arise from wallets failing to support different address encodings (many wallets still do not support bech32), which results in them rejecting valid addresses. Other, rarer, issues include mixing up address types - a few wallets in the ...


1

Your signatures don't verify because in JCE you are using algorithm SHA256withECDSA which hashes the supplied data (re-hashes, since you are supplying a hash) before doing the kG.x,kinv(h+rd) computation, or the similar verification computation, whereas the spongy/bouncy ECDSASigner used in bitcoinj only does the latter, assuming the input is already the ...


1

With java? Sign it with the program that created the raw transaction, bitcoin-cli. With signrawtransactionwithwallet. Or with signrawtransactionwithkey (0.17.0 RPC) signrawtransactionwithkey "hexstring" ["privatekey1",...] ( [{"txid":"id","vout":n,"scriptPubKey":"hex","redeemScript":"hex","amount":value},...] take txid,vout,scriptPubKey from an online ...


Only top voted, non community-wiki answers of a minimum length are eligible