<p>Here you find an example, how to extract the data from getwork and call the scrypt function
<a href="http://litecoin.info/Scrypt" rel="nofollow">http://litecoin.info/Scrypt</a></p>

<p>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.</p>

<p>If you find a valid result, please let me know the value. </p>

CC BY-SA 3.0
2013-10-19T02:31:38.710Z
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
CC BY-SA 3.0
2013-06-09T20:30:30.933Z
2013-06-10T07:55:32.213Z
2013-06-10T07:55:32.213Z
joef
<p>The algorithm is basically the same, just exchange SHA256 with <a href="http://www.tarsnap.com/scrypt.html" rel="nofollow">http://www.tarsnap.com/scrypt.html</a></p>

CC BY-SA 3.0
2013-05-07T03:28:14.250Z
The bitcoin hashing is double sha, so `sha256(sha256(data))`. So I do scrypt just once?
if __name__ is None
CC BY-SA 3.0
2013-05-07T02:43:20.720Z
2013-05-07T02:43:20.720Z
RotHorseKid
<p>I am having trouble finding litecoin mining specifications. I would first of all require something like this:
<a href="https://en.bitcoin.it/wiki/Block_hashing_algorithm" rel="nofollow">https://en.bitcoin.it/wiki/Block_hashing_algorithm</a></p>

<p>Except for litecoins. I need to know how to dissect the <code>getwork</code> 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.</p>

<p>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.</p>

<p>Anyone know for some good resources I could use?</p>

<p>Thanks</p>

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

<litecoin><proof-of-work><mining-technical-details>
What is the difference in hashing algorithm between bitcoin and litecoin?
if __name__ is None
# What is the difference in hashing algorithm between bitcoin and litecoin?

(Asked by: username_0 on 2013-05-06)

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.

**Tags:** litecoin, proof-of-work, mining-technical-details


---

## 2 answers

### Answer by username_1 on 2013-06-09. Score: 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.

> **Comments:**
> **username_2**: 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")  

---

### Answer by username_3 on 2013-05-07. Score: 1

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

> **Comments:**
> **username_0**: The bitcoin hashing is double sha, so `sha256(sha256(data))`. So I do scrypt just once?  

---

