home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume10 / cbw / part05 / Read.me < prev    next >
Encoding:
Text File  |  1987-06-17  |  9.6 KB  |  213 lines

  1.  
  2. UNPACKING NOTES [by Rich $alz]
  3.     There Usenet distribution of CBW includes six files that have
  4. been UUENCODE'd because they contain non-printing characters:
  5.         UU.foo UU.graphics UU.test UU.test1 UU.test2 UU.test3
  6. You must first decode these files before using them; one of
  7. the command sets will do the trick:
  8.     for I in UU.* ; do uudecode $I ; done    -- /bin/sh
  9.     foreach I (UU.*)            -- C shell
  10.         uudecode $I                --
  11.     end                    --
  12.  
  13.     This directory contains the source, documentation, and
  14. auxilary files for the Crypt Breakers Workbench (cbw).  CBW is
  15. a multi-window integrated workbench of tools that help a cryptanalist
  16. read files encrypted with the BSD4.2 crypt command.  Anyone
  17. may copy, modify, use, or redistribute this system.  It was
  18. originally written by Robert W. Baldwin at MIT.
  19.  
  20.  
  21. GETTING STARTED
  22.  
  23.     A user's manual is provided in cbw.doc.  The scribe source
  24. for the user's manual is in cbw.mss.  The file Index briefly describes
  25. the various programs in this directory.
  26.  
  27.     CBW is written in C and distributed with the source code to
  28. encourage people to play with it.  It should run on any display
  29. terminal.  Read the users manual for information on terminal
  30. compatibility.
  31.  
  32.  
  33.     
  34. TO COMPILE CBW
  35.  
  36.     Execute "make" with no arguments.  CBW uses routines from the termcap
  37. and curses libraries, but it does not use the full curses package.
  38.  
  39.  
  40. A FEW OTHER NOTES
  41.  
  42.     Page 2 of the users manual mentions that CBW cannot work
  43.     against files that have been run through compress (1) before
  44. encryption.  Personally, I would prefer to have a DES-based
  45. self-inverse cipher.  Most DES programs need to be told whether they
  46. are in encrypt or decrypt mode.  However, IBM only grants free use of
  47. DES if it is used according to NBS guidelines, and self-inverse is not
  48. one of the accepted operating modes.
  49.  
  50.  
  51. TESTING
  52.  
  53.      The following is a step by step sequence of commands to exercise
  54. the Crypt Breakers Workbench.  It demonstrates how easily crypt files
  55. can be broken.
  56.  
  57.    1. Edit  stats.slice to set the name of the directory that contains the
  58.       statistics files.  Statistics for scribe documents are included with
  59.       the source files.
  60.  
  61.       The  stats.slice  file  also  defines the location of the dictionary
  62.       used by the lookup-pattern  command.    The  default  dictionary  is
  63.       /usr/dict/words.    The  dictionary is just a list of words, one per
  64.       line.  Case does not matter.
  65.  
  66.    2. Execute 'source  stats.slice'  to  initialize  the  necessary  shell
  67.       variables.
  68.  
  69.    3. If there is a .slice file for your terminal type (e.g., vt100.slice,
  70.       or h19.slice), execute source on that file.   This  initializes  the
  71.       graphics map and key map.
  72.  
  73.    4. Print  out  cbw.doc,  so you can read it after you have decided that
  74.       you can't figure out how the program works.
  75.  
  76.    5. Copy test3.perm and .cipher to foo.perm and foo.cipher.    The  .txt
  77.       files contain the original plaintext.
  78.  
  79.    6. Execute 'cbw foo'.
  80.  
  81.    7. The  cursor  will  on the command line.  Use the arrow keys (or C-P,
  82.       C-N, C-F, C-B) to move the cursor to the upper lefthand position  of
  83.       the  decryption  window.   Try typing '@Device[Dover]'.  Notice that
  84.       most of the characters you type  deduced  other  characters  in  the
  85.       block.
  86.  
  87.    8. The  'D'  in  'Dover'  is wrong.  Using the arrow keys, position the
  88.       cursor over the 'D' and type 'd'.
  89.  
  90.    9. Advance to the position after the ']' and  type  C-T.    A  list  of
  91.       possible  characters  for this position will be displayed.  The list
  92.       is sorted with the most likely character on the left.   Notice  that
  93.       many characters are not possible because they would deduce non-ascii
  94.       characters elsewhere in the  block,  or  they  would  conflict  with
  95.       previously accepted guesses.
  96.  
  97.       Try  guessing  tab,  comma  and linefeed for the character after the
  98.       ']'.  Use C-G to undo each guess.  Delete and C-D do not restore the
  99.       old  state,  they  just  erase  the  wiring  that  was  deduced by a
  100.       particular character.
  101.  
  102.   10. Move the cursor down to the command line.  You can use emacs  cursor
  103.       characters  (C-N,  C-P, C-F, C-B) or the arrow keys.  Unfortunately,
  104.       C-U does not work as in emacs.  The C-X key or F4 will jump directly
  105.       to the command line.
  106.  
  107.   11. Type  'pw  '.    The  space  will  cause  command completion for the
  108.       probable-word guessing command.  Type F2 (or C-S) to advance to  the
  109.       first  argument,  and  enter  the  file name 'mss.words'.  That file
  110.       contains a list of keywords used  by  the  Scribe  (Finalword)  text
  111.       formatter.    Press  F2  to  advance  to  the second argument, which
  112.       specifies a cut-off level for automatically accepting guesses.   The
  113.       level  is the maximum number of standard deviations that the scoring
  114.       function can be away from its expected value.  Enter 1.2, and  press
  115.       return to invoke the command.
  116.  
  117.   12. A  partially filled in block will appear in the guessing window.  To
  118.       accept the result of this command, press F3 (or C-A).
  119.  
  120.   13. Try the pword guess command again with a level of 3.   To  do  this,
  121.       just  move  to  the  command  line, change the 1.2 to a 3, and press
  122.       return.  Again F3 accepts the guess.  If  some  guesses  look  wrong
  123.       (such  as the 'F' on the second line under the '[Article]'), you can
  124.       correct them using the editor in the decryption block window.
  125.  
  126.   14. Advance to block  1  of  the  file  by  moving  the  cursor  to  the
  127.       decryption  window and pressing F2 (or C-S).  F1 (or C-R) moves back
  128.       one block, F2 moves ahead one block.
  129.  
  130.   15. The second block is likely to  be  plain  english  with  few  scribe
  131.       commands.    Move  to the command window, type C-U to erase the line
  132.       and type 'bi ' to  setup  the  bigram  guessing  command.    Try  an
  133.       acceptance  level  of  1.0  and  a minimum probability of 0.6.  Type
  134.       return to invoke the command.
  135.  
  136.   16. After a short wait (~15  seconds),  a  partial  block  will  appear.
  137.       Accept the guess with the F3 key in the guessing window.
  138.  
  139.   17. Try  looking  up a pattern in the dictionary.  In the command window
  140.       type 'look ', use F2 to advance to the  pattern,  and  type  in  the
  141.       pattern  '....llit.', and press return.  This will match against the
  142.       word 'satellite' if it is in you site's dictionary.
  143.  
  144.   18. One could go on like this, but let's skip  ahead  by  loading  in  a
  145.       previously  saved state.  Invoke the load command (it loads the file
  146.       foo.perm, just as save dumps to foo.perm (making this command take a
  147.       filename  is  a  good implementation exercise)).  Type C-U, 'load ',
  148.       and return.  Notice that all the work so  far  is  replaced  by  the
  149.       information in the .perm file.  This can be considered a feature.
  150.  
  151.   19. Use  the  F1 and F2 keys in the decryption window to view the blocks
  152.       that have been solved.  Notice that a fully solved  block  does  not
  153.       specify  all  the wirings of the block key (permutation).  Typically
  154.       only 105 of the 128 wires are used.
  155.  
  156.   20. Lets try deducing the inter-block relationship (zee).   Execute  the
  157.       clear-zee command.
  158.  
  159.   21. Execute  knit  blocks 0 through 3 with a min show count of 20.  This
  160.       means that the program should only show you guesses that  deduce  20
  161.       or more wirings of the zee permutation.  Press return to invoke this
  162.       guessing strategy.  The cursor will move  to  the  guessing  window.
  163.       Press F2 to start the first round of guessing.
  164.  
  165.       The running time of the knit command is exponential in the number of
  166.       blocks knitted, and it will run for a very long time if any  of  the
  167.       blocks  are  decrypted incorrectly.  This means that it is better to
  168.       leave a position blank than to guess at it.
  169.  
  170.   22. The program moves to block 4 and shows you the characters in block 4
  171.       that would be deduced from block 3 given the deduced wirings of zee.
  172.       If these look reasonable, press F3 to accept the guess, and press F2
  173.       to try the next guess.  To reject a guess, press F2 without pressing
  174.       F3.
  175.  
  176.   23. Now that part of zee is known, try propagating the settings of block
  177.       1 into block 0 using zee.  The propagate command will do this.  Also
  178.       try propagating blocks 2, 3, and 4 to zero.
  179.  
  180.       Notice that the number of known wires can increase without  deducing
  181.       additional characters in the block.
  182.  
  183.   24. There should be a command that propagates information between groups
  184.       of blocks, but for now you must do this one block at a time.   After
  185.       propagating  block 1 - 4 to block zero, and block zero to blocks 1 -
  186.       4, et cetera, try the knit command again.
  187.  
  188.   25. Propagate block 4 to 5  to  provide  a  framework  to  evaluate  new
  189.       guesses.
  190.  
  191.   26. Knit block 0 through 4 with a minimum show level of 2.  You may want
  192.       to skip accepting guesses that do not deduce any characters.  Repeat
  193.       this process with a show level of 1.
  194.  
  195.   27. The  program  should  now  know  all 256 wirings of zee.  Repeat the
  196.       process of propagating information  between  blocks  until  all  128
  197.       wires of the block zero are known.
  198.  
  199.   28. Save  your  work  with the save-permutations command (on the command
  200.       line type 'sa ' and press return).  This writes the file foo.perm.
  201.  
  202.   29. Exit the program with the quit command.
  203.  
  204.   30. Copy foo.perm to zeecode.perm.
  205.  
  206.   31. Execute 'zeecode < foo.cipher | more '.  This  program  reads  CBW's
  207.       save  file  to  find  the  permutation  for  block  zero and the Zee
  208.       permutation  that  describes  how  the  remaining  block  keys   are
  209.       generated.    Using  this  information it decodes standard input and
  210.       writes on standard output.
  211.  
  212.   32. That's all.
  213.