Path: utzoo!attcan!telly!lethe!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!ames!sgi!shinobu!odin!nelson From: nelson@sgi.com (Nelson Bolyard) Newsgroups: comp.sys.mac.apps Subject: Re: SUMMARY: DES file encryption for MAC Summary: Saying "DES" is not enough Keywords: encryption DES Message-ID: <1990Dec19.233148.10440@odin.corp.sgi.com> Date: 19 Dec 90 23:31:48 GMT References: <1990Dec18.215820.22668@odin.corp.sgi.com> Sender: news@odin.corp.sgi.com (Net News) Distribution: na Organization: Silicon Graphics, Inc., Mountain View, CA Lines: 85 My Summary article generated MUCH more response than my original request for information. Lots of people sent me short messages saying "such-and-such" program "does DES" or "uses DES". Unfortunately, they missed the point of the original article. One respondent at least asked the right question. In article <5308@crystal9.UUCP> derosa@motcid.UUCP (John DeRosa) wrote: >There is a program in the archives called UTIL/DES-ENCRYPTION.HQX >but does not work on an IBM. >FOR THE DES EXPERTS. Will DES encoded files be decoded by any >des decoding tool? Well, John, the answer is NO. Not all programs that use DES for encryption do the same thing! You may ask: Is that because DES is not really a standard?? The answer is: No, DES is a real standard. In fact it is Federal Information Processing Standard (FIPS) 41, a U.S. government standard. But, DES is NOT a standard for encrypting FILES!! It is a standard for encrypting (or decrypting) exactly 8 BYTES! (64 bits, to be precise). When the amount of data you need to encrypt is bigger than 8 bytes, (as a typical file is) there are MANY ways to use DES to encrypt that data. These ways of using DES to encrypt files or messages are called DES "modes of operation." No two different modes of operation are compatible; that is, if you encrypt a file with one DES mode of operation and then try to decrypt it with another mode, it doesn't work. There are exactly 4 standard DES modes of operation, and there are MANY NON-standard modes of operation. The 4 standard modes of operation are published by the U.S. government in Federal Information Processing Standard (FIPS) 81. The obvious mode of operation is to take the file 8 bytes at a time, and separately encrypt each set of 8 bytes with DES. This method, called "Electronic Code Book" (ECB) has the disadvantage that identical input data produces identical output data; that is, if you have a line with a long string of blanks, each set of 8 blanks procedues exactly the same output, and a "cryptanalyst" (a person who tries to decipher encrypted messages) can spot those repeating patterns. Consequently, the U.S. government has banned the use of ECB for governmental communications (and I wouldn't advise it for people who seriously want their files kept secret). Without going into any details, the other standard DES methods of operation are: Cipher Block Chaining (CBC), Cipher FeedBack (CFB), and Output FeedBack (OFB). None of these methods have the problems of ECB. In addition to the different ways of using DES, there are different ways of handling Macintosh files. Stuffit Deluxe is believed to encrypt the separate "forks" in a mac file (the "resouce fork" and the "data fork") as if they were separate messages. Other programs treat the whole file as one message to be encrypted. So, as you can now see, it really is necessary to know a LOT more detail about the exact encryption algorithm than merely "DES" in order to be able to decrypt a file that has been encrypted on a MAC. I called up the customer support lines of several of the companies that make encryption software for the MAC, e.g. the makers of SUM II and the makers of Sentinel, and asked them what DES mode of operation they use with DES. Only Aladdin Systems (makers of Stuffit Deluxe) knew what I was even talking about! I even went so far as to explain it in detail to some of them, and offered the names of the standard modes to see if they rang any bells. But to no avail. Aladdin knew that they used CBC (good for them!) but they don't merely encrypt the whole file with CBC, but instead treat each fork separately, and do some other things to the file for which I could not get documentation. So I now re-ask my original request. If you know of a DES encryption program for the MAC that uses a fully documented standard encyption algorithm please let me know. Please e-mail your replies to the address below. I will summarize significant responses to this newsgroup. P.S. to any crypto software makers that read this: This could be your opportunity to make advances against your competition by replying to this posting, and explaining your use of standard DES modes of operation! ----------------------------------------------------------------------------- Nelson Bolyard nelson@sgi.COM {decwrl,sun}!sgi!whizzer!nelson Disclaimer: Views expressed herein do not represent the views of my employer. -----------------------------------------------------------------------------