outer@utcsrgv.UUCP (Richard Outerbridge) (04/10/84)
Reference: <4119@edai.UUCP> in net.sources Looking over ok@edai's en(de/re)crypt, here's what it does: 1) Setup three 16-bit pseudorandom number seeds, and an eight-bit initialization vector (IV). 2) loop: read up to 4096 bytes, N = number of bytes read generate a permutation of 0,1...(N-1) elements perform a plaintext autokey encipherment of the N bytes of input using the IV and xor'ing. permute the encrypted plaintext using the N element permutation just generated output. The permutation generation is done using the three pseudo-random generators, which are all linear congruential multiplicative. The modulae and multipliers are (30269,171), (30307,172) and (30323,170). Note that the permutations are ever changing. There are a maximum of 2**45 initial states for the generators, though this will be smaller if their periods are not the same. The combined period will of course be the product of the periods of the three generators. The output of the generators is combined by adding the fractional value of their outputs (eg out = (double)rand * (1.0/(double)modulus)) and taking the fractional portion of the sum. Two comments: can anyone tell me why none of the generators will ever get to (and thereafter remain at) zero? Second, this program should NOT be used as a filter for TERMINAL input (files only!) because varying length input blocks produce varying permutations. Richard Outerbridge outer@utcsrgv U of Toronto CSRG