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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.68.197.73 with SMTP id is9mr7892462pbc.0.1402336458309; Mon, 09 Jun 2014 10:54:18 -0700 (PDT) X-Received: by 10.140.96.41 with SMTP id j38mr74823qge.8.1402336458208; Mon, 09 Jun 2014 10:54:18 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!h3no452278igd.0!news-out.google.com!a8ni930qaq.1!nntp.google.com!s7no3395qap.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 9 Jun 2014 10:54:17 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=86.176.53.90; posting-account=pmkN8QoAAAAtIhXRUfydb0SCISnwaeyg NNTP-Posting-Host: 86.176.53.90 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Technical Question. From: Austin Obyrne Injection-Date: Mon, 09 Jun 2014 17:54:18 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 5773 X-Received-Body-CRC: 864960861 Xref: news.eternal-september.org comp.lang.ada:20191 Date: 2014-06-09T10:54:17-07:00 List-Id: 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 crypto= graphic cipher I have written is demonstrable by mathematical proof to be t= he ultimate in cryptographic strength i.e. it is of "Theoretically Unbreaka= ble Class" in official crypto terminology. Although the algorithm is writte= n in stone by analogy I always avail of any extra entanglement (usually con= siderable) 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 p= art from the general cipher mathematical algorithm. Demonstration. This is = an array below that loads the 'I' coefficients of a vector (the J and K coe= fficients are elsewhere also in other arrays not shown here). *The elements= of the array reside in off-page (In the folder) reservoirs called 'package= s' (Case Statements) when not required and are loaded into the ready-use ar= ray called 'E' initially at boot-up time of the computer. The procedure bel= ow scrambles the elements of the array called 'E' by positional reshuffling= them from their original assigned position and repositioning them by contr= olled means in another array called 'EE'. That procedure is safely invertib= le at decryption time and so far this ploy has never let me down. The eleme= nts of 'E' are scrambled while being loaded into the array 'EE' and are lat= er called *sequentially from 'EE' for use by the main program at run-time a= s key material. Question. Is this ploy of scrambling key material by this m= eans 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 inte= nd 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 Loa= d_n_Scramble_Normal_Vector_I_Coefficients IS -- Pre: Normal_Vector_I_Coeffi= cients_ 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) :=3D Normal_Vector_I_Coefficients.NumberExchange(Numin= =3D> I); EE(I) :=3D Normal_Vector_I_Coefficients.NumberExchange(Numin =3D>= I); -- Q :=3D E(I); -- statistical data collection -- I_Num(Q):=3D I_Num(Q= )+1; -- these numbers tested ok for randomness END LOOP; X :=3D 0; FOR J IN= 1 .. iterances LOOP FOR I IN REVERSE X+1 .. X+increment LOOP X:=3DX+1; EE(= X) :=3D E(I); -- Ada.Text_IO.New_Line;-- -- Ada.Integer_Text_IO.Put(Item = =3D> E(X), Width =3D> 8);-- -- Ada.Integer_Text_IO.Put(Item =3D> EE(X), Wid= th =3D> 8);-- END LOOP; -- Ada.Text_IO.New_Line;-- END LOOP; -- Ada.Integer= _Text_IO.Get(Item =3D> 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 paramete= rs, Increment : CONSTANT Integer :=3D 20; Iterances : CONSTANT Integer :=3D= 50; -- Normals scrambling -- Increment * Iterances <=3D 1000. -- specifies= the scope of the scrambling data. Austin Late annotation. X :=3D 0;=20 FOR J IN 1 .. iterances LOOP=20 FOR I IN REVERSE X+1 .. X+increment LOOP=20 X:=3DX+1;=20 EE(X) :=3D E(I);=20 -- Ada.Text_IO.New_Line;--=20 -- Ada.Integer_Text_IO.Put(Item =3D> E(X), Width =3D> 8);--=20 -- Ada.Integer_Text_IO.Put(Item =3D> EE(X), Width =3D> 8);--=20 END LOOP;=20 -- Ada.Text_IO.New_Line;--=20 END LOOP;=20 -- Ada.Integer_Text_IO.Get(Item =3D> View); -- halts program to allow vie= w.--=20 END Load_n_Scramble_Normal_Vector_I_Coefficients;=20 For this setting of scrambling parameters i.e increment :=3D 20,iterances := =3D 50 The inner loop puts element -=20 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 insi= de 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 element= s of 'E' in displaced positions in 'EE'. What's bothering me is this. Ada has some very distinct rules about what c= an 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