Bitcoin Forum
June 30, 2024, 04:12:54 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Looking for Javascript based block hashing algorithm to verify signed blocks  (Read 700 times)
darius2020 (OP)
Member
**
Offline Offline

Activity: 72
Merit: 10


View Profile
January 17, 2014, 03:22:33 PM
 #1

Hi,

Looking for Javascript based block hashing algorithm to verify signed blocks and verify calculated nonce
for off-line presentation to students.

Could you help me ?

https://en.bitcoin.it/wiki/Block_hashing_algorithm

code in Python, plain C, PHP (see above)

implemented sha256 in Javascript, implemented Little Endian,
No support for hex2bin in JS, so
I use hex2decimal + decimal2binary
 but what is generated is a number so number of bits is not correct < 640 bits

I need 80 bytes long header ( 640 bits number or string) as input into sha256

any idea or reference to plain Javascript implementation of Bitcoin clock hashing ?

What is s source for parsed block headers ( 6 input parameters) + Time in Unix Epoch format ?
I would prefer datafile storing 1-100 headers or another just another solution
to let me Javascript hashing to read input parameters and verify calculated nonce.

Any idea ?
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!