comp.lang.ada
 help / color / mirror / Atom feed
From: Austin Obyrne <austin.obyrne@hotmail.com>
Subject: Re: Technical Question.
Date: Mon, 16 Jun 2014 05:49:05 -0700 (PDT)
Date: 2014-06-16T05:49:05-07:00	[thread overview]
Message-ID: <31ae3045-4b9f-4cd4-b803-723f18047c72@googlegroups.com> (raw)
In-Reply-To: <c06hm5Fd4i4U1@mid.individual.net>

On Sunday, June 15, 2014 10:31:48 PM UTC+1, Niklas Holsti wrote:
> On 14-06-09 15:15 , Austin Obyrne wrote: > This is an array below that loads the 'I' coefficients of a vector > (the J and K coefficients are elsewhere also in other arrays not > shown here). [snip] > The procedure below scrambles the elements of the array called 'E' by > positional reshuffling them from their original assigned position and > repositioning them by controlled means in another array called 'EE'. [snip] > Question. > > Is this ploy of scrambling key material by this means legit in Ada - > i.e. is it sanctioned by the Ada reference manual ? The ARM does not say anything about the legitimacy of a particular algorithm. If your Ada algorithm - is written in legal Ada syntax (which it probably is, if an Ada compiler compiles it), and - never uses a variable which has not been first given a value, and - never indexes an array with a value outside the bounds of the array, and - never does any thing which the ARM defines as a bounded error or erroneous execution, then your Ada program works as its source-code says it should, and is "legit". I haven't analysed your algorithm to see if it might do any of those bad things. Some of the bad things will be caught by run-time checks and exceptions, but some may not; in particular the use of uninitialized variables is such a risk. Consider using pragma Normalize_Scalars to help detect such errors. > i.e. is it acceptable to you guys as *proper Ada orogramming > practice?. "Scrambling an array", whatever that means in general, does not seem counter to Ada practice. The choice of algorithms is not, IMO, a matter of Ada practice, but of general SW design. I could take issue with your Ada coding style and choice of variable names, etc., but I don't think that is what you are asking about. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .

Many , many thanks - I suspected as much.

Scrambling means transpositional changing of elements of an array so that that they are not consecutively placed any more according to an obvious indexing system.

In cryptography it confounds things abit for an illegal adversary who can then only guess at the key information.

Thanks again - Austin

      reply	other threads:[~2014-06-16 12:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-09 12:15 Technical Question Austin Obyrne
2014-06-09 12:50 ` Austin Obyrne
2014-06-09 17:54   ` Austin Obyrne
2014-06-15 21:31 ` Niklas Holsti
2014-06-16 12:49   ` Austin Obyrne [this message]
replies disabled

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