In cryptography , a permutation box ( or P-box ) is a method of bit-shuffling used to permute or transpose bits ( rearrange or swap the order of bits ) across S-boxes inputs , maintaining diffusion while transposing . In cryptography , a permutation box ( or P-box ) is a method of bit-shuffling used to permute or transpose bits across S-boxes inputs , retaining diffusion while transposing .