Skip to main content

Module blocks

Module blocks 

Source
Expand description

Fixed SHA-256 block builders for the performance-profile WOTS datapath.

Every builder returns sixteen already-decoded, big-endian SHA-256 words. There is no byte-order conversion left for a compression lane to infer. The builders are deliberately fixed-size: accepting an arbitrary byte stream in hardware would spend area on length and padding machinery that the HASHSIGS_SHA256_GENERIC_V1 protocol never exercises.

Structs§

ChainBlockInput
Input to one randomized WOTS chain transition.
EndpointPairInput
Two adjacent 32-byte endpoints forming an ordinary public-key hash block.
PrfBlockInput
Input to the domain-separated PRF block builder.
SecretDataInput
Input to the 64-byte secret-segment first-block builder.

Constants§

ENDPOINT_STREAM_BITS
Bit length of the concatenated 67 public-key endpoints.
ENDPOINT_STREAM_BYTES
Bytes in the concatenated 67 public-key endpoints.
HASH_BYTES
Bytes in one SHA-256 digest or WOTS segment.
HASH_INPUT_BITS
Bit length of the 32-byte fixed inputs.
PRF_INPUT_BITS
Bit length of 0x03 || seed || u16_be(index).
SECRET_INPUT_BITS
Bit length of a 64-byte secret-segment preimage.
SHA_BLOCK_BYTES
Bytes in one SHA-256 compression block.

Functions§

bytes_to_words_be_kernel
Convert 64 explicitly ordered bytes to sixteen big-endian words.
chain_block_kernel
Build the padded 32-byte chain preimage state XOR mask.
endpoint_final_block_kernel
Build final public-key hash block 33 from endpoint 66 and fixed padding.
endpoint_pair_block_kernel
Build one ordinary, full data block from two adjacent endpoints.
hash_words_to_bytes_kernel
Convert eight SHA-256 words to their canonical 32-byte representation.
initial_state_words_kernel
Return the FIPS 180-4 SHA-256 initial chaining value in RHDL widths.
prf_block_kernel
Build 0x03 || seed || u16_be(index) plus SHA-256 padding.
private_seed_block_kernel
Build the padded block that hashes a caller-supplied private seed.
secret_data_block_kernel
Build the first, unpadded data block of function_key || secret_prf.
secret_padding_block_kernel
Build the fixed second padding block for every 64-byte secret preimage.
sha256_32_byte_block_kernel
Build the sole padded block for an arbitrary protocol-owned 32-byte value.
software_padded_block
Independently construct one SHA-256 padded byte block in software.
software_words_from_bytes
Convert a software byte block into SHA-256 big-endian words.

Type Aliases§

HashBytes
Byte-oriented digest input used at WOTS context-storage boundaries.
HashWords
Eight big-endian SHA-256 chaining or digest words.
ShaBlock
Big-endian words presented to a SHA-256 compression lane.