Skip to Content
Mastering Blockchain - Second Edition
book

Mastering Blockchain - Second Edition

by Ankur Daharwal, Imran Bashir, Pranav Burnwal
March 2018
Beginner to intermediate
656 pages
20h 9m
English
Packt Publishing
Content preview from Mastering Blockchain - Second Edition

Design of SHA-256

SHA-256 has the input message size < 264-bits. Block size is 512-bits, and it has a word size of 32-bits. The output is a 256-bit digest.

The compression function processes a 512-bit message block and a 256-bit intermediate hash value. There are two main components of this function: the compression function and a message schedule.

The algorithm works as follows, in eight steps:

  1. Preprocessing:
    1. Padding of the message is used to adjust the length of a block to 512-bits if it is smaller than the required block size of 512-bits.
    2. Parsing the message into message blocks, which ensures that the message and its padding is divided into equal blocks of 512-bits.
    3. Setting up the initial hash value, which consists of the eight 32-bit ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Blockchain - Third Edition

Mastering Blockchain - Third Edition

Imran Bashir
Mastering Blockchain

Mastering Blockchain

Lorne Lantz, Daniel Cawrey
Mastering Ethereum

Mastering Ethereum

Andreas M. Antonopoulos, Gavin Wood

Publisher Resources

ISBN: 9781788839044Supplemental Content