Bill Stewart wrote:
Carl Ellison's "tran" program takes an interesting approach for data scrambling - it takes a simple checksum of the first N bytes of the data, which is order-invariant (I think it was a byte-wise XOR?) and uses it as a random-number seed for scrambling blocks of data; it's easy to reverse because the checksum is the same after scrambling.
The old tran used the sum of the bytes. The new tran uses the histogram of the bytes (of the first block -- 8KB or the whole message). This carries more information. That seeds a PRNG (currently subtract-with-borrow, but it could be made stronger -- e.g., with DES or IDEA encrypting the output before use) which then drives a pairwise byte swap over each 8KB block of the stream. This is a self-inverse. I can send code to anyone interested. It's also on ripem.msu.edu. - Carl