Skip to main content

Module corpus

Module corpus 

Source
Expand description

Corpus steganography: zero-modification cover selection via ANN search.

Given a payload to embed and a corpus of images, this module finds the image whose natural LSB bit pattern most closely matches the payload — minimising or eliminating modifications needed.

Functions§

extract_lsb_pattern
Extract the LSB bit pattern from raw pixel bytes.
filter_by_model
Filter corpus entries by model ID and resolution.
hamming_distance
Compute the Hamming distance between two byte slices of equal length.
is_close_match
Determine if a Hamming distance counts as a “close enough” match.
payload_to_bit_pattern
Expand a payload into a bit pattern of the same format as extract_lsb_pattern output (one bit per sample, packed into bytes).
score_match
Score a corpus entry’s precomputed bit pattern against a payload pattern.