home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / faqs / sci / answers / cryptography-faq / part05 < prev    next >
Internet Message Format  |  1997-10-11  |  22KB

  1. Path: senator-bedfellow.mit.edu!faqserv
  2. From: crypt-comments@math.ncsu.edu
  3. Newsgroups: sci.crypt,talk.politics.crypto,sci.answers,news.answers,talk.answers
  4. Subject: Cryptography FAQ (05/10: Product Ciphers)
  5. Supersedes: <cryptography-faq/part05_874658612@rtfm.mit.edu>
  6. Followup-To: poster
  7. Date: 10 Oct 1997 09:21:13 GMT
  8. Organization: The Crypt Cabal
  9. Lines: 466
  10. Approved: news-answers-request@MIT.Edu
  11. Expires: 14 Nov 1997 09:20:38 GMT
  12. Message-ID: <cryptography-faq/part05_876475238@rtfm.mit.edu>
  13. References: <cryptography-faq/part01_876475238@rtfm.mit.edu>
  14. Reply-To: crypt-comments@math.ncsu.edu
  15. NNTP-Posting-Host: penguin-lust.mit.edu
  16. X-Last-Updated: 1994/07/05
  17. Originator: faqserv@penguin-lust.MIT.EDU
  18. Xref: senator-bedfellow.mit.edu sci.crypt:71098 talk.politics.crypto:27271 sci.answers:7206 news.answers:114219 talk.answers:2512
  19.  
  20. Archive-name: cryptography-faq/part05
  21. Last-modified: 94/06/07
  22.  
  23. This is the fifth of ten parts of the sci.crypt FAQ. The parts are
  24. mostly independent, but you should read the first part before the rest.
  25. We don't have the time to send out missing parts by mail, so don't ask.
  26. Notes such as ``[KAH67]'' refer to the reference list in the last part.
  27.  
  28. The sections of this FAQ are available via anonymous FTP to rtfm.mit.edu 
  29. as /pub/usenet/news.answers/cryptography-faq/part[xx]. The Cryptography 
  30. FAQ is posted to the newsgroups sci.crypt, talk.politics.crypto, 
  31. sci.answers, and news.answers every 21 days.
  32.  
  33.  
  34.  
  35. Contents:
  36.  
  37. 5.1. What is a product cipher?
  38. 5.2. What makes a product cipher secure?
  39. 5.3. What are some group-theoretic properties of product ciphers?
  40. 5.4. What can be proven about the security of a product cipher?
  41. 5.5. How are block ciphers used to encrypt data longer than the block size?
  42. 5.6. Can symmetric block ciphers be used for message authentication?
  43. 5.7. What exactly is DES?
  44. 5.8. What is triple DES?
  45. 5.9. What is differential cryptanalysis?
  46. 5.10. How was NSA involved in the design of DES?
  47. 5.11. Is DES available in software?
  48. 5.12. Is DES available in hardware?
  49. 5.13. Can DES be used to protect classified information?
  50. 5.14. What are ECB, CBC, CFB, OFB, and PCBC encryption?
  51.  
  52.  
  53. 5.1. What is a product cipher?
  54.  
  55.   A product cipher is a block cipher that iterates several weak
  56.   operations such as substitution, transposition, modular
  57.   addition/multiplication, and linear transformation. (A ``block
  58.   cipher'' just means a cipher that encrypts a block of data---8 bytes,
  59.   say---all at once, then goes on to the next block.) The notion of
  60.   product ciphers is due to Shannon [SHA49]. Examples of modern
  61.   product ciphers include LUCIFER [SOR84], DES [NBS77], SP-networks
  62.   [KAM78], LOKI [BRO90], FEAL [SHI84], PES [LAI90], Khufu and Khafre
  63.   [ME91a]. The so-called Feistel ciphers are a class of product
  64.   ciphers which operate on one half of the ciphertext at each round,
  65.   and then swap the ciphertext halves after each round. LUCIFER,
  66.   DES, LOKI, and FEAL are examples of Feistel ciphers.
  67.  
  68.   The following table compares the main parameters of several product 
  69.   ciphers:
  70.  
  71.   cipher   |   block length   |   key bits   |   number of rounds
  72.   LUCIFER          128               128                16
  73.   DES               64                56                16
  74.   LOKI              64                64                16
  75.   FEAL              64               128            2^x, x >= 5
  76.   PES               64               128                 8
  77.  
  78. 5.2. What makes a product cipher secure?
  79.  
  80.   Nobody knows how to prove mathematically that a product cipher is
  81.   completely secure. So in practice one begins by demonstrating that the
  82.   cipher ``looks highly random''. For example, the cipher must be
  83.   nonlinear, and it must produce ciphertext which functionally depends
  84.   on every bit of the plaintext and the key. Meyer [MEY78] has shown
  85.   that at least 5 rounds of DES are required to guarantee such a
  86.   dependence. In this sense a product cipher should act as a ``mixing''
  87.   function which combines the plaintext, key, and ciphertext in a
  88.   complex nonlinear fashion.
  89.  
  90.   The fixed per-round substitutions of the product cipher are
  91.   referred to as S-boxes. For example, LUCIFER has 2 S-boxes, and DES
  92.   has 8 S-boxes. The nonlinearity of a product cipher reduces to a
  93.   careful design of these S-boxes. A list of partial design criteria
  94.   for the S-boxes of DES, which apply to S-boxes in general, may be
  95.   found in Brown [BRO89] and Brickell et al. [BRI86].
  96.  
  97. 5.3. What are some group-theoretic properties of product ciphers?
  98.  
  99.   Let E be a product cipher that maps N-bit blocks to N-bit blocks.
  100.   Let E_K(X) be the encryption of X under key K. Then, for any fixed K,
  101.   the map sending X to E_K(X) is a permutation of the set of N-bit
  102.   blocks. Denote this permutation by P_K. The set of all N-bit
  103.   permutations is called the symmetric group and is written S_{2^N}.
  104.   The collection of all these permutations P_K, where K ranges over all
  105.   possible keys, is denoted E(S_{2^N}). If E were a random mapping from
  106.   plaintexts to ciphertexts then we would expect E(S_{2^N}) to generate
  107.   a large subset of S_{2^N}.
  108.  
  109.   Coppersmith and Grossman [COP74] have shown that a very simple
  110.   product cipher can generate the alternating group A_{2^N} given a
  111.   sufficient number of rounds. (The alternating group is half of the
  112.   symmetric group: it consists of all ``even'' permutations, i.e., all
  113.   permutations which can be written as an even number of swaps.)
  114.   Even and Goldreich [EVE83] were able to extend these results to show
  115.   that Feistel ciphers can generate A_{2^N}, given a sufficient number
  116.   of rounds.
  117.  
  118.   The security of multiple encipherment also depends on the
  119.   group-theoretic properties of a cipher. Multiple encipherment is an
  120.   extension over single encipherment if for keys K1, K2 there does
  121.   not exist a third key K3 such that
  122.  
  123.   E_K2(E_K1(X)) == E_(K3)(X)                (**)
  124.  
  125.   which indicates that encrypting twice with two independent keys
  126.   K1, K2 is equal to a single encryption under the third key K3. If
  127.   for every K1, K2 there exists a K3 such that eq. (**) is true then
  128.   we say that E is a group.
  129.  
  130.   This question of whether DES is a group under this definition was
  131.   extensively studied by Sherman, Kaliski, and Rivest [SHE88]. In their
  132.   paper they give strong evidence for the hypothesis that DES is not a
  133.   group. In fact DES is not a group [CAM93].
  134.  
  135. 5.4. What can be proven about the security of a product cipher?
  136.  
  137.   Recall from above that P_K is a permutation produced by E under
  138.   some key K. The goal of the designer of E is to ensure that P_K
  139.   appears to be a random element of S_{2^N}, the symmetric group.
  140.   Let R be an element of S_{2^N} selected randomly. We will say that P_K
  141.   and R are indistinguishable if an observer given P_K and R in some
  142.   order cannot distinguish between these two permutations in polynomial
  143.   time. That is, with time bounded resources, the observer cannot
  144.   determine which of the permutations is produced by E: the optimal
  145.   decision is no better than simply guessing.
  146.  
  147.   Luby and Rackoff [LUB88] have shown that a class of Feistel ciphers
  148.   are secure in this sense when the round mapping is replaced by
  149.   random boolean functions.
  150.  
  151. 5.5. How are block ciphers used to encrypt data longer than the block size?
  152.  
  153.   There are four standard ``modes of operation'' (and numerous non-standard
  154.   ones as well). The standard modes of operation are defined in the U.S.
  155.   Department of Commerce Federal Information Processing Standard (FIPS) 81,
  156.   published in 1980. See the question about ECB below for more details.
  157.  
  158.   Although they are defined for the DES block cipher, the ``modes of
  159.   operation'' can be used with any block cipher.
  160.  
  161. 5.6. Can symmetric block ciphers be used for message authentication?
  162.  
  163.   You may use a symmetric cryptosystem block cipher to prove to yourself
  164.   that you generated a message, and that the message wasn't altered
  165.   after you created it. But you cannot prove these things to anyone else
  166.   without revealing your key. Thereafter you cannot prove anything about
  167.   messages authenticated with that key.
  168.   
  169.   See ANSI X3.106-1983 and FIPS 113 (1985) for a standard method of message
  170.   authentication using DES.
  171.  
  172. 5.7. What exactly is DES?
  173.  
  174.   DES is the U.S. Government's Data Encryption Standard, a product 
  175.   cipher that operates on 64-bit blocks of data, using a 56-bit key. 
  176.  
  177.   It is defined in FIPS 46-1 (1988) [which supersedes FIPS 46 (1977)].
  178.   FIPS are Federal Information Processing Standards published by NTIS.
  179.   DES is identical to the ANSI standard Data Encryption Algorithm (DEA)
  180.   defined in ANSI X3.92-1981. 
  181.  
  182. 5.8. What is triple DES?
  183.  
  184.   Triple DES is a product cipher which, like DES, operates on 64-bit 
  185.   data blocks. There are several forms, each of which uses the DES
  186.   cipher 3 times. Some forms use two 56-bit keys, some use three.
  187.   The DES ``modes of operation'' may also be used with triple-DES.
  188.  
  189.   Some people refer to E(K1,D(K2,E(K1,x))) as triple-DES.
  190.  
  191.   This method is defined in chapter 7.2 of the ANSI standard X9.17-1985
  192.   ``Financial Institution Key Management'' and is intended for use in
  193.   encrypting DES keys and IVs for ``Automated Key Distribution''. Its
  194.   formal name is ``Encryption and Decryption of a Single Key by a Key
  195.   Pair'', but it is referenced in other standards documents as EDE.
  196.  
  197.   That standard says (section 7.2.1): ``Key encrypting keys may be a single
  198.   DEA key or a DEA key pair. Key pairs shoud be used where additional
  199.   security is needed (e.g., the data protected by the key(s) has a long
  200.   security life). A key pair shall not be encrypted or decrypted using a
  201.   single key.''
  202.  
  203.   Others use the term ``triple-DES'' for E(K1,D(K2,E(K3,x))) or
  204.   E(K1,E(K2,E(K3,x))).
  205.  
  206.   All of these methods are defined only for ECB mode of operation.  The
  207.   security of various methods of achieving other modes of operation (such as
  208.   CBC) is under study at the moment.  For now, it should be assumed that
  209.   other modes be defined as they are today, but with E(K1,D(K2,E(K1,x))) as
  210.   the block cipher within the feedback mechanism creating the mode.
  211.  
  212.   One of us (Ellison) has long advocated triple DES use in the form
  213.  
  214.     E(K1, Tran( E(K2, Tran( E(K3, Compress( x )))))),
  215.  
  216.   where each DES instance has its own key and IV (for CBC mode) and Tran is
  217.   a large-block transposition program. Tran is available from [FTPTR].  This
  218.   claims to gain security by diffusing single bit changes over a much larger
  219.   block (Tran's block size).  Other compositions of weak ciphers with DES
  220.   are possible.  For example, one could use:
  221.  
  222.    E(K1, Prngxor(K4, Tran( E(K2, Tran( Prngxor(K5, E(K3, Compress( x )))))))),
  223.  
  224.   where Prngxor() [FTPPX] is a simple stream cipher driven from a long-period
  225.   pseudo-random number generator (PRNG), to make sure that all plaintext or
  226.   ciphertext patterns are hidden while permitting the use of ECB mode for DES
  227.   (since there are certain weaknesses in the use of inner CBC loops for
  228.   multiple-DES, under some attacks, and we do not yet know if these show up
  229.   under composition with Tran()).
  230.  
  231. 5.9. What is differential cryptanalysis?
  232.  
  233.   Differential cryptanalysis is a statistical attack that can be
  234.   applied to any iterated mapping (i.e., any mapping which is based on
  235.   a repeated round function). The method was recently popularized by
  236.   Biham and Shamir [BIH91], but Coppersmith has remarked that the
  237.   S-boxes of DES were optimized against this attack some 20 years ago.
  238.   This method has proved effective against several product ciphers,
  239.   notably FEAL [BI91a].
  240.  
  241.   Differential cryptanalysis is based on observing a large number of
  242.   ciphertexts Y, Y' whose corresponding plaintexts X, X' satisfy a
  243.   known difference D = X+X', where + is componentwise XOR. In the
  244.   basic Biham-Shamir attack, 2^{47} such plaintext pairs are required
  245.   to determine the key for DES. Substantially fewer pairs are required
  246.   if DES is truncated to 6 or 8 rounds. In these cases, the actual key
  247.   can be recovered in a matter of minutes using a few thousand pairs.
  248.   For full DES this attack is impractical because it requires so many
  249.   known plaintexts.
  250.  
  251.   The work of Biham and Shamir on DES revealed several startling
  252.   observations on the algorithm. Most importantly, if the key
  253.   schedule was removed from DES and a 16*48 = 768-bit key was used,
  254.   the key could be recovered in less than 2^{64} steps. Thus
  255.   independent subkeys do not add substantial security to DES.
  256.   Further, the S-boxes of DES are extremely sensitive in that
  257.   changing even single entries in these tables yields significant
  258.   improvement in the differential attack.
  259.  
  260.   Adi Shamir is quoted to say (NYTimes Oct 13 1991), ``I would say
  261.   that, contrary to what some people believe, there is no evidence
  262.   of tampering with the DES so that the basic design was weakened.''
  263.  
  264. 5.10. How was NSA involved in the design of DES?
  265.  
  266.   According to Kinnucan [KIN78], Tuchman, a member of the group that
  267.   developed DES at IBM is quoted as saying, ``We developed the DES
  268.   algorithm entirely within IBM using IBMers. The NSA did not
  269.   dictate a single wire!'' Tuchman and Meyer (another developer of
  270.   DES) spent a year breaking ciphers and finding weaknesses in
  271.   Lucifer. They then spent two years strengthening Lucifer. ``Their
  272.   basic approach was to look for strong substitution, permutation,
  273.   and key scheduling functions ... IBM has classified the notes
  274.   containing the selection criteria at the request of the NSA....
  275.   `The NSA told us we had inadvertently reinvented some of the deep
  276.   secrets it uses to make its own algorithms,' explains Tuchman.''
  277.   
  278.   On the other hand, a document called ``Involvement of the NSA in
  279.   the development of DES: unclassified summary of the United States
  280.   Select Committee on Intelligence'', printed in the IEEE
  281.   Communications Magazine, p53-55, 1978, states: ``In the development
  282.   of DES, NSA convinced IBM that a reduced keysize was sufficient;
  283.   indirectly assisted in the development of the S-box structures; and
  284.   certified that the final DES algorithm was, to the best of their
  285.   knowledge, free from any statistical or mathematical weakness.''
  286.  
  287.   Clearly the key size was reduced at the insistence of the NSA.
  288.   The article further states that the NSA did not tamper with the
  289.   algorithm itself, just the parameters, which in some sense
  290.   resolves the apparent conflict in the remarks of Meyer and Tuchman
  291.   presented above.
  292.  
  293. 5.11. Is DES available in software?
  294.  
  295.   Several people have made DES code available via ftp (see part 10 for
  296.   pathnames): Stig Ostholm [FTPSO]; BSD [FTPBK]; Eric Young [FTPEY];
  297.   Dennis Furguson [FTPDF]; Mark Riordan [FTPMR]; Phil Karn [FTPPK].
  298.   A Pascal listing of DES is also given in Patterson [PAT87]. Antti 
  299.   Louko <alo@kampi.hut.fi> has written a version of DES with BigNum
  300.   packages in [FTPAL].
  301.  
  302.   FIPS 46-1 says ``The algorithm specified in this standard is to be
  303.   implemented ... using hardware (not software) technology. ...
  304.   Software implementations in general purpose computers are not in
  305.   compliance with this standard.''  Despite this, software
  306.   implementations abound, and are used by government agencies.
  307.  
  308. 5.12. Is DES available in hardware?
  309.  
  310.   The following paragraphs are quoted from messages sent to the editors.
  311.   We don't vouch for the quality or even existence of the products.
  312.  
  313.   Christian Franke, franke@informatik.rwth-aachen.de, says: ``1.
  314.   Cryptech CRY12C102: 22.5Mbit/s according to Data Sheet, with 32 Bit
  315.   interface. We use this one, because it was the only one available when
  316.   we started the project. No problems !  2. Pijnenburg PCC100: 20Mbit/s
  317.   according to Data Sheet. Address: PIJNENBURG B.V., Boxtelswweg 26,
  318.   NL-5261 NE Vught, The Netherlands. 3. INFOSYS DES Chip (Germany):
  319.   S-Boxes must be loaded by software. So you can modify the Algorithm.
  320.   Sorry, I don't have the data sheet handy. Please E-Mail me if you need
  321.   further information.''
  322.  
  323.   Marcus J Ranum, mjr@tis.com, says: ``SuperCrypt'' 100Mb/sec and faster
  324.   DES and Proprietary Storage for 16 56-bit keys Key stream generator
  325.   Integrated hardware DES3 procedure Extended mode with 112 bit keys;
  326.   Computer Elektronik Infosys; 512-A Herndon Parkway,; Herndon, VA
  327.   22070; 800-322-3464.
  328.  
  329.   Tim Hember, thember@gandalf.ca, says: Newbridge Microsystems sells
  330.   an AM9568 compatible DES chip that operates at 25MHz, performs a
  331.   round of encryption in 18 clocks, has a three-stage pipeline,
  332.   supports ECB, CBC, CFB-8 and >>> CFB-1 <<<<. Further it is very
  333.   reasonable priced as opposed to other high-end DES chips. Call
  334.   Newbridge Microsystems, Ottawa, 613-592-0714. (... there are no
  335.   import/export issues with Canada and the US). If you require custom
  336.   DES or Public Key ICs then Timestep Engineering developed
  337.   Newbridge's crypto chips and ICs for other commercial and
  338.   educational establishments. They can be reached at 613-820-0024.
  339.  
  340. 5.13. Can DES be used to protect classified information?
  341.  
  342.   DES is not intended to protect classified data. FIPS 46-1 says:
  343.   ``This standard will be used by Federal departments and agencies for
  344.   the cryptographic protection of computer data when the following
  345.   conditions apply: 1. ... cryptographic protection is required; and
  346.   2. the data is not classified according to the National Security Act
  347.   of 1947, as amended, or the Atomic Energy Act of 1954, as amended.''
  348.  
  349. 5.14. What are ECB, CBC, CFB, OFB, and PCBC encryption?
  350.  
  351.   These are methods for using block ciphers, such as DES, to encrypt 
  352.   messages, files, and blocks of data, known as ``modes of operation.''
  353.   Four ``modes of operation'' are defined in FIPS 81 (1980 December 2), 
  354.   and also in ANSI X3.106-1983. 
  355.  
  356.   FIPS 81 specifies that when 7-bit ASCII data is sent in octets, the
  357.   unused most-significant bit is to be set to 1.
  358.  
  359.   FIPS 81 also specifies the padding for short blocks.
  360.  
  361.   The four FIPS/ANSI standard DES modes of operation are: 
  362.         Electronic Code Book  (ECB), 
  363.         Cipher Block Chaining (CBC), 
  364.         K-bit Cipher FeedBack (CFB), and 
  365.         K-bit Output FeedBack (OFB).
  366.  
  367.   All four of the ANSI/FIPS modes have very little "error extension".
  368.   For a single bit error in the cipherstream, none of them produce an
  369.   error burst in the decrypted output stream of longer than 128 bits.
  370.  
  371.   A fifth mode of operation, used in Kerberos and elsewhere but not
  372.   defined in any standard, is error-Propagating Cipher Block Chaining 
  373.   (PCBC).  Unlike the 4 standard modes, PCBC extends or propagates the
  374.   effect of a single bit error in the cipherstream throughout remainder 
  375.   of the decrypted textstream after the point of error.
  376.  
  377.   These 5 methods are explained below in a C-language-like notation.
  378.  
  379.   Some symbols:
  380.  
  381.   P[n]  The n'th block of plaintext, input to encryption, output from
  382.         decryption. Size of block determined by the mode.
  383.  
  384.   C[n]  The n'th block of ciphertext, output from encryption, input to
  385.         decryption. Size of block determined by the mode.
  386.  
  387.   E(m)  The DES encryption function, performed on 64-bit block m, using
  388.         the 16-key schedule derived from some 56-bit key.
  389.  
  390.   D(m)  The DES decryption function, performed on 64-bit block m, using
  391.         the same key schedule as in E(m), except that the 16 keys
  392.         in the schedule are used in the opposite order as in E(m).
  393.  
  394.   IV    A 64-bit ``initialization vector'', a secret value which, along with
  395.         the key, is shared by both encryptor and decryptor.
  396.  
  397.   I[n]  The n'th value of a 64-bit variable, used in some modes.
  398.   R[n]  The n'th value of a 64-bit variable, used in some modes.
  399.  
  400.   LSB(m,k) The k least significant (right-most) bits of m.
  401.         e.g. m & ((1 << k) - 1)
  402.  
  403.   MSB(m,k) The k most significant (left-most) bits of m.
  404.         e.g. (m >> (64-k)) & ((1 << k) - 1)
  405.  
  406.   = ^ << >> &  operators as defined in the c langage.
  407.  
  408.  
  409.   Electronic Code Book (ECB):
  410.  
  411.           P[n] and C[n] are each 64-bits long.
  412.  
  413.           Encryption:                   Decryption:
  414.           C[n] = E(P[n])                P[n] = D(C[n])
  415.  
  416.  
  417.   Cipher Block Chaining (CBC):
  418.  
  419.           P[n] and C[n] are each 64-bits long.
  420.  
  421.           Encryption:                   Decryption:
  422.           C[0] = E(P[0]^IV)             P[0] = D(C[0])^IV
  423.   (n>0)   C[n] = E(P[n]^C[n-1])         P[n] = D(C[n])^C[n-1]
  424.  
  425.  
  426.   Propagating Cipher Block Chaining (PCBC):
  427.  
  428.           P[n] and C[n] are each 64-bits long.
  429.  
  430.           Encryption:                   Decryption:
  431.           C[0] = E(P[0]^IV)             P[0] = D(C[0])^IV
  432.   (n>0)   C[n] = E(P[n]^P[n-1]^C[n-1])  P[n] = D(C[n])^P[n-1]^C[n-1]
  433.  
  434.  
  435.   k-bit Cipher FeedBack (CFB):
  436.  
  437.           P[n] and C[n] are each k bits long, 1 <= k <= 64. 
  438.  
  439.           Encryption:                   Decryption:
  440.           I[0] = IV                     I[0] = IV
  441.   (n>0)   I[n] = I[n-1]<<k | C[n-1]     I[n] = I[n-1]<<k | C[n-1]       
  442.   (all n) R[n] = MSB(E(I[n]),k)         R[n] = MSB(E(I[n]),k)
  443.   (all n) C[n] = P[n]^R[n]              P[n] = C[n]^R[n]
  444.  
  445.           Note that for k==64, this reduces to:
  446.  
  447.           I[0] = IV                     I[0] = IV
  448.   (n>0)   I[n] = C[n-1]                 I[n] = C[n-1]   
  449.   (all n) R[n] = E(I[n])                R[n] = E(I[n])
  450.   (all n) C[n] = P[n]^R[n]              P[n] = C[n]^R[n]
  451.  
  452.   CFB notes: Since I[n] depends only on the plain or cipher text from the
  453.   previous operation, the E() function can be performed in parallel with
  454.   the reception of the text with which it is used.
  455.  
  456.  
  457.   k-bit Output FeedBack (OFB):
  458.  
  459.           P[n] and C[n] are each k bits long, 1 <= k <= 64. 
  460.  
  461.           Encryption:                   Decryption:
  462.           I[0] = IV                     I[0] = IV
  463.   (n>0)   I[n] = I[n-1]<<k | R[n-1]     I[n] = I[n-1]<<k | R[n-1]       
  464.   (all n) R[n] = MSB(E(I[n]),k)         R[n] = MSB(E(I[n]),k)
  465.   (all n) C[n] = P[n]^R[n]              P[n] = C[n]^R[n]
  466.  
  467.           Note that for k==64, this reduces to:
  468.  
  469.           I[0] = IV                     I[0] = IV
  470.   (n>0)   I[n] = R[n-1]                 I[n] = R[n-1]   
  471.   (all n) R[n] = E(I[n])                R[n] = E(I[n])
  472.   (all n) C[n] = P[n]^R[n]              P[n] = C[n]^R[n]
  473.  
  474.   OFB notes: encryption and decryption are identical. Since I[n] is
  475.   independent of P and C, the E() function can be performed in advance of
  476.   the receipt of the plain/cipher text with which it is to be used.
  477.  
  478.  
  479.   Additional notes on DES ``modes of operation'':
  480.  
  481.   ECB and CBC use E() to encrypt and D() to decrypt, but the feedback
  482.   modes use E() to both encrypt and decrypt. This disproves the following 
  483.   erroneous claim: ``DES implementations which provide E() but not D()
  484.   cannot be used for data confidentiality.''
  485.