From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: border1.nntp.dca3.giganews.com!backlog4.nntp.dca3.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!goblin3!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Clubley Newsgroups: comp.lang.ada Subject: Re: Binary versus text and compiler versions, was: Re: Will Ada-95 Programs Written in MS Windows Run in MacOS and Linux Without Some Tweaking. Date: Wed, 11 Dec 2013 12:50:45 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <1d445f04-b670-444f-9858-55da271fe17a@googlegroups.com> <2b6dc37f-4aa6-4c18-be59-8c09f6f37f01@googlegroups.com> Injection-Date: Wed, 11 Dec 2013 12:50:45 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="3a7522c45acd2a6c162b080668fa4020"; logging-data="9065"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19DwK4HMqqJfeTEiMDnE0XQleVRSDx3u3U=" User-Agent: slrn/0.9.8.1 (VMS/Multinet) Cancel-Lock: sha1:9NVoBis68/9Kz26pn77B+kgbiYk= X-Original-Bytes: 4251 Xref: number.nntp.dca.giganews.com comp.lang.ada:184184 Date: 2013-12-11T12:50:45+00:00 List-Id: On 2013-12-11, Dmitry A. Kazakov wrote: > On Tue, 10 Dec 2013 23:08:40 +0000 (UTC), Simon Clubley wrote: > >> On 2013-12-10, Randy Brukardt wrote: >>> >>> But if I was writing this sort of code, I wouldn't worry about line endings >>> at all, and simply encrypt the file as binary data, using Stream_IO to read >>> it in and out. >> >> Thank you. That's one of a number of things I don't understand about this. >> >> A serious encryption tool is going to treat the input as a opaque stream of >> bytes not as text. > > That depends. I remember porting early versions of PGP to SysV and VMS, > back in early 90's. It was all about text files which must have been > converted, recoded etc in order to be readable. > >> I don't encrypt pure text, but I _do_ encrypt full directory trees which >> may have a mixture of text and binary files within them. > > No difference. Extrapolating your logic, there is no tree and no files just > a chunk of disk image. And as far as the encryption layer is concerned that's absolutely correct. > Directory tree is no better abstraction than lines > of a text file. It works so long all targets share the abstraction. For > either directory trees or text files that does not hold. > Actually, it does hold for directory trees when you consider the abstraction level at which the encryption is typically applied. I have two typical usage cases when it comes to encryption. 1) I tar up a directory into a tar archive and then pass the tar file through gpg. As far as gpg is concerned, the tar archive is just a opaque binary blob. When decrypting the archive, the opaque binary data is output by gpg into tar and it's tar, a higher level part of the process, which assigns meaning to the encrypted data. 2) I use LUKS for full disk (or more accurately, full partition) encryption. In this case the ext2 filesystem layer is above the encryption layer so once again, all the encryption layer is interested in is encrypting a series of opaque data blocks. It's the upper ext2 filesystem layer which assigns meaning to the decrypted opaque (as seen by the encryption layer) data blocks; the encryption layer should not care about what it is encrypting. There may be some minor usage cases for doing text conversion within the encryption tool, but it's not the typical usage case, especially these days. > Having said that, I strongly believe that whatever encryption, it should be > done on the transport layer and never on the application layer. So in the > end I agree with you, but not with your argument. > Simon. -- Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP Microsoft: Bringing you 1980s technology to a 21st century world