What is the difference in hashing algorithm between bitcoin and litecoin?

5

1

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?

Thanks

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

if __name__ is None

Posted 2013-05-06T23:32:52.540

Reputation: 169

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.

joef

Posted 2013-05-06T23:32:52.540

Reputation: 21

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")Jorge E. Cardona 2013-10-19T02:31:38.710

1

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

RotHorseKid

Posted 2013-05-06T23:32:52.540

Reputation: 311

The bitcoin hashing is double sha, so sha256(sha256(data)). So I do scrypt just once?if __name__ is None 2013-05-07T03:28:14.250