comp.lang.ada
 help / color / mirror / Atom feed
* Technical Question.
@ 2014-06-09 12:15 Austin Obyrne
  2014-06-09 12:50 ` Austin Obyrne
  2014-06-15 21:31 ` Niklas Holsti
  0 siblings, 2 replies; 5+ messages in thread
From: Austin Obyrne @ 2014-06-09 12:15 UTC (permalink / raw)


A cryptographic cipher I have written is demonstrable by mathematical proof to be the ultimate in cryptographic strength i.e. it is of "Theoretically Unbreakable Class" in official crypto terminology.  Although the algorithm is written in stone by analogy I always avail of any extra entanglement (usually considerable) that may up for grabs at the programming stage when I write any cipher programs.  This is often a property of the Ada language alone quite part from the general cipher mathematical algorithm.

Demonstration.

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).

*The elements of the array reside in off-page (In the folder) reservoirs called 'packages' (Case Statements) when not required and are loaded into the ready-use array called 'E' initially at boot-up time of the computer.

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'.  That procedure is safely invertible at decryption time and so far this ploy has never let me down.  The elements of 'E' are scrambled while being loaded into the array 'EE' and are later called *sequentially from 'EE' for use by the main program at run-time as key material.

Question.

Is this ploy of scrambling key material by this means legit in Ada - i.e. is it sanctioned by the Ada reference manual ? i.e. is it acceptable to you guys as *proper Ada orogramming practice?.

I intend to go on using it but I would like to know what you think.

This ploy is my own invention.

I would be grateful for your replies.

--------------------------------------------------------------------------------  PROCEDURE Load_n_Scramble_Normal_Vector_I_Coefficients IS
  -- Pre: Normal_Vector_I_Coefficients_ Package is defined.
  -- Post: These coefficients are stored in ready use arrays at runtime. 

BEGIN  -- Load_Normal_Vector_I_Coefficients

  FOR I IN 1 .. 1000 LOOP
    E(I)  := Normal_Vector_I_Coefficients.NumberExchange(Numin => I);
    EE(I) := Normal_Vector_I_Coefficients.NumberExchange(Numin => I);
--    Q := E(I); -- statistical data collection
--    I_Num(Q):= I_Num(Q)+1; -- these numbers tested ok for randomness
  END LOOP;
    X := 0;
  FOR J IN 1 .. iterances LOOP
  FOR I IN REVERSE X+1 .. X+increment LOOP
    X:=X+1;
    EE(X) := E(I);
--  Ada.Text_IO.New_Line;--
--  Ada.Integer_Text_IO.Put(Item => E(X), Width => 8);--
--  Ada.Integer_Text_IO.Put(Item => EE(X), Width => 8);--
  END LOOP;
--  Ada.Text_IO.New_Line;--
  END LOOP;
--  Ada.Integer_Text_IO.Get(Item => View);  -- halts program to allow view.--
END Load_n_Scramble_Normal_Vector_I_Coefficients;

 ------------------------------------ ------------------------------------------

Thanks in anticipation of your help,

Austin O'Byrne - adacrypr


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Technical Question.
  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
  1 sibling, 1 reply; 5+ messages in thread
From: Austin Obyrne @ 2014-06-09 12:50 UTC (permalink / raw)


On Monday, June 9, 2014 1:15:46 PM UTC+1, Austin Obyrne wrote:
> A cryptographic cipher I have written is demonstrable by mathematical proof to be the ultimate in cryptographic strength i.e. it is of "Theoretically Unbreakable Class" in official crypto terminology. Although the algorithm is written in stone by analogy I always avail of any extra entanglement (usually considerable) that may up for grabs at the programming stage when I write any cipher programs. This is often a property of the Ada language alone quite part from the general cipher mathematical algorithm. Demonstration. 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). *The elements of the array reside in off-page (In the folder) reservoirs called 'packages' (Case Statements) when not required and are loaded into the ready-use array called 'E' initially at boot-up time of the computer. 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'. That procedure is safely invertible at decryption time and so far this ploy has never let me down. The elements of 'E' are scrambled while being loaded into the array 'EE' and are later called *sequentially from 'EE' for use by the main program at run-time as key material. Question. Is this ploy of scrambling key material by this means legit in Ada - i.e. is it sanctioned by the Ada reference manual ? i.e. is it acceptable to you guys as *proper Ada orogramming practice?. I intend to go on using it but I would like to know what you think. This ploy is my own invention. I would be grateful for your replies. -------------------------------------------------------------------------------- PROCEDURE Load_n_Scramble_Normal_Vector_I_Coefficients IS -- Pre: Normal_Vector_I_Coefficients_ Package is defined. -- Post: These coefficients are stored in ready use arrays at runtime. BEGIN -- Load_Normal_Vector_I_Coefficients FOR I IN 1 .. 1000 LOOP E(I) := Normal_Vector_I_Coefficients.NumberExchange(Numin => I); EE(I) := Normal_Vector_I_Coefficients.NumberExchange(Numin => I); -- Q := E(I); -- statistical data collection -- I_Num(Q):= I_Num(Q)+1; -- these numbers tested ok for randomness END LOOP; X := 0; FOR J IN 1 .. iterances LOOP FOR I IN REVERSE X+1 .. X+increment LOOP X:=X+1; EE(X) := E(I); -- Ada.Text_IO.New_Line;-- -- Ada.Integer_Text_IO.Put(Item => E(X), Width => 8);-- -- Ada.Integer_Text_IO.Put(Item => EE(X), Width => 8);-- END LOOP; -- Ada.Text_IO.New_Line;-- END LOOP; -- Ada.Integer_Text_IO.Get(Item => View); -- halts program to allow view.-- END Load_n_Scramble_Normal_Vector_I_Coefficients; ------------------------------------ ------------------------------------------ Thanks in anticipation of your help, Austin O'Byrne - adacrypr

Forgot to include these scrambling parameters,

  Increment : CONSTANT Integer := 20;
  Iterances : CONSTANT Integer := 50;
  -- Normals scrambling
  -- Increment * Iterances <= 1000. -- specifies the scope of the scrambling 
data.

Austin

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Technical Question.
  2014-06-09 12:50 ` Austin Obyrne
@ 2014-06-09 17:54   ` Austin Obyrne
  0 siblings, 0 replies; 5+ messages in thread
From: Austin Obyrne @ 2014-06-09 17:54 UTC (permalink / raw)


On Monday, June 9, 2014 1:50:09 PM UTC+1, Austin Obyrne wrote:
> On Monday, June 9, 2014 1:15:46 PM UTC+1, Austin Obyrne wrote: > A cryptographic cipher I have written is demonstrable by mathematical proof to be the ultimate in cryptographic strength i.e. it is of "Theoretically Unbreakable Class" in official crypto terminology. Although the algorithm is written in stone by analogy I always avail of any extra entanglement (usually considerable) that may up for grabs at the programming stage when I write any cipher programs. This is often a property of the Ada language alone quite part from the general cipher mathematical algorithm. Demonstration. 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). *The elements of the array reside in off-page (In the folder) reservoirs called 'packages' (Case Statements) when not required and are loaded into the ready-use array called 'E' initially at boot-up time of the computer. 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'. That procedure is safely invertible at decryption time and so far this ploy has never let me down. The elements of 'E' are scrambled while being loaded into the array 'EE' and are later called *sequentially from 'EE' for use by the main program at run-time as key material. Question. Is this ploy of scrambling key material by this means legit in Ada - i.e. is it sanctioned by the Ada reference manual ? i.e. is it acceptable to you guys as *proper Ada orogramming practice?. I intend to go on using it but I would like to know what you think. This ploy is my own invention. I would be grateful for your replies. -------------------------------------------------------------------------------- PROCEDURE Load_n_Scramble_Normal_Vector_I_Coefficients IS -- Pre: Normal_Vector_I_Coefficients_ Package is defined. -- Post: These coefficients are stored in ready use arrays at runtime. BEGIN -- Load_Normal_Vector_I_Coefficients FOR I IN 1 .. 1000 LOOP E(I) := Normal_Vector_I_Coefficients.NumberExchange(Numin => I); EE(I) := Normal_Vector_I_Coefficients.NumberExchange(Numin => I); -- Q := E(I); -- statistical data collection -- I_Num(Q):= I_Num(Q)+1; -- these numbers tested ok for randomness END LOOP; X := 0; FOR J IN 1 .. iterances LOOP FOR I IN REVERSE X+1 .. X+increment LOOP X:=X+1; EE(X) := E(I); -- Ada.Text_IO.New_Line;-- -- Ada.Integer_Text_IO.Put(Item => E(X), Width => 8);-- -- Ada.Integer_Text_IO.Put(Item => EE(X), Width => 8);-- END LOOP; -- Ada.Text_IO.New_Line;-- END LOOP; -- Ada.Integer_Text_IO.Get(Item => View); -- halts program to allow view.-- END Load_n_Scramble_Normal_Vector_I_Coefficients; ------------------------------------ ------------------------------------------ Thanks in anticipation of your help, Austin O'Byrne - adacrypr Forgot to include these scrambling parameters, Increment : CONSTANT Integer := 20; Iterances : CONSTANT Integer := 50; -- Normals scrambling -- Increment * Iterances <= 1000. -- specifies the scope of the scrambling data. Austin

 Late annotation.

 X := 0; 
  FOR J IN 1 .. iterances LOOP 
  FOR I IN REVERSE X+1 .. X+increment LOOP 
    X:=X+1; 
    EE(X) := E(I); 
--  Ada.Text_IO.New_Line;-- 
--  Ada.Integer_Text_IO.Put(Item => E(X), Width => 8);-- 
--  Ada.Integer_Text_IO.Put(Item => EE(X), Width => 8);-- 
  END LOOP; 
--  Ada.Text_IO.New_Line;-- 
  END LOOP; 
--  Ada.Integer_Text_IO.Get(Item => View);  -- halts program to allow view.-- 
END Load_n_Scramble_Normal_Vector_I_Coefficients; 

For this setting of scrambling parameters i.e increment := 20,iterances := 50

The inner loop puts element - 
No 20 of 'E' into position 1 of 'EE'
No 19 of 'e' goes to position 2 of 'EE' and so on to completion of the inside LOOP and all elements from 20 to 1 have been transposed.

The outside loop repeats that 50 times so as to position all of the elements of 'E' in displaced positions in 'EE'.

What's bothering me is this.  Ada has some very distinct rules about what can be done with operating on arrays and strings.  Although my method works does it do so within all of these rules and not be just a lucky bug ????

adacrypt

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Technical Question.
  2014-06-09 12:15 Technical Question Austin Obyrne
  2014-06-09 12:50 ` Austin Obyrne
@ 2014-06-15 21:31 ` Niklas Holsti
  2014-06-16 12:49   ` Austin Obyrne
  1 sibling, 1 reply; 5+ messages in thread
From: Niklas Holsti @ 2014-06-15 21:31 UTC (permalink / raw)


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
      .      @       .

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Technical Question.
  2014-06-15 21:31 ` Niklas Holsti
@ 2014-06-16 12:49   ` Austin Obyrne
  0 siblings, 0 replies; 5+ messages in thread
From: Austin Obyrne @ 2014-06-16 12:49 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-06-16 12:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox