Advertisement
Guest User

P2P blockchain algorithm for proof of knowledge (storage)

a guest
Aug 5th, 2014
2,014
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.96 KB | None | 0 0
  1. Please Upload to Datacoin and Tag the Attached Key
  2.  
  3. by vintagetrex aka Donal Lumsden
  4.  
  5. //*This algorithm for P2P proof of knowledge is arranged as a race. It works between a main blockchain building network and a side chain network. The challenge is generated and published by the "prover" node and answered by the "verifier" nodes. There are two rewards used: the first is crypto currency for a successful "prover" role and the second is a counter for a "verifier" who wins the proof of knowledge competition. Counters reset after a time period (tr). Rewards and counters can be replaced with two distinct currencies. A negative consequence for an incorrect response to the POK challenge should be used to prevent guessing. A certain amount of counters is required for a verifier to become eligible for the "prover draft." Provers are drafted from the eligible nodes through a pseudorandom number generated by the blockchain, such as the numbers generated by primecoin. The case discussesd has 1 prover and 2 verifiers in competition. *//
  6.  
  7. //prover and verifier roles are delegated by the blockchain
  8. 1) Random number R0 is generated by the blockchain and N0 is drafted as the prover with verifiers N1 and N2
  9.  
  10. //prover generates the proof of knowledge competition in steps 2 to 6
  11. 2) Prover generates random numbers R1 and R2 which will be used as salt (random number padding)
  12.  
  13. 3) Prover generates 2 one-time-pads X1 and X2 which will be used to change hashes at a rate of 50%
  14.  
  15. 4) Prover hashes concatenated N1, X1, R1, N2, X2, and R2
  16. Hash ( N1 + X1 + R1 + N2 + X2 + R2) = D
  17.  
  18. 5) Prover uploads D to the blockchain
  19.  
  20. 6) Prover creates challenges C1 and C2 by XORing the hash of R concatenated with F
  21.  
  22. X1( Hash(R1 + F) ) = C1
  23. X2( Hash(R2 + F) ) = C2
  24. //C1 = Hash(R1 + F) 50% of the time
  25. //C2 = Hash(R2 + F) 50% of the time
  26.  
  27. 7) Prover encrypts C1 concatenated with R1 and C2 concatenated with R2 with the public keys of N1 and N2, PK1 and PK2 respectively to make M1 and M2. Signing keys are SK1 and SK2
  28.  
  29. PK1 ( C1 + R1 ) = M1
  30. PK2 ( C2 + R2 ) = M2
  31.  
  32. 8) Prover uploads M1 and M2 to the blockchain
  33.  
  34. 9) Verifier performs POK by checking if the challenge is the hash of R1 concatenated with F or not (true or false)
  35.  
  36. SK1( M1 ) == C1 + R1
  37.  
  38. if ( C1 == Hash(R1 + F) ) {upload true;}
  39. else {upload false}
  40.  
  41. 11) Prover uploads N1, X1, R1, N2, X2, and R2 concatenated or (N1+X1+R1+N2+X2+R2)
  42. //anyone can verify this as the solutions to the POK using the previously uploaded Hash in step 5, in essence the prover is posting the solutions to the POK challenges
  43.  
  44. 12) Protest period; a node can upload its private key if the prover role wasn't performed correctly and anyone may check if messages and challenges (M, C) were made correctly
  45.  
  46.  
  47.  
  48.  
  49. Reward for prover = inflation of currency;
  50. Reward for verifier who answers first = counter++;
  51. counters required for prover draft eligibility >= some number;
  52. time period for counters to reset = tr;
  53. time span between upload of messages (M) and upload of solution (N1+X1+R1+N2+X2+R2) <= tchallenge; //very small to prevent cheaters
  54.  
  55. cheater = running a node without unique storage of F for that node
  56. //cheaters are combatted by making a time dependent competition or race
  57. //assumption: cheaters have to take extra steps so they will never be as fast and will lose to non cheaters
  58.  
  59. -----BEGIN PGP PUBLIC KEY BLOCK-----
  60.  
  61. mQENBFM7MyYBCADRtFqhErCi4Ep57JUlkjOXns50w5ZlpZq1K9OZUFdqYCZ1s3Bj
  62. PQJBFUhobChKnSf0QuCA0ETe6+x1dzPblyf0pOxky39n8l3eY8WP792ORjuYHAwN
  63. aeKAq2pUKpTzZ2wGXRoUDBTMeSUHBPPWtR/aCTggheb1ZCLrLnmdT2LU/1ZOicyr
  64. +B/YWrY/2qmc+E4Gbvn+eip+17Kg5CQHYHOMEAwcch6HAuPSeqhZNXb6b1anoC/4
  65. ONXXPjr7KMqIKOSQH+BSk843XC6BfkF7/vQMxSwppF8jiKFP3hI09BY8vgwB9RmQ
  66. CiUVGUUPF+KdbW3T5UKO8tsyU5+s0ThWw5LzABEBAAG0GGZpcnN0IFBHUCBrZXkg
  67. KHByYWN0aWNlKYkBPQQTAQoAJwUCUzszJgIbAwUJAeAB2gULCQgHAwUVCgkICwUW
  68. AgMBAAIeAQIXgAAKCRACvJj0Hvl/RrOuB/4wdfxa+0pmgztyD3STOABv0L0omU2z
  69. 8xzSaD6r3ImhRLLftNjJMFdsKcoBWiuC6aGZieIvyHUgT62ROl9ogqJciSUzq8mO
  70. eZUv24qYYtRROSBBs4wElobb98zvT0LxFc5s+Ecxe8bv07Ms9ml12l3G/rYnpZjb
  71. qw9dmR/3XXDNeN3bZxk+bh5C4lAAyhoTLkmy/OKsH2WFYdRNpzxJ3E/4WhxljwIq
  72. TA9HGatFsDlVqGCVP8coTRW0W1n6/FhgowxqKe2Thn3cWivRMACQfN6tw/70QZ9W
  73. teYdUBsw8NfK1yAjTbm67ESvk3NysqgXD55U+8HNMMfbMU6jPrQGxD0TuQENBFM7
  74. MyYBCACmICDurza5xNFUICIQicYasOFQl0EBZRhM1BM25YR72VgfUS06SWKtH80k
  75. xvmd5mxDMylFhEeXBSoaLns8Xk9IQ5xjiD1676GgM6KFoN0W98IogfTNej2qbt3U
  76. hgQHN74BQYh6wNRZymaav6mYBeHwpYiEpd7vPvFuv+K1QLA84ZtaWXxHD/NcKdUl
  77. e8XCrV2gUHpUhS3u9ZmvApjqdCHb8VCNM+qjc3++n34Uq3IIP6hvSyPuqoXaBdZZ
  78. kDeIGMLi33YAJtvMmt0GW2GRHrKlaAQY/UVkYJ/PNkZDACGMPFLFE8XVDBLJXZXO
  79. JYX96YZZhMBLA/YePw4/cgbo6gUZABEBAAGJASUEGAEKAA8FAlM7MyYCGwwFCQHg
  80. AdoACgkQAryY9B75f0bzHQgAxfUKgixemx0BehJZz6Hk0vxL6Z4vnLav7zXhKBXV
  81. /EUuOPeddaizXIjaoCF+WfXGuKEPYmOEBAqmZEnesKbQIdYWvti3qD2Iwxjm5yBp
  82. l/qa9LGbKwGUDmWkEdfTOEutX0J/sf8FhT48x5J604slayV2dOsrmmhhx+UPOHXH
  83. tCWlPH5UkHjT4OZJAJOWH83fwjutGmBipOljw1aigW7/QIDpo5SDweZaSxbg78ml
  84. vYL8maxm0rZE4WNTHyz5tUJvtwBSItVrRbnHD58SGUYCLLo6v2Iv5KpnvbaEQ3Nf
  85. d459JRFXNFSvKH58T0JRKVkaUw/SReBraTxQM7ftRgTHCQ==
  86. =kpCL
  87. -----END PGP PUBLIC KEY BLOCK-----
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement