Bitcoin Forum
July 18, 2024, 01:31:09 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: (Programming) Scrypt algo output doesen't match up as expected  (Read 401 times)
Sultanen (OP)
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile
January 07, 2014, 11:11:29 PM
 #1

Im trying to get my head around the scrypt algo output. On https://litecoin.info/Block_hashing_algorithm the author gets the scrypt encryption result for the headerString "01000000ae178934851bfa0e83ccb6a3fc4bfddff3641e104b6c4680c31509074e699be2bd672d8 d2199ef37a59678f92443083e3b85edef8b45c71759371f823bab59a97126614f44d5001d459201 80"
 to
"000000003b4ba52ab765631e20a04b88cd27f0b66d3509fb2da7781fae6d7901".
Im trying to replicate this but im not able to reproduce that result. Im using an implementation that gives the correct output for the test vectors in the end of this paper: http://www.tarsnap.com/scrypt/scrypt.pdf but when running the headerString through it with the correct settings for N,r,p(1024,1,1) i get the result
"7264d13c86b13bff49fcaba34d760567d78a4e0d74de2a112888696d0ccd7fc1"(little endian)

If you have any experience with this i be happy for any input =)
smolen
Hero Member
*****
Offline Offline

Activity: 524
Merit: 500


View Profile
January 08, 2014, 12:32:17 AM
 #2

Im trying to get my head around the scrypt algo output
If you have any experience with this i be happy for any input =)
I'd start with algorithm implementation copypasted from the wallet and test vectors from live blockchain.

Of course I gave you bad advice. Good one is way out of your price range.
Sultanen (OP)
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile
January 19, 2014, 08:32:17 PM
 #3

I did extract the C miner from litecoin wallet but i didnt manage to find where the difference was. Still, i cant get my head around why a proper and verified scrypt implementation would not work?
smolen
Hero Member
*****
Offline Offline

Activity: 524
Merit: 500


View Profile
January 21, 2014, 07:18:18 AM
 #4

I did extract the C miner from litecoin wallet but i didnt manage to find where the difference was. Still, i cant get my head around why a proper and verified scrypt implementation would not work?
Perhaps you've messed up with endianess Smiley
I'd suggest to get correct test vectors first, it will make your work much easy

Of course I gave you bad advice. Good one is way out of your price range.
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!