Tips to Avoid Double Spending after Decoding Keys

19 replies 384 views
Posts: 0 · Reputation: 11
#1Oct 7, 2023, 08:03 PM
so if I import the private key to Electrum and send to my address, is that safe enough? or can bots still double spend on me
4 Reply Quote Share
RogueCipherFull Member
Posts: 11 · Reputation: 453
#2Oct 7, 2023, 10:28 PM
need more clarity here. where's the private key coming from and which address you sending to? but if about double spending, you should be fine if you wait for at least 1 confirmation for smaller amounts, and 3 for big ones
4 Reply Quote Share
0x4lphaFull Member
Posts: 150 · Reputation: 509
#3Oct 8, 2023, 12:55 AM
like, why not just sweep the private key directly? importing it is okay too, but only if you’re sure it’s secure and the wallet you send to isn’t compromised
4 Reply Quote Share
Posts: 0 · Reputation: 11
#4Oct 8, 2023, 06:18 AM
if someone manages to find the private key using some algorithm, that’s a huge risk. the public key goes public as soon as a transaction hits the network, right? how do we stop double spends before that?
0 Reply Quote Share
Posts: 47 · Reputation: 24
#5Oct 8, 2023, 08:06 AM
I’m not super into the Bitcoin Puzzle stuff, but yeah, if those public keys can get figured out fast, it’s kind of crazy. If someone broadcasts their tx right when you do, it’s like a race to the block
2 Reply Quote Share
Posts: 7 · Reputation: 211
#6Oct 8, 2023, 09:25 AM
it's like, what's the point of the puzzle if just anyone can come in and take your coins with attacks? Seems flawed if someone can just wait for your transaction and then jump on it.
1 Reply Quote Share
0xLaserFull Member
Posts: 107 · Reputation: 641
#7Oct 8, 2023, 11:55 AM
there's a workaround for this, but it needs OP_CAT. if you could claim the puzzle with any public key, it’d be a different story and Kangaroo attacks wouldn't work, cause there wouldn’t be a known starting point.
3 Reply Quote Share
nova69Member
Posts: 28 · Reputation: 174
#8Oct 8, 2023, 03:10 PM
so if the public key is out there, could someone use BSGS to crack the private key and double spend? seems sketchy
0 Reply Quote Share
yield2016Full Member
Posts: 16 · Reputation: 538
#9Oct 8, 2023, 04:21 PM
public key alone won’t crack the private key. if someone gets the private key first, they need to spend it before any double spending can happen. it’s about not letting the key out in the first place
4 Reply Quote Share
Posts: 0 · Reputation: 11
#10Oct 8, 2023, 07:00 PM
so if you find the private key, first get that Hex to WIF format. don’t use online tools! do it locally. Then import it to Electrum or Blockchain.com, but stay safe on Linux if you can. fees matter for confirmation speed
0 Reply Quote Share
yield2016Full Member
Posts: 16 · Reputation: 538
#11Oct 8, 2023, 07:15 PM
Let's say you found the private key, the first step would be to change the Private key Hexadecimal format to WIF. And you DON'T want to do this with an online tool, all has to be done from your PC. For this, you can use the "Bitcoin Address Utility" https://en.bitcoin.it/wiki/Bitcoin_Address_Utility or any other tool. Then, you can import the WIF private key to a wallet like Electrum, or an online wallet like Blockchain.com But i hardly recommend to do this under a Linux Computer, if you want to do it from Windows there could be some risks. The speed of the confirmations is based on the fees you use and not on the type of address. If you want a fast confirmation then verify how much you need to pay to have a confirmation in the next block, for that you can use the next site: https://mempool.space/ Right now 58 sat/vB is a high priority. And about your double spend fear, there is no way someone else double spend the coins if they don't have the Private Keys.
4 Reply Quote Share
0xChadNewbie
Posts: 138 · Reputation: 3
#12Oct 8, 2023, 10:39 PM
OP is talking about "puzzle transaction" outputs with 66 and 67 bit range private key which can be easily computed from the public key. (check the puzzle's mid ranges with revealed public keys, divisible by 5) The main concern is; the public key will be made public the second he broadcast a transaction that spends that output. Thus, every users that set-up a bot to compute the private key can immediately send a replacement transaction. Unfortunately, the idea of using other scripts wont work in existing puzzles, that specific puzzle's outputs (check "details") are simple P2PKH scripts. The (new) puzzle has to be specifically made using it. I bet you already think of disabling rbf flag? However, even without opt-in-rbf flag, nodes with mempoolrbf option (full-rbf) will still accept a replacement to your transaction. And there are miners that also support full-rbf. The only safe way to do this is to ask a solo miner or pool to include the transaction without relaying it to the network, but that also comes with the issue of trusting the miner whether they wouldn't take the puzzle reward themselves or not.
1 Reply Quote Share
Posts: 0 · Reputation: 11
#13Oct 9, 2023, 03:07 AM
seems this is the only solution so far for those key thanks
4 Reply Quote Share
0xLaserFull Member
Posts: 107 · Reputation: 641
#14Oct 9, 2023, 03:55 AM
Well, it is also possible to share some data, which is needed to mine a block (like transaction ID, transaction Segwit ID, etc.), without sharing transaction data. Then, it would be sufficient to mine a block, but the pool wouldn't know, if it is valid or not. And also, if you want to prove, that you know the public key, but you don't want to reveal it, then you can share for example SHA-256 of that key, and then everyone can validate, that RIPEMD-160 of it is equal to the address, used in the puzzle. For example: This is the public key, which you want to keep secret: 04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef3 8c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f This is what you can share to prove, that you know the public key: 261c1eb21fc4708c6acbe1cfc6d4565652e9e768b620782898936b93000a6c02 This is the hash used in the address: 62e907b15cbf27d5425399ebf6f0fb50ebb88f18 Edit: And also, you can deposit funds on-chain, for example into "OP_RIPEMD160 62e907b15cbf27d5425399ebf6f0fb50ebb88f18 OP_EQUALVERIFY <yourScript>", and then, it would be possible to move those coins, only if you reveal the in-between step (which is 261c1eb21fc4708c6acbe1cfc6d4565652e9e768b620782898936b93000a6c02 in that example), and "<yourScript>" could contain any conditions, like some new public key, to avoid getting those funds captured by other mining pools.
3 Reply Quote Share
Posts: 0 · Reputation: 11
#15Oct 10, 2023, 07:11 AM
application example: this is the addr: 1GG6mV7acidZ461XvLJNcUxNicdpTFAL9Q privkey: ** pubkey(to keep secret): 024693A3AED2774C420787C8DFCFB7B04A5CC456F49D724C20B919A9E42527EE78 i share this: sha256: 07e96ec7a607ae6fef04c1a04786bdfdc1450c16388d4236e0890f100ae1c566 hash160: a764f0b1e02f57f995676949950e8d5bdc951966
0 Reply Quote Share
stacksatsHero Member
Posts: 145 · Reputation: 2023
#16Oct 11, 2023, 01:09 PM
your example not in block chain, of course you know pubkey  address maked by youself.lol. show pubkey from this address: 1JDM9dpQvTHCCcSUan6k1st6VPzqQXTwLZ and this has160 a764f0b1e02f57f995676949950e8d5bdc951966  invalid. ?
4 Reply Quote Share
0xChadNewbie
Posts: 138 · Reputation: 3
#17Oct 11, 2023, 02:23 PM
Fair enough, the miner can start to "mine" the block header without the actual transaction. In the event that they produced a hash lower than the target, they wouldn't be able to broadcast the block without the actual raw transaction. (or would they? Please CMIIAW) And in mining, every millisecond counts so if the transmission of raw transaction isn't coordinated well and quick, other pools/solo miners could broadcast a block in their place. This would need a specialized software in both miner's and user's side to be automated for low latency. Good idea, but I'd like to know how can this be applied exactly to existing P2PKH outputs like what OP is pertaining to? If not possible, the creator of the puzzle may have to consider spending those weak ranges into your proposed output. Original "Puzzle" Transaction: 08389f34c98c606322740c0be6a7125d9860bb8d5cb182c02f98461e5fa6cd15 Supplementary Transaction: 12f34b58b04dfb0233ce889f674781c0e0c7ba95482cca469125af41a78d13b3 Puzzle 66 address: blockstream.info/address/13zb1hQbWVsc2S7ZTZnP2G4undNNpdh5soPuzzle 67 address: blockstream.info/address/1BY8GQbnueYofwSuFAT3USAhGjPrkxDdW9
3 Reply Quote Share
0xLaserFull Member
Posts: 107 · Reputation: 641
#18Oct 11, 2023, 06:55 PM
They would be able to share only the block header. Because to share the actual block, all nodes need to know all transactions behind that. So, it is a game of incentives: there are hashes here and there, and it is a matter of planning, what to share, where, and by whom. Because the reward for the puzzle is something, which can be compared with the basic block reward. So, if one side can say: "we can sweep your reward, if you give us your public key", then another side has similar tools to say "we will keep our spending transaction secret, so you won't be able to do that, and you will lose a block". So, the risk is then on both sides: a key owner risks losing the reward from the puzzle, but the mining pool also risks losing a block. Exactly. It is hard to do, but it is possible to make it trustless. For example, it is possible to spend some coins from such script, and get that transaction deeply confirmed. Then, every mining pool can see, that "the first person, who announced 'I have the public key' signal, is in transaction X, so that reward should go to address Y". And then, it is possible to prepare for claiming that reward, by creating an agreement with major mining pools, that they will accept only a transaction, sending coins to address Y. Then, if some pool will sweep those funds, it will be possible to show everyone a publicly available proof, that "funds from this puzzle were stolen by pool Z". And I bet if no pool will take a risk of destroying their reputation like that, then claiming the reward will be successful.
0 Reply Quote Share
coin88Full Member
Posts: 4 · Reputation: 287
#19Oct 11, 2023, 07:35 PM
Some words from satoshi himself while undercover.
6 Reply Quote Share
Posts: 0 · Reputation: 11
#20Oct 12, 2023, 02:40 AM
no doubt on that! the speed now is crazy imagine how to reach the creator? his last appear here 2019? i believe this the only guaranteed way by giving a proof te the creator that you hit the private key and let him transfer to you
2 Reply Quote Share

Related topics