comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP>
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)
Date: 2013-12-11T12:50:45+00:00	[thread overview]
Message-ID: <l89n35$8r9$1@dont-email.me> (raw)
In-Reply-To: von45449qwxc.1cacpc700vgho$.dlg@40tude.net

On 2013-12-11, Dmitry A. Kazakov <mailbox@dmitry-kazakov.de> wrote:
> On Tue, 10 Dec 2013 23:08:40 +0000 (UTC), Simon Clubley wrote:
>
>> On 2013-12-10, Randy Brukardt <randy@rrsoftware.com> 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


  reply	other threads:[~2013-12-11 12:50 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-07 12:24 Will Ada-95 Programs Written in MS Windows Run in MacOS and Linux Without Some Tweaking Austin Obyrne
2013-12-07 13:16 ` Simon Wright
2013-12-07 14:01   ` Austin Obyrne
2013-12-07 17:18     ` Simon Wright
2013-12-07 18:26       ` Austin Obyrne
2013-12-08 17:17         ` Simon Wright
2013-12-08 18:17           ` Jeffrey Carter
2013-12-08 20:00             ` Simon Wright
2013-12-08 21:20               ` Jeffrey Carter
2013-12-08 18:44           ` Austin Obyrne
2013-12-08 20:10             ` Simon Wright
2013-12-08 20:31               ` Austin Obyrne
2013-12-08 22:39               ` Austin Obyrne
2013-12-16 11:46                 ` Simon Wright
2013-12-16 19:00                   ` Austin Obyrne
2013-12-16 21:19                     ` Simon Wright
2013-12-16 21:40                       ` Austin Obyrne
2013-12-18  4:44                       ` Austin Obyrne
2013-12-18  8:35                         ` Simon Wright
2013-12-18  9:54                           ` Austin Obyrne
2013-12-18  4:57                       ` Austin Obyrne
2013-12-18  8:55                         ` Simon Wright
2013-12-18  5:38                       ` Austin Obyrne
2013-12-18  9:02                         ` Simon Wright
2013-12-18 13:02                           ` Austin Obyrne
2013-12-16 19:24                   ` Austin Obyrne
2013-12-17  9:06                   ` Austin Obyrne
2013-12-08 20:01           ` Simon Wright
2013-12-10  6:37           ` Randy Brukardt
2013-12-10 10:14             ` Austin Obyrne
2013-12-10 11:39             ` Austin Obyrne
2013-12-10 21:49               ` Randy Brukardt
2013-12-10 23:08                 ` Binary versus text and compiler versions, was: " Simon Clubley
2013-12-11  8:35                   ` Dmitry A. Kazakov
2013-12-11 12:50                     ` Simon Clubley [this message]
2013-12-11 13:29                       ` Dmitry A. Kazakov
2013-12-11 14:20                         ` Simon Wright
2013-12-11 18:25                           ` Simon Clubley
2013-12-11 14:53                     ` G.B.
2013-12-11 15:14                       ` Eryndlia Mavourneen
2013-12-11 16:07                         ` Austin Obyrne
2013-12-11 16:26                           ` Eryndlia Mavourneen
2013-12-11 17:37                             ` Austin Obyrne
2013-12-11 17:54                               ` Eryndlia Mavourneen
2013-12-12  1:55                                 ` Austin Obyrne
2013-12-11 16:54                         ` G.B.
2013-12-11 11:37                   ` Austin Obyrne
2013-12-12 19:23                     ` erlo
2013-12-11 10:35                 ` Austin Obyrne
2013-12-11  0:34             ` Simon Wright
2013-12-11  1:01               ` Jeffrey Carter
2013-12-11  8:38                 ` Simon Wright
2013-12-11 17:07                   ` Simon Wright
2013-12-11  8:49               ` Simon Wright
2013-12-07 22:49       ` Austin Obyrne
2013-12-07 14:08   ` Austin Obyrne
2013-12-08 20:06 ` Stephen Leake
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox