home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / sci / crypt / 2800 < prev    next >
Encoding:
Internet Message Format  |  1992-07-31  |  1.8 KB

  1. Path: sparky!uunet!olivea!bu.edu!transfer!ellisun.sw.stratus.com!cme
  2. From: cme@ellisun.sw.stratus.com (Carl Ellison)
  3. Newsgroups: sci.crypt
  4. Subject: Re: Padded Data
  5. Keywords: pascal crypt
  6. Message-ID: <5312@transfer.stratus.com>
  7. Date: 31 Jul 92 19:13:53 GMT
  8. References: <1992Jul31.135011.14195@dcs.glasgow.ac.uk> <1992Jul31.153719.28374@ncsu.edu>
  9. Sender: usenet@transfer.stratus.com
  10. Organization: Stratus Computer, Software Engineering
  11. Lines: 33
  12.  
  13. In article <1992Jul31.153719.28374@ncsu.edu> Webbge@che17.ncsu.EDU (Greg Earl Webb) writes:
  14. >The only problem I can see with this method is how do you insert data
  15. >in a non-regular pattern and still have the ability to remove it later.
  16.  
  17.  
  18. I've used one method and have planned at least two others.  I now prefer
  19. #2 for its simplicity.
  20.  
  21. 1.    in one system of mine, I encrypt a vector of length 20 by
  22.     multiplying by a 20x20 matrix.  (Hill's algorithm) Each element of
  23.     the vector is composed of two ASCII characters plus one random bit.
  24.  
  25.         c0 + 129*(c1 + 129*b)
  26.  
  27.     (I use 129 so that I can have character 128 which means "end of
  28.     code line") I sometimes end a code line short and just pad the
  29.     remainder with random characters [0..128].
  30.  
  31. 2.    in another system, I prefix compressed data with a fixed number of
  32.     random bytes -- then pass the combination through a transposition
  33.     whose key depends in part on the sum of the bytes of the first
  34.     block of data (code posted here a month or two ago -- c/o
  35.     setzer@math.ncsu.edu (William Setzer).
  36.  
  37. 3.    in another system, I drive a state machine with 3 states (below is
  38.     the stripping machine):
  39.  
  40.         for ( n = (getc(stdin)) % 17 ;    /* # of bytes of padding */
  41.               n > 0 ;
  42.               n-- )
  43.           getc( stdin ) ;    /* toss the padding */
  44.         for ( n = getc( stdin ); n > 0 ; n-- )
  45.           use( getc( stdin ) ) ;    /* use good characters */
  46.