Rating:

## NULLCOIN (Crypto, 300pt)

> Mine the middle
>
> [nullcoin.pdf](nullcoin.pdf)

In this challenge we have a partial transaction block that we have to complete so we get a specific SHA256 hash.


transaction_id:9
sender_name:Nullcon9
sender_key:?
transaction_amount:100
time_stamp:1536483609
transaction_signature:02487a9974eff50f5153c7511bc6331059e0e8f41926e0fe56680723125a675d
nonce:?


We can get receiver_key and sender_key using the provided [bitcoin address generator](https://keybase.io/warp), using the name as the passphrase.

![](Jailer_key.jpg)

After doing the same for the Nullcon9, we confirm we get the same hash that is mentioned in the PDF, for the block without the nonce.

![](SHA256.jpg)

Now we only have to brute-force the nonce to get the target hash.

python
import hashlib

block = """transaction_id:9
sender_name:Nullcon9
sender_key:17cM7VAJWKvtN7WebxoKmvtdbHM2iv9rSD
transaction_amount:100
time_stamp:1536483609
transaction_signature:02487a9974eff50f5153c7511bc6331059e0e8f41926e0fe56680723125a675d
nonce:"""

i = 0
sig = None


bash