I am having trouble finding litecoin mining specifications. I would first of all require something like this: https://en.bitcoin.it/wiki/Block_hashing_algorithm

Except for litecoins. I need to know how to dissect the getwork data, what kind of operations to do on it (eg. hex to uint32 conversions, byte order shifts, etc.) and what specification of scrypt to use and what are its input, difficulty and expected output.

I would really love to have some input/output data, on which I can write BDD specifications so I can write a miner on top of that.

Anyone know for some good resources I could use?


Edit: I would really appreciate some sample input/output, I can figure out the rest myself.


2 Answers 2


Here you find an example, how to extract the data from getwork and call the scrypt function http://litecoin.info/Scrypt

Unfortunately it is not clear (to me) what the resulting values of the scrypt should be. First I thought it is the result of the valid block above, but that has a different nounce.

If you find a valid result, please let me know the value.

  • From the wiki page it looks that you replace the double hash by (using python scrypt package): scrypt.hash(header_bin, salt=header_bin, N=1024, r=1,p=1)[::-1][-32:].encode("hex") Commented Oct 19, 2013 at 2:31

The algorithm is basically the same, just exchange SHA256 with http://www.tarsnap.com/scrypt.html

  • The bitcoin hashing is double sha, so sha256(sha256(data)). So I do scrypt just once? Commented May 7, 2013 at 3:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.