Bitcoin Forum
April 19, 2024, 02:46:05 PM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 ... 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 [403] 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 »
8041  Bitcoin / Development & Technical Discussion / Re: A few technical questions about the wallet.dat on: November 02, 2010, 06:08:27 AM
So, if I understand correctly, an address can receive many payments but only send one?

No. The address is "used" in the sense that it is removed from the pool and put into the wallet proper. The addresses can be used for unlimited sending and receiving.

Nearly every time you send bitcoins, you also end up creating a brand new address and sending some "random" number of bitcoins to it (back to yourself). This new address takes one address from the pool, puts it into the regular section of the wallet, and generates a new address to "top off" the pool. Wallet backups are good for only 100 "new address actions" because addresses generated after that will not be in the old wallet.

Back up your wallet. Hit "New Address" 100 times. All of those addresses are in the backup. Create one more address and you've created an address that's not in the backup -- it will be lost if you restore from the backup.

Quote
Attempting to answer my own question regarding running multiple bitcoin clients using the same wallet.dat, it seems that this would work until one of the actions listed on the backup wikipage takes place. Then the wallets would diverge and one of them would become invalid. (Or at the very least, they would contain pre-generated addresses that aren't identical, and once those addresses are used something bad would happen.)

They would diverge after a new address action, though this would only become apparent after their pools are exhausted. They'll both be able to see and spend transactions sent from and to the addresses that they share (current addresses + 100 pooled addresses). Bitcoin will synch their shared transactions to some degree by looking at the block chain, but this is not an intended use of Bitcoin and you will run into occasional errors.
8042  Bitcoin / Development & Technical Discussion / Re: A few technical questions about the wallet.dat on: November 02, 2010, 04:10:33 AM
See http://www.bitcoin.org/wiki/doku.php?id=backup

All transactions to a particular Bitcoin address are to one key. Once you create the address (key), your wallet will always contain the necessary information to receive using that address. Somewhat counter-intuitively, receiving with a Bitcoin address is one of the few activities that does not require backing up your wallet.dat.

Quote
Secondly, I'm given to understand that all transactions in the bitcoin network are public, that the block chain effectively contains the complete ownership history of each coin since it was created. So, how can I examine that history?

You can use Bitcoin's -printblock or the getblock patch for RPC. See these wiki pages for some necessary background info:
http://www.bitcoin.org/wiki/doku.php?id=block
http://www.bitcoin.org/wiki/doku.php?id=transactions

I'm making an easy-to-use web tool for looking at this data.
8043  Bitcoin / Bitcoin Discussion / Re: Government vs Bitcoin ? on: November 01, 2010, 04:21:21 PM
amirite or am i still missing something here ?

You're currently allowed to make complex transactions that can, for example, be redeemed by either of two public keys (whoever gets it firsts wins). This would be impossible in a balance sheet system unless you also record the transaction script, and if you do that you're right back at full transactions.
8044  Bitcoin / Bitcoin Discussion / Re: Government vs Bitcoin ? on: November 01, 2010, 03:34:12 PM
EDIT : Well I guess a generator needs to check for double-spending when including incoming transactions, but that doesn't really change much since that could be solved with balance sheets, simply by network rejection of blocks that contain invalid transactions after they've been generated, or by a much smarter solution =) I didn't think of.

To be able to say, "No other transaction has spent these coins," you need to know the contents of every other transaction. There's simply no way around this. Balance sheets would reduce the space required for each transaction, but this would remove the useful script functionality, since every transaction would need to be sent to exactly one public key or hash.

Balance sheets are basically "simple transactions":
So to correct my balance sheet idea in one fashion, as well as the balance for each individual public key, the balance sheet would also have to keep enough information about the blocks which contain the transactions crediting the public key to enable references to those crediting transactions to be generated when spending the money. So instead of storing the public key and the balance, the balance sheet would have to store the public key, a list of crediting references and their corresponding credit amounts - the total credit being the balance. Anything more?

We'd probably have to change the name from "balance sheet" to "complete current credits list".

Even with balance sheets, you'd still have 100-200 bytes per transaction, which doesn't help the network end (the real problem).
8045  Bitcoin / Bitcoin Discussion / Re: Government vs Bitcoin ? on: November 01, 2010, 12:41:41 PM
- There seem to be lots of solutions around that address the disk space problem

It's possible for non-generators to store almost nothing. However, the purpose of the network is to verify that transactions are not double-spending, and this is only possible if the generators know all of the current unspent transactions.
8046  Bitcoin / Bitcoin Discussion / Re: Government vs Bitcoin ? on: November 01, 2010, 01:41:15 AM
Quote from: davout
2. stop right after difficulty increase, significantly slowing down the block generation and transaction handling

The available transaction fees will accumulate. Whoever generates the next block might get 2000+ BTC. This will encourage a return to something close to a normal rate of generation. Bitcoin won't become unusable, just more expensive.

Perhaps the client should generate khashes by default, using 25% of computer's cores (or 25% power of GFX cards) ?
This could strenghten the network a lot.

This would never work in the long-run. In a few years, being a generator will require amounts of disk space and bandwidth that are unreasonable for most users.

PayPal does 382,000 transactions per minute. If we want Bitcoin to do 100,000 per minute, every generator would need at least a 5.76 megabit (upload and download) connection.

If some irrational and wealthy organization (such as a government) wants to take Bitcoin offline, there's nothing that can be done to stop them. It will be very expensive for them to maintain this, though.
8047  Bitcoin / Development & Technical Discussion / Re: Decentralized Bitcoin scratch-off cards on: October 29, 2010, 09:10:51 PM
ArtForz on IRC came up with a much simpler solution with the same result.

Code:
<encrypted private key> OP_DROP <pubKey> OP_CHECKSIG

The private key is encrypted with AES-256. To create a code:
1. Get 60 bits of random data.
2. Generate a new ECDSA keypair.
3. Encrypt the private portion of the keypair with a hashed version of the random numbers.
4. Create the transaction shown above.
5. Write down the random numbers and transaction hash in base64.

To redeem:
1. Find the transaction in the block chain using the transaction hash (only a small portion of it is needed).
2. Hash the "password" that you received and use it to decrypt the private key.
3. Use the private key to sign a new transaction to yourself.
4. Get coins.

That's only 15-18 characters that you have to type in order to redeem! I believe that's less than a Tracfone card code.
8048  Bitcoin / Project Development / Re: Chrome Bitcoin Extension Bounty(300 BTC pledged) on: October 29, 2010, 03:06:01 PM
Quote
\b1[1-9a-km-zA-HJ-NP-Z]{32,34}\b

Valid addresses can be 25-34 characters in length, though the smaller ones are very rare.

Testnet addresses can be 35 characters long, and they don't always start with a 1.
8049  Bitcoin / Bitcoin Technical Support / Re: Offline key generation on: October 29, 2010, 12:31:58 PM
It's technically possible, but Bitcoin isn't yet able to import/export keys. You could probably do something like that by swapping wallet files around, though the "checking" account wouldn't detect transactions to the "savings" account.
8050  Bitcoin / Development & Technical Discussion / Re: Decentralized Bitcoin scratch-off cards on: October 29, 2010, 03:34:20 AM
The private key is used as a hash, not for authentication. I don't care if people can create a valid signature: I only care that doing this will take them a few minutes with the proof-of-work scheme.

Consider that Bitcoin blocks could be done in the same way. The hash is replaced with a signature. Signatures less than than the target are valid, and people publish the public+private key in the block for verification (the private key isn't necessary, but it does no harm when public-key cryptography is used like this). There would be no point in doing it this way of course, but it would be possible. The reason I'm doing it like this here is that only OP_CHECKSIG can read the transaction outputs.

Quote
Is this "private key revelation" just something you've introduced for your scratch-off card scheme or do you think that normal transactions reveal the private key?

Of course this isn't done for normal transactions. They're using the keys for authentication; I'm using it as a proof-of-work.
8051  Bitcoin / Development & Technical Discussion / Re: Decentralized Bitcoin scratch-off cards on: October 29, 2010, 03:10:20 AM
The person creating the card generates an ECDSA keypair. This consists of two pieces of data: a public key and a private key. Anyone who has the private key can make signatures that validate with the public key.

The card creator creates a transaction that contains both the public key and the private key. The private key is no longer really private, though it is still considered the "private key" portion.

The card creator also generates some random numbers. They write these down. They append to these numbers the first few bytes of this public key (or private key). They hash this and add it to the transaction.

The person redeeming the transaction gets a piece of paper with the transaction hash and the random numbers that were written down above. They find the transaction in the block chain. Reading the transaction, they find the public key. They append this to the random numbers on the piece of paper. This is the code.

The person redeeming the transaction also looks at the transaction and finds the private key (which is totally revealed any not really "private"). Using this pair, he creates and signs a new transaction to himself. He now has the coins (after some proof-of-work retries).

The keypair used here is public and not really owned by anyone. We are not using it as intended. It is just a method of delaying attackers. It is used very much like a hash. Surely a more elegant solution could be used if Script supported it.
8052  Bitcoin / Development & Technical Discussion / Re: Decentralized Bitcoin scratch-off cards on: October 29, 2010, 02:26:45 AM
Perhaps you would find it useful to read:
http://www.bitcoin.org/wiki/doku.php?id=transactions

Quote
What we're discussing is minimizing the amount of typing required to redeem Bitcoin scratch-off cards.

That's right. I think it would be very convenient to give/sell simple codes that can be redeemed instead of sending to an address. It follows the more traditional model of receiving money instead of sending it.

Various schemes such as this have been discussed, but they all entail either an electronic device or such a large amount of data that a QR code is required. The OP is about a way to do it with codes small enough to type.

Quote
a basic card shows the public key (or address) credited with Bitcoins so that anyone can check the value and that it's unspent once they type in enough characters into their card-savvy client to uniquely identify it from the block chain.

Almost right, but replace "public key" with "transaction hash". The redeeming person is not taking over a keypair. They are collecting the output of a transaction. A similar collection process is done whenever you send a transaction -- you collect the coins that you're sending. In this case you would actually want to collect the output right away (make a transaction to yourself) so that the sender can't take it back. With the hash, you are able to verify that an appropriate output exists and has not been collected already.

Quote
The scratch-off bit protects the private key, most of which needs to be entered but the last few digits can be bruteforced by the client program to save you typing. It does this by trying all possible values of the rest of the private key until it matches the public key.

The security of this would be horrible. I am definitely not proposing anything like this. Somehow, the rest of your post is an accurate summary, even though you believed this.

Quote
The vast majority of scripts effectively check that you have knowledge of the private key for the public key which the "In" transaction was intended to credit. The script checks this by making you sign something. What exactly?

All current scripts check that you have knowledge of the private key for the public key which the output of a transaction was intended to credit.

OP_CHECKSIG checks that you've signed the entire transaction -- input and output. The output signature is the important part: it prevents a MITM from rewriting your transaction. Just a hash wouldn't give this protection, which is why the signature is necessary.

Quote
Could you could clairfy what these things are and where they come from please?
- The real code is on the card. The hashed version of it is in the publicly-available transaction that you will collect.
- The provided code is provided by someone when they try to collect the transaction.
- The private key is in the publicly-available transaction that you will collect. Maybe part of it is on the card.
- The target is specified by the person creating the card/transaction/code. A lower target is more secure, but it will take longer to process the proof-of-work for the redemption.
- The signature is made using the private key in the publicly-available transaction.

Quote
The scratch-off portion reveals a shortish code, the hash of which is included in the script. The hash in the script is salted with something else in the script or otherwise publicly available to discourage "rainbow tables" attacks. What is it?

You can use part of the private key or part of the public key. Anything random that is known by both the card creator and the redeemer. It's added to the code given to the network. So if the code on the card is 1122 and the salt is 4, the real code is 41122. The hash of this is the hash in the transaction. This salted code is the code as the network sees it.

Quote
You say the salt is "the first few bytes of the private key". Whose private key? If it's yours how does the card generator know it. If it's anyone else's how do you know it?

It's the key made public in the transaction. This keypair, being public, should be freshly-generated by the person making the card.

Quote
and provide the public key that allows people to check that it's a real signature

The card creator supplies the public key, not the redeemer.

Quote
Could it generate the good quality signatures for all cards in advance?

The output is also signed. If this was not the case, all current Bitcoin transactions could also be stolen in the same way.

Quote
What numbers are available for pushing on to the stack and what operations work a the moment? Can you specify for example that a transaction using yours as an "In" must have another "In"?

I'm working on a page on the wiki (to be named "script") that will list them all. It's all specified in script.cpp. You can't do that, though.
8053  Bitcoin / Bitcoin Discussion / Re: A lucrative attack on bitcoin? on: October 29, 2010, 01:48:43 AM
In any case, ArtForz controls 30%+ of the network's CPU, and he would immediately adjust his fee rates in response to a block flood. Eventually dedicated companies will own the network's CPU and will be able to do likewise.
8054  Bitcoin / Development & Technical Discussion / Re: Decentralized Bitcoin scratch-off cards on: October 28, 2010, 07:04:56 PM
Quote
That sounds fascinating. So the scripting language is fully enabled at the moment? I thought it was present but lobotomized.

The script functionality is limited. Some commands are disabled. It's still possible to do some interesting things with it, though.

Quote
Could you talk us through the little script you published?

I realized that the OP_DUP in my script is redundant. Take that out.

When you redeem, you publish the signature and the code (in that order). They are prepended to the script I wrote. To determine whether your transaction is valid, nodes go through these steps (moving left-to-right through the full script):
1. The signature, code, and private key are put on the stack.
2. The private key is discarded (OP_DROP). This is just data meant to be read by the person making the transaction, and is not necessary for verification.
3. The top code is replaced by a hashed version (OP_HASH256).
4. The real hashed code is put on the stack.
5. The the top two items on the stack (the hash of the real code and the hash of the provided code) are compared, and then these items removed (OP_EQUALVERIFY).
6. The public key is put on the stack.
7. The signature is compared to the public key (OP_CHECKSIG).

The script will evaluate to true if the provided signature is valid for the public key in the later part of the script (scriptPubKey) and the hash of the provided code is equal to the hash in the scriptPubKey.

Quote
I presume that this requires new clients?

Yes. Only the sender and recipient need to upgrade, though.

Quote
I disagree very strongly. I believe the computations you mention could be done in much less time than network latancies.

An attacker probably would win at that point usually. However, the question is whether the full private key can be recovered with a cost less than the cost of the number of bitcoins transmitted, and in less time than it takes for the code to be used by the intended recipient. Hopefully any attack would be too expensive. I am not familiar with partial-key attacks, though; it could very well be a trivial matter to recover a private key when you have 90% of it.

Quote
I don't understand how this links with the previous bit of your post. Please explain.

I'm trying to figure out the required length for the code. This is a similar case to figuring out appropriate password length, but with the important difference that each byte has much more entropy.

Quote
What scripting functions would need to be added to support it?

I just realized that this is possible now! I thought that all of the arithmetic functions were disabled, but actually only some of them are. You would use a script like this:
Code:
<private key> OP_DROP OP_HASH256 <hashed code> OP_EQUALVERIFY OP_DUP <target that the sig must be below> OP_LESSTHAN OP_IF <pubkey> OP_CHECKSIG OP_ENDIF

The person redeeming provides a signature and a code (in that order). It would evaluate like this:
1. The signature, code, and private key are put on the stack.
2. The private key is removed (OP_DROP).
3. The code is hashed (OP_HASH256).
4. The real code is put on the stack.
5. The real code is compared to the provided code, and both are removed (OP_EQUALVERIFY).
6. The signature is duplicated on the stack (OP_DUP).
7. The target is put on the stack.
8. If the signature is less than the target, 1 is put on the stack. Otherwise 0. Both items are removed.
9. If 1 is the the top item on the stack, go to 10 and 11. Otherwise, the transaction will not be valid.
10. The public key is put on the stack.
11. The signature is compared to the public key (OP_CHECKSIG).

This is assuming the signature can be converted into a bignum. Otherwise I think we'd need OP_SUBSTR, which is disabled.

So I believe it is right now possible (with a modified client) to transfer bitcoins using an ~8-character code! It'd probably even be safe to reduce that to 6 characters.
8055  Bitcoin / Bitcoin Discussion / Re: no confirmations on: October 28, 2010, 01:38:55 PM
What version are you using? Versions older than 0.3.13 will send bad transactions that most generators won't accept if you've ever received a similar bad transaction.

Run Bitcoin with the -debug switch and double-click the transaction. Paste the hash here. The hash is located under the "transaction" header:
CTransaction(hash=c3821b, ver=1, ...

Maybe that transaction didn't propagate correctly and it took that long before it was rebroadcast?

That is possible. Bitcoin waits a long time before it rebroadcasts, and it might take an especially long time if you never leave Bitcoin open for longer than a few hours.

Maybe somebody is simply messing with the network using a botnet or other large scale attack ?
I would like to hear Satoshi's opinion on what would exactly happen if (50% - 1) nodes of the network started to revoke the same transactions simultaneously. I mean there would be 50% - 1 "cheaters" working together, and the rest would be honest nodes.

Would the network still work properly in that case ? Or perhaps would some transactions be irreversably damaged ? Would the network figure out which hash calculations to trust and which not ?

An attacker with more than 50% of the network's CPU could prevent a specific transaction from gaining confirmations. See the wiki. There's pretty much no chance that this is happening here, though.

You might be able to do this for a while with less than 50% of the network. It depends on how lucky you are. You need to create more than 50% of blocks.
8056  Bitcoin / Development & Technical Discussion / Re: Rainbow tables against Botnets? on: October 27, 2010, 10:28:48 PM
All of the data that Bitcoin hashes is too large and random to use rainbow tables with.
8057  Economy / Economics / Re: Price Deflation Discourage Investment? on: October 27, 2010, 08:18:22 AM
Generating is just like buying bitcoins, except you pay with electricity and time.
8058  Bitcoin / Bitcoin Discussion / Re: Bitbot Need a New Home! on: October 27, 2010, 08:00:26 AM
I think Mizerydearia is planning to release bitbot's source. That would allow a new bitbot to be set up on a more stable server, or at least a backup bot to be made.
8059  Bitcoin / Bitcoin Discussion / Re: A lucrative attack on bitcoin? on: October 26, 2010, 11:52:04 PM
Quote from: ByteCoin
so theymos is easily out by a factor of 100.

I forgot to move the decimal over for the fee per KB.  Embarrassed
8060  Bitcoin / Bitcoin Discussion / Re: A lucrative attack on bitcoin? on: October 26, 2010, 08:50:01 PM
Large blocks are a valid DoS attack against bitcoin, presently.  Transaction fees kick in at higher block sizes, but it still remains quite inexpensive to flood the network, even if you are paying full TX fees right up to the 1MB (?) block limit.  I dunno about lucrative, but...

Driving a block to 1MB costs 21 million BTC. I don't think attackers are going to pay...

Code:
if (nNewBlockSize >= MAX_BLOCK_SIZE_GEN)
                return MAX_MONEY;

Here's how much it would cost (estimates) to make the block size go to various levels:
-50 KB: Free
-250 KB: 2 BTC
-300 KB: 127 BTC
-350 KB: 293 BTC
-400 KB: 543 BTC
-450 KB: 1043 BTC
-490 KB: 3543 BTC
-495 KB: 8543 BTC
-499 KB: 33543 BTC

Attackers can feel free to pay 500 BTC every 10 minutes to make sending transactions expensive...
Pages: « 1 ... 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 [403] 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!