Bitcoin/address validation: Difference between revisions

Content added Content deleted
(more accurate description of the task)
m (upper case)
Line 8:
* the first byte is the version number, which will be zero for this task ;
* the next twenty bytes are a [[RIPEMD-160]] digest, but you don't have to know that for this task: you can consider them a pure arbitrary data ;
* the last four bytes are a checksum check. They are the first four bytes of a double [[shaSHA-256]] digest of the previous 21 bytes.
 
To check the bitcoin address, you must read the first bytes, compute the checksum, and check that it corresponds to the last four bytes.