pub fn permutation_search(
stego_bytes: &[u8],
mask: &BinMask,
config: &SearchConfig,
seed: u64,
) -> PermutationExpand description
Find the lowest-detectability permutation within config.max_iterations.
seed must be derived from the crypto key — never use a fresh random seed
(the receiver needs to reconstruct the same permutation for extraction).
Uses a random-restart hill-climb: each iteration proposes a swap of two positions and accepts it if it lowers the chi-square score.