Pages:
Author

Topic: Nxt source code flaw reports - page 15. (Read 113378 times)

rlh
hero member
Activity: 804
Merit: 1004
January 17, 2014, 04:03:42 PM
Yes, the key should only be saved if it's in a block...

Yes, my assumption would be that the one that "wins" is the first transaction with the matched key that is received by the node that forges the block.  So, you send out 30 transactions, each with different keys, but which ever node forges the inclusive block should only select the first TX that it received, and ignore all of the others.

Make sense?
newbie
Activity: 56
Merit: 0
January 17, 2014, 03:42:39 PM
Yes, the key should only be saved if it's in a block...
legendary
Activity: 2142
Merit: 1010
Newbie
January 17, 2014, 03:34:40 PM
I may be missing something.  Bob sends out 2 different colliding transactions , but those 2 transactions are still not on the blockchain yet, right?  They are still out there floating around waiting for a forging node to sign them into a block, right?  Wouldnt eventually one make it and the other wouldnt?  Or assuming they both made their way to the forging node for inclusion into the next block, then I guess the forging node would determine which one to make permanent, right?

Full key is set when a transaction is verified, no matter if it's unconfirmed. Removing key setting in unconfirmed transactions solves this issue.
full member
Activity: 238
Merit: 100
January 17, 2014, 03:33:02 PM
It's time for evil Bob to return once again. Smiley
Not with the fatal flaw, but still, Bob can cause quite a bit of damage with that...

Our friend Bob has some left-over hardware that is too inefficient to mine BTC, so he decides to wreak havok on the NXT blockchain instead...
He tasks his GPUs with finding 64bit collissions in account numbers. It doesn't matter which account, just that there is a 64bit collission.
Because of the birthday phenomenon that's actually not that hard to do.
When he has found enough collissions, e.g. a few, but it starts to work even with 2, so let's say Bob just found 2, he starts with his evil plan.
He makes 2 transactions and signes each with a different key that results in the same account number.
Then he calls "processTransactions" on all the peers he knows, and sends the first transactions to half the peers, and the second transaction to the other half.
What should happen now?
The network should decide on the public key that gets into the blockchain first and invalidate the other transaction, no problem.
But what actually happens?
Each peer analyses the transaction, sees that there was no transaction from that account before and adds the new public key to the account.
Now half the network has a different public key for the account than the other half.
If now any peer generates a block, the other half of the network will not accept that block, because it knows a different public key for one of its transactions, and we have a nice split of the blockchain that can't be resolved. Smiley

If Bob is a bit more patient and waits for a few more collissions (not neccessarily on the same account), he can generate even more separate blockchains and cause some nice chaos.  Roll Eyes

Good catch. What fix do u propose?
I may be missing something.  Bob sends out 2 different colliding transactions , but those 2 transactions are still not on the blockchain yet, right?  They are still out there floating around waiting for a forging node to sign them into a block, right?  Wouldnt eventually one make it and the other wouldnt?  Or assuming they both made their way to the forging node for inclusion into the next block, then I guess the forging node should then have to determine which one to make permanent, and which to reject, right?

Or I could just be smart enough to make myself look dumb here, which is most likely the case...
legendary
Activity: 2142
Merit: 1010
Newbie
January 17, 2014, 03:20:53 PM
It's time for evil Bob to return once again. Smiley
Not with the fatal flaw, but still, Bob can cause quite a bit of damage with that...

Our friend Bob has some left-over hardware that is too inefficient to mine BTC, so he decides to wreak havok on the NXT blockchain instead...
He tasks his GPUs with finding 64bit collissions in account numbers. It doesn't matter which account, just that there is a 64bit collission.
Because of the birthday phenomenon that's actually not that hard to do.
When he has found enough collissions, e.g. a few, but it starts to work even with 2, so let's say Bob just found 2, he starts with his evil plan.
He makes 2 transactions and signes each with a different key that results in the same account number.
Then he calls "processTransactions" on all the peers he knows, and sends the first transactions to half the peers, and the second transaction to the other half.
What should happen now?
The network should decide on the public key that gets into the blockchain first and invalidate the other transaction, no problem.
But what actually happens?
Each peer analyses the transaction, sees that there was no transaction from that account before and adds the new public key to the account.
Now half the network has a different public key for the account than the other half.
If now any peer generates a block, the other half of the network will not accept that block, because it knows a different public key for one of its transactions, and we have a nice split of the blockchain that can't be resolved. Smiley

If Bob is a bit more patient and waits for a few more collissions (not neccessarily on the same account), he can generate even more separate blockchains and cause some nice chaos.  Roll Eyes

Good catch. What fix do u propose?
newbie
Activity: 56
Merit: 0
January 17, 2014, 03:14:34 PM
It's time for evil Bob to return once again. Smiley
Not with the fatal flaw, but still, Bob can cause quite a bit of damage with that...

Our friend Bob has some left-over hardware that is too inefficient to mine BTC, so he decides to wreak havok on the NXT blockchain instead...
He tasks his GPUs with finding 64bit collissions in account numbers. It doesn't matter which account, just that there is a 64bit collission.
Because of the birthday phenomenon that's actually not that hard to do.
When he has found enough collissions, e.g. a few, but it starts to work even with 2, so let's say Bob just found 2, he starts with his evil plan.
He makes 2 transactions and signes each with a different key that results in the same account number.
Then he calls "processTransactions" on all the peers he knows, and sends the first transactions to half the peers, and the second transaction to the other half.
What should happen now?
The network should decide on the public key that gets into the blockchain first and invalidate the other transaction, no problem.
But what actually happens?
Each peer analyses the transaction, sees that there was no transaction from that account before and adds the new public key to the account.
Now half the network has a different public key for the account than the other half.
If now any peer generates a block, the other half of the network will not accept that block, because it knows a different public key for one of its transactions, and we have a nice split of the blockchain that can't be resolved. Smiley

If Bob is a bit more patient and waits for a few more collissions (not neccessarily on the same account), he can generate even more separate blockchains and cause some nice chaos.  Roll Eyes
legendary
Activity: 2142
Merit: 1010
Newbie
January 17, 2014, 02:50:44 PM
Interesting callenge Grin Ill take a closer look to the source code later. Has someone found a flaw yet or are they sill undiscoverd?

2 flaws were found. The fatal flaw with 100K reward is still waiting for u.
tyz
legendary
Activity: 3360
Merit: 1533
January 17, 2014, 02:40:50 PM
Interesting callenge Grin Ill take a closer look to the source code later. Has someone found a flaw yet or are they sill undiscoverd?
legendary
Activity: 2142
Merit: 1010
Newbie
January 17, 2014, 03:11:31 AM
This might be a silly question 'cause I only just started looking at the Nxt client source and I'm not really familiar with Java, but starting with a null blockchain, couldn't an attacker change program lines 4749-4757 like:

Code: (lines 4749 - 4757)
 int elapsedTime = lastBlock.timestamp + 60;
/* if (elapsedTime > 0) { */

    BigInteger target = BigInteger.valueOf(Block.getBaseTarget()).multiply(BigInteger.valueOf(account.getEffectiveBalance())).multiply(BigInteger.valueOf(elapsedTime));
    if (hits.get(account).compareTo(target) < 0) {

        account.generateBlock(user.secretPhrase);

/*   } */

and comment out the "Peer.sendToAllPeers(request);" on line 300.

Wouldn't the modified program in effect be bootstrapping a blockchain with only a genesis block and all empty transaction blocks?  Once the empty blockchain was longer than the network blockchain (and it will be 'cause it's cranking out empty blocks as fast as it can now that we disabled the time check) stop the modified program, then run a good unmodified client on our empty blockchain which would send that empty blockchain to the network?  Since the empty chain is longer, the empty chain would be favored over the network's chain?  Or am I missing something?


This chain will be "shorter" and hence will be rejected.
sr. member
Activity: 490
Merit: 250
I don't really come from outer space.
January 17, 2014, 03:06:44 AM
This might be a silly question 'cause I only just started looking at the Nxt client source and I'm not really familiar with Java, but starting with a null blockchain, couldn't an attacker change program lines 4749-4757 like:

Code: (lines 4749 - 4757)
 int elapsedTime = lastBlock.timestamp + 60;
/* if (elapsedTime > 0) { */

    BigInteger target = BigInteger.valueOf(Block.getBaseTarget()).multiply(BigInteger.valueOf(account.getEffectiveBalance())).multiply(BigInteger.valueOf(elapsedTime));
    if (hits.get(account).compareTo(target) < 0) {

        account.generateBlock(user.secretPhrase);

/*   } */

and comment out the "Peer.sendToAllPeers(request);" on line 300.

Wouldn't the modified program in effect be bootstrapping a blockchain with only a genesis block and all empty transaction blocks?  Once the empty blockchain was longer than the network blockchain (and it will be 'cause it's cranking out empty blocks as fast as it can now that we disabled the time check) stop the modified program, then run a good unmodified client on our empty blockchain which would send that empty blockchain to the network?  Since the empty chain is longer, the empty chain would be favored over the network's chain?  Or am I missing something?
hero member
Activity: 644
Merit: 500
January 16, 2014, 02:12:02 PM
Sounds like multiverse concept. We already have coins and anticoins, superposition of transactions lost in limbo, event horizon that limits rate of the transactions, time warp of transparent forging...
So another slogan here:

Nxt will blow your mind like quantum mechanics did!
legendary
Activity: 2142
Merit: 1010
Newbie
January 16, 2014, 01:40:49 AM
Whether there is any sense in the generation of an empty (without transactions) block?

Yes, the same as in Bitcoin.
newbie
Activity: 35
Merit: 0
January 15, 2014, 11:19:16 PM
Whether there is any sense in the generation of an empty (without transactions) block?
legendary
Activity: 1470
Merit: 1004
January 15, 2014, 03:54:16 PM
I guess it is not my "birthday", (after some hinting) Wink and i am not going too have my small investment stolen by some 16 year old script kiddie.
Therefore, im creating my own cryptocurrency, whos with me?

Quote
It's been repeated hundred of times already, your account is your PK, which is 256bits,
once you do first trasaction, you're safe.

Hehe, but seriosly, can not find the "rejection" part, show me Smiley Also, why would you create an alt coin of nxt, it is already as good as it gets:D

Humble regards
j0b

Because we may ultimately need more supply and to use coins for different purpose, not necessarily just to buy things.
full member
Activity: 137
Merit: 100
January 15, 2014, 03:27:32 PM
I guess it is not my "birthday", (after some hinting) Wink and i am not going too have my small investment stolen by some 16 year old script kiddie.
Therefore, im creating my own cryptocurrency, whos with me?

Quote
It's been repeated hundred of times already, your account is your PK, which is 256bits,
once you do first trasaction, you're safe.

Hehe, but seriosly, can not find the "rejection" part, show me Smiley Also, why would you create an alt coin of nxt, it is already as good as it gets:D

Humble regards
j0b
legendary
Activity: 2142
Merit: 1010
Newbie
January 15, 2014, 12:45:31 PM
Is it going to be built on top of Nxt, so we can use it within Nxt?  Thanks.

Yes, on top of Nxt using Arbitrary Messages.
legendary
Activity: 1470
Merit: 1004
January 15, 2014, 12:36:41 PM
You can use google translater to english, it's good enough to get the main points.

Of course, thank you
hero member
Activity: 687
Merit: 500
January 15, 2014, 11:53:15 AM
You can use google translater to english, it's good enough to get the main points.
legendary
Activity: 1470
Merit: 1004
January 15, 2014, 11:41:16 AM
Is anyone offering the service of creating an altcoin based on the algorithm of Nxt?

I'm launching a coin based on Nxt soon. It will use AM and Nxt blockchain. Sources will be written in JavaScript and completely open. (https://bitcointalksearch.org/topic/2-415580)

Would it be possible for you to translate (English) your first post, just so we have an idea?  Is it going to be built on top of Nxt, so we can use it within Nxt?  Thanks.
legendary
Activity: 2142
Merit: 1010
Newbie
January 15, 2014, 09:54:58 AM
Is anyone offering the service of creating an altcoin based on the algorithm of Nxt?

I'm launching a coin based on Nxt soon. It will use AM and Nxt blockchain. Sources will be written in JavaScript and completely open. (https://bitcointalksearch.org/topic/2-415580)

lol, you mean completely open to russian readers?

Upon the launch I'll post all info in English.
Pages:
Jump to: