home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / sci / crypt / 2894 < prev    next >
Encoding:
Internet Message Format  |  1992-08-13  |  6.7 KB

  1. Path: sparky!uunet!dtix!darwin.sura.net!zaphod.mps.ohio-state.edu!cs.utexas.edu!milano!cactus.org!ritter
  2. From: ritter@cactus.org (Terry Ritter)
  3. Newsgroups: sci.crypt
  4. Subject: Re: more mcrypt discussion
  5. Summary: More Mass Encryption Comments
  6. Keywords: mcrypt
  7. Message-ID: <1992Aug13.181102.11451@cactus.org>
  8. Date: 13 Aug 92 18:11:02 GMT
  9. References: <1992Aug12.185029.13607@mintaka.lcs.mit.edu>
  10. Organization: Capital Area Central Texas UNIX Society, Austin, Tx
  11. Lines: 124
  12.  
  13.  
  14.  Continuing the discussion of mcrypt with knight@hal.gnu.ai.mit.edu:
  15.  
  16.  
  17. >     The increase is the excess blocking.  I encrypt in exactly
  18. >1024 byte (1K) blocks.  . . .
  19. > . . . due to computer file clusters, this block doesn't
  20. >take up any additional space from the drive.
  21.  
  22.  Well, we must be clear about whether the cipher is working on actual
  23.  disk sectors or files.  Only files have been mentioned.
  24.  
  25.  I think it is important to end up (after enciphering and deciphering)
  26.  with an exact duplicate of the original file, in data and length.
  27.  Any change from variable-length (files) to block-oriented processing
  28.  must add something to the original data to be able to recover the
  29.  original length.  And if the original length was 1023 mod 1024, there
  30.  will be no free space in the last block to hold additional data.
  31.  Thus, any block-oriented cipher which works on variable-length files
  32.  must expand some files.  Small blocks imply a small expansion, but
  33.  frequently; large blocks imply a larger expansion less frequently.
  34.  
  35.  If the cipher does not reproduce a file with exactly the original
  36.  length in bytes, then we can expect that a CRC (or any other data
  37.  validity check) on the recovered file will give a different result
  38.  than on the original file.  This is not good.
  39.  
  40.  
  41. >> *  Because of a lack of any statement otherwise, apparently the
  42. >>    scheme always enciphers in the same way with the same User Key.
  43. >>    If so, this is a serious weakness because it allows anagramming
  44. >>    between different messages (and this is the classical method of
  45. >>    breaking transposition ciphers).  In general, no cipher scheme
  46. >>    should "ever" re-encipher the same data in the same way even
  47. >>    with the same User Key.  (One way around this is to first encipher
  48. >>    a "really random" Message Key, and use the plaintext Message Key
  49. >>    as the internal key for ciphering the actual data.)
  50.  
  51. >You'll have to explain this to me, because I'm wondering if my
  52. >implementation doesn't completely by-pass this possibility.
  53.  
  54.  Well, I guess it all depends on what you want to do with it.  Your
  55.  mention of NSA implied to me that you were thinking you had a cipher
  56.  which would give experts some work.  If you just want to obscure the
  57.  data, that's another thing.
  58.  
  59.  If a cipher is supposed to be strong, then it is a very bad idea
  60.  to encipher multiple blocks in the same way, or multiple messages
  61.  in the same way.  It is certainly true that bit-transposition makes
  62.  things harder for cryptanalysis.  But cryptanalysis of transposition
  63.  has always had to deal with the possibility that the correct symbol
  64.  for any particular position could come from anywhere in the cipher.
  65.  Despite this, transposition ciphers have been broken many times.
  66.  
  67.  One reason that transposition ciphers have been broken is that their
  68.  transposition permutations often have to be of a special form which
  69.  could be constructed from the User Key, and that may be a factor here
  70.  as well.  The simple fact that there are a large number of permutations
  71.  for a given block size does not mean that all of them--or even any large
  72.  fraction--could be selected by User Keys.  The key to cryptanalysis
  73.  is to strip away huge numbers of possibilities, instead of just
  74.  trying each possibility one at a time.  We have this situation when
  75.  only certain types of permutation can be constructed.
  76.  
  77.  A big part of the strength argument with this cipher is whether the
  78.  Simple Substitution step prevents cryptanalysis.  If we consider only
  79.  analysis based on two unknown ciphertext blocks, I'm sure it helps.
  80.  But, in real applications, the opponent will eventually have some
  81.  amount of plaintext, the corresponding ciphertext, and lots of
  82.  unknown ciphertext to play with.
  83.  
  84.  Transposition ciphers have historically been cracked by anagramming,
  85.  and this only works when multiple messages (blocks) are enciphered
  86.  with the same permutation.  That same weakness occurs in the
  87.  proposed cipher.  In the absence of some plausible argument that
  88.  this cipher is so unique as to not be susceptible to the old
  89.  weakness, one should conclude that the old weakness could be
  90.  exploited.
  91.  
  92.  While the Simple Substitution step will complicate things, it is
  93.  hard to imagine that it makes cryptanalysis actually impossible;
  94.  Simple Substitution is just too weak to provide much of a screen.
  95.  On the other hand, even a fairly simple Vernam system (e.g. a
  96.  32-bit statistical RNG with XOR combining)--instead of Simple
  97.  Substitution--could make the argument much more interesting.
  98.  But it would be better to have *both* a randomizer step *and*
  99.  a different permutation for each and every block *and* use
  100.  sizable cryptographic RNG's to drive the whole thing.
  101.  
  102.  
  103. >Every attempt made to crack mcrypt will result in a file that will
  104. >be produced as a result of the key.
  105.  
  106.  This is hard to believe.  Presumably, an attempt at cracking
  107.  the cipher could produce any of the 2^1024 different possible
  108.  plaintext blocks.  But only those plaintext blocks which could
  109.  actually transformed into the known ciphertext need be considered.
  110.  It is true that there are far more than 2^1024 permutations,
  111.  and so, enough potential internal keys.  But the issue is how all
  112.  of these internal keys could possibly be selected, and, if they
  113.  cannot, the extent to which this affects both the size and
  114.  distribution of the permutation space.
  115.  
  116.  As I mentioned in my paper, a randomizer stage is an alternative
  117.  to exact bit-balancing, and a bit-transposition cipher with a
  118.  balanced data and sizable blocks can be a strong cipher.  But
  119.  we can expect that a bit-transposition stage which is designed to
  120.  reach any possible overall permutation (using, say, the Shuffle
  121.  algorithm of Durstenfeld), must be relatively slow, probably
  122.  slower than DES.  Each 1K block implies 8192 bit exchanges under
  123.  bit Shuffle, and if we really want to reach all possible
  124.  permutations, it is hard to see how any algorithm could be much
  125.  faster.
  126.  
  127.  Stream ciphers can be faster, but strong stream ciphers will
  128.  always need more processing than a little statistical RNG and XOR.
  129.  Thus, any strong cipher is going to be slower than its weaker cousins
  130.  until processing is no longer an issue.  (For example, a multiprocessor
  131.  machine based on streams could have a cipher processor, which
  132.  might increase the delay in the pipe, yet not reduce the data
  133.  rate.)
  134.  
  135.  ---
  136.  Terry Ritter   ritter@cactus.org
  137.