# Forging algorithm: why hash the signature?

**URL:** <https://talk.jelurida.com/t/forging-algorithm-why-hash-the-signature/526>\
**Category:** Developers\
**Created:** [1 October 2021 13:37 UTC](https://talk.jelurida.com/t/forging-algorithm-why-hash-the-signature/526 "2021-10-01T13:37:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hayekf](https://talk.jelurida.com/letter_avatar_proxy/v4/letter/h/2acd7d/32.png) [@hayekf](https://talk.jelurida.com/u/hayekf)\
**Post date:** [1 October 2021 13:37 UTC](https://talk.jelurida.com/t/forging-algorithm-why-hash-the-signature/526/1 "2021-10-01T13:37:36Z")

</div>

From the whitepaper:

_To participate in the block forging process, an active account cryptographically signs the generation signature of the previous block with its own public key. This creates a 64-byte signature, which is then hashed using SHA256. The first 8 bytes of the resulting hash gives a number, referred to as the account’s hit._

Why do we need to hash the signature before taking the first 8 bytes?  
-The output of a signature function is already 'random'  
-It's not to make it more 'random', since if the signature output isn't random enough, the hash afterwards won't help  
-It's not to adjust for length, since we only need 8 bytes

So why?

---

<div class="post-metadata">

**Author:** ![petko.petkov](https://talk.jelurida.com/letter_avatar_proxy/v4/letter/p/eb8c5e/32.png) [@petko.petkov](https://talk.jelurida.com/u/petko.petkov)\
**Post date:** [2 October 2021 17:03 UTC](https://talk.jelurida.com/t/forging-algorithm-why-hash-the-signature/526/2 "2021-10-02T17:03:01Z")

</div>

Hi, the paper is ambiguous or wrong. The generation signature of the previous block is concatenated to the public key of the current block generator and the 64-byte result of the concatenation is hashed to produce the generation signature of the current block. There is no asymmetric cryptography involved.

I find the text you quoted here - [Nxt Whitepaper - Introduction: Nxt Whitepaper](https://nxtdocs.jelurida.com/Nxt_Whitepaper) . Please let us know if you read it somewhere else so that we can correct it there too.

---

<div class="post-metadata">

**Author:** ![hayekf](https://talk.jelurida.com/letter_avatar_proxy/v4/letter/h/2acd7d/32.png) [@hayekf](https://talk.jelurida.com/u/hayekf)\
**Post date:** [5 October 2021 12:31 UTC](https://talk.jelurida.com/t/forging-algorithm-why-hash-the-signature/526/3 "2021-10-05T12:31:13Z")

</div>

Thanks so very much!

The text I quoted is also present on the pdf of the whitepaper, which you can find here (among other places): [https://www.jelurida.com/sites/default/files/NxtWhitepaper.pdf](https://www.jelurida.com/sites/default/files/NxtWhitepaper.pdf)
