Bitcoin Forum
May 25, 2024, 06:24:15 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Are transaction IDs random(ish)?  (Read 1313 times)
TTBit (OP)
Legendary
*
Offline Offline

Activity: 1136
Merit: 1001


View Profile
September 20, 2012, 06:21:53 PM
 #1


By random, I mean not predictable. I ask because SatoshiDice takes the hash of a txid. Would it be possible for someone to calculate the id (or part of an ID) before sending? Why doesn't SD just use the txid?

good judgment comes from experience, and experience comes from bad judgment
Stephen Gornick
Legendary
*
Offline Offline

Activity: 2506
Merit: 1010


View Profile
September 20, 2012, 06:36:23 PM
 #2


By random, I mean not predictable. I ask because SatoshiDice takes the hash of a txid. Would it be possible for someone to calculate the id (or part of an ID) before sending? Why doesn't SD just use the txid?

You can fabricate a transaction ID, so there is no guarantee that the transaction id is random.

The reason it doesn't matter to SatoshiDICE is because the bettor doesn't know the secret used in determining the resulting answer (a number, from zero to 65,535).  If just one bit to the transaction ID is different from another, the resulting answer ends up being a totally different number that is random(ish)ly generated.

At the end of each day, the daily secret that was used can be safely revealed, providing a method for the bettor (or anyone else) to verify the that each bet was addressed fairly.

Here's a thread addressing the use of SHA hashing as random number generation:

 - http://bitcointalk.org/index.php?topic=77206.0

Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


TTBit (OP)
Legendary
*
Offline Offline

Activity: 1136
Merit: 1001


View Profile
September 20, 2012, 07:17:12 PM
 #3

You can fabricate a transaction ID, so there is no guarantee that the transaction id is random.

Thank you.

good judgment comes from experience, and experience comes from bad judgment
scintill
Sr. Member
****
Offline Offline

Activity: 448
Merit: 254


View Profile WWW
September 20, 2012, 07:52:36 PM
 #4

You can fabricate a transaction ID, so there is no guarantee that the transaction id is random.

How much control can you have?  It's a matter of brute force: repeatedly changing inputs and outputs, creating the txid, and seeing if it's what you want, right?

1SCiN5kqkAbxxwesKMsH9GvyWnWP5YK2W | donations
FactoredPrimes
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
September 20, 2012, 08:47:37 PM
 #5

You can fabricate a transaction ID, so there is no guarantee that the transaction id is random.

How much control can you have?  It's a matter of brute force: repeatedly changing inputs and outputs, creating the txid, and seeing if it's what you want, right?

I beleive this is the case.
Stephen Gornick
Legendary
*
Offline Offline

Activity: 2506
Merit: 1010


View Profile
September 21, 2012, 05:25:33 AM
 #6

You can fabricate a transaction ID, so there is no guarantee that the transaction id is random.

How much control can you have?  It's a matter of brute force: repeatedly changing inputs and outputs, creating the txid, and seeing if it's what you want, right?


Essentially, yes:

 - http://bitcointalk.org/index.php?topic=54451.msg649253#msg649253
 - http://bitcoin.stackexchange.com/a/2233/153

Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!