comp.lang.ada
 help / color / mirror / Atom feed
* Banging the Ada Drum.
@ 2012-02-28  9:39 adacrypt
  2012-02-28 10:40 ` Martin
  2012-02-28 10:49 ` Martin
  0 siblings, 2 replies; 6+ messages in thread
From: adacrypt @ 2012-02-28  9:39 UTC (permalink / raw)


I have developed a world first in cryptography and a salient thing
about this cipher is that it is written in Ada, any person wishing to
understand it and use it has to do so through the medium of Ada at
least for the first time round, before it is rewritten in other
languages.

The cryptography scene is a graveyard of failed enthusiasts so I had
better explain a few things.

I have based my cryptography design on the conviction that all current
cryptography is weak because it uses the traditional real line as the
number line i.e the selection domain for the raw encryption data that
must somehow be transformed into ciphertext.  The upshot is that the
natural transparency that characterises all mathematics continues to
shine through in the ciphertext giving it residual structure that just
won’t go away – it is indelible in all scalar cryptography.  The
result is cryptography that is only “practically unbreakable” – strong
enough for the time being in the absence of sufficient computer power
that will break but vulnerable to the advent of sufficient computer
power when and if that ever happens.  The big threat comes from
quantum computing.

My solution is to use spatial number theory and three-dimensional
space as the selection domain for something that I am calling
“displacement” cryptography instead of the current cryptography that I
call “scalar” cryptography.

I have developed an up-and-running cipher that I have placed in the
public domain for the use of anybody who wants to do that.  This can
be found for free downloading at,
http://www.adacrypt.com/introduction.html under the title box “ Free
Software – Gnu General Public License – “Skew Line Encryptions”.

Ada experts may see this program as being a bit gauche but let me
explain that the object here is presenting the cryptography and the
mathematics in an Ada setting without any attempt at elegance.  That
can come later.

 I deplore slick source code i.e. ultra short-form unintuitive code
writing in any case but am open to optimising the operational speed of
my cryptography by legitimately rewriting the source code if it does
not affect the transparency of the cipher.

Note, that this cipher is immune to increasing computer power for all
time and it possesses the ultimate cryptographic strength of
“Theoretically Unbreakable”.  It is a world first and is here to stay.

 I would be interested in what readers think and equally what they can
do to enhance this cipher without making it unreadable.  You are
invited to modify it as you see fit and worthwhile.

- adacrypt



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

* Re: Banging the Ada Drum.
  2012-02-28  9:39 Banging the Ada Drum adacrypt
@ 2012-02-28 10:40 ` Martin
  2012-02-28 10:49 ` Martin
  1 sibling, 0 replies; 6+ messages in thread
From: Martin @ 2012-02-28 10:40 UTC (permalink / raw)


On Feb 28, 9:39 am, adacrypt <austin.oby...@hotmail.com> wrote:
> I have developed a world first in cryptography and a salient thing
> about this cipher is that it is written in Ada, any person wishing to
> understand it and use it has to do so through the medium of Ada at
> least for the first time round, before it is rewritten in other
> languages.
>
> The cryptography scene is a graveyard of failed enthusiasts so I had
> better explain a few things.
>
> I have based my cryptography design on the conviction that all current
> cryptography is weak because it uses the traditional real line as the
> number line i.e the selection domain for the raw encryption data that
> must somehow be transformed into ciphertext.  The upshot is that the
> natural transparency that characterises all mathematics continues to
> shine through in the ciphertext giving it residual structure that just
> won’t go away – it is indelible in all scalar cryptography.  The
> result is cryptography that is only “practically unbreakable” – strong
> enough for the time being in the absence of sufficient computer power
> that will break but vulnerable to the advent of sufficient computer
> power when and if that ever happens.  The big threat comes from
> quantum computing.
>
> My solution is to use spatial number theory and three-dimensional
> space as the selection domain for something that I am calling
> “displacement” cryptography instead of the current cryptography that I
> call “scalar” cryptography.
>
> I have developed an up-and-running cipher that I have placed in the
> public domain for the use of anybody who wants to do that.  This can
> be found for free downloading at,http://www.adacrypt.com/introduction.htmlunder the title box “ Free
> Software – Gnu General Public License – “Skew Line Encryptions”.
>
> Ada experts may see this program as being a bit gauche but let me
> explain that the object here is presenting the cryptography and the
> mathematics in an Ada setting without any attempt at elegance.  That
> can come later.
>
>  I deplore slick source code i.e. ultra short-form unintuitive code
> writing in any case but am open to optimising the operational speed of
> my cryptography by legitimately rewriting the source code if it does
> not affect the transparency of the cipher.
>
> Note, that this cipher is immune to increasing computer power for all
> time and it possesses the ultimate cryptographic strength of
> “Theoretically Unbreakable”.  It is a world first and is here to stay.
>
>  I would be interested in what readers think and equally what they can
> do to enhance this cipher without making it unreadable.  You are
> invited to modify it as you see fit and worthwhile.
>
> - adacrypt

I'm surprised you think this is readable!! Seriously, nesting loops
without indenting the inner loop is just plain _hard_to_read_ (and
ugly!). That's just one example.

Ada has a generally accepted style - please use it. Even just
selecting the default GNAT options and running it through their
"pretty printer" would make a huge difference... UPPERCASE keywords
haven't been 'good style' for nearly 20 years now (you haven't even
been consistent in that - see "ENd General_Decryption_Program_Mark_3;"
in the same file you've used "While" not "WHILE").

Apologies if this is work you had intended to do but why you don't
just adopt this as your normal method of working is beyond me.

On performance, case statements tend to be slower than constant lookup
tables. That should be an easy one to change and test.
-- Martin



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

* Re: Banging the Ada Drum.
  2012-02-28  9:39 Banging the Ada Drum adacrypt
  2012-02-28 10:40 ` Martin
@ 2012-02-28 10:49 ` Martin
  2012-02-28 11:30   ` adacrypt
  2012-02-28 11:49   ` adacrypt
  1 sibling, 2 replies; 6+ messages in thread
From: Martin @ 2012-02-28 10:49 UTC (permalink / raw)


On Feb 28, 9:39 am, adacrypt <austin.oby...@hotmail.com> wrote:
[snip]

  FOR I in 30 ..1030 LOOP
    A(I) := Alices_Digital_Signature.GetUnits(Numin => I);
    B(I) := Alices_Digital_Signature.GetUnits(Numin => I);
  END LOOP;

Don't explicitly re-use the array limits in loops, prefer:

   for I in A'Range loop
      A (I) := ...

Now the compiler may not inject checks on "A (I)" as it knows that the
range of "I" is derived directly from "A".

Why have different types for A and B - they are both just arrays of
Integer with the same index. If you really want to make them
different, you could do:

   type Index is range 30 .. 1_030;
   type A_Array_Type is array (Index) of Integer;
   type B_Array_Type is new A_Array_Type;

   A : A_Array_Type;
   B : B_Array_Type;

BTW, are you assuming Integer is 32-bits? Because it doesn't have to
be...it could be as small as 16 bits or larger than 32.

-- Martin



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

* Re: Banging the Ada Drum.
  2012-02-28 10:49 ` Martin
@ 2012-02-28 11:30   ` adacrypt
  2012-02-28 11:49   ` adacrypt
  1 sibling, 0 replies; 6+ messages in thread
From: adacrypt @ 2012-02-28 11:30 UTC (permalink / raw)


On Feb 28, 10:49 am, Martin <mar...@thedowies.com> wrote:
> On Feb 28, 9:39 am, adacrypt <austin.oby...@hotmail.com> wrote:
> [snip]
>
>   FOR I in 30 ..1030 LOOP
>     A(I) := Alices_Digital_Signature.GetUnits(Numin => I);
>     B(I) := Alices_Digital_Signature.GetUnits(Numin => I);
>   END LOOP;
>
> Don't explicitly re-use the array limits in loops, prefer:
>
>    for I in A'Range loop
>       A (I) := ...
>
> Now the compiler may not inject checks on "A (I)" as it knows that the
> range of "I" is derived directly from "A".
>
> Why have different types for A and B - they are both just arrays of
> Integer with the same index. If you really want to make them
> different, you could do:
>
>    type Index is range 30 .. 1_030;
>    type A_Array_Type is array (Index) of Integer;
>    type B_Array_Type is new A_Array_Type;
>
>    A : A_Array_Type;
>    B : B_Array_Type;
>
> BTW, are you assuming Integer is 32-bits? Because it doesn't have to
> be...it could be as small as 16 bits or larger than 32.
>
> -- Martin

Your'e missing the point - this is not a fine piece of programming in
Ada - I hold my hands up in that respect - this work has been wrested
with blood sweat and tears from a world of resistance and
intransigence in the crypto scene - writing great Ada is another and
quite different playing field - I am not averse to that but I say
keeping one's eye on the ball of simplicity is paramount.

There are millions of people out there who can write great Ada -
nobody apart from me can write great cryptography.

Thanks for your well meant comments. I appreciate your reply.

- adacrypt



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

* Re: Banging the Ada Drum.
  2012-02-28 10:49 ` Martin
  2012-02-28 11:30   ` adacrypt
@ 2012-02-28 11:49   ` adacrypt
  2012-02-28 13:26     ` Martin
  1 sibling, 1 reply; 6+ messages in thread
From: adacrypt @ 2012-02-28 11:49 UTC (permalink / raw)


On Feb 28, 10:49 am, Martin <mar...@thedowies.com> wrote:
> On Feb 28, 9:39 am, adacrypt <austin.oby...@hotmail.com> wrote:
> [snip]
>
>   FOR I in 30 ..1030 LOOP
>     A(I) := Alices_Digital_Signature.GetUnits(Numin => I);
>     B(I) := Alices_Digital_Signature.GetUnits(Numin => I);
>   END LOOP;
>
> Don't explicitly re-use the array limits in loops, prefer:
>
>    for I in A'Range loop
>       A (I) := ...
>
> Now the compiler may not inject checks on "A (I)" as it knows that the
> range of "I" is derived directly from "A".
>
> Why have different types for A and B - they are both just arrays of
> Integer with the same index. If you really want to make them
> different, you could do:
>
>    type Index is range 30 .. 1_030;
>    type A_Array_Type is array (Index) of Integer;
>    type B_Array_Type is new A_Array_Type;
>
>    A : A_Array_Type;
>    B : B_Array_Type;
>
> BTW, are you assuming Integer is 32-bits? Because it doesn't have to
> be...it could be as small as 16 bits or larger than 32.
>
> -- Martin

Martin,

May I explain that I am  a retired Ship's Engineer in my late
seventies - I am taking your points on board very self-consciously and
normally would leap at the improvements you suggest - in fact could I
ask you to continue and I will build these improvements into my
existing work.

If I was younger I would have a far more ambitious outlook in
improving my Ada - please keep on pointing out improvements that I can
make.

Also,

Would you please consider rewriting this entire software in your
version of it and I will post that up on my website under yor name or
even your own website with a link from mine.

Thanks again.

- adacrypt



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

* Re: Banging the Ada Drum.
  2012-02-28 11:49   ` adacrypt
@ 2012-02-28 13:26     ` Martin
  0 siblings, 0 replies; 6+ messages in thread
From: Martin @ 2012-02-28 13:26 UTC (permalink / raw)


On Feb 28, 11:49 am, adacrypt <austin.oby...@hotmail.com> wrote:
> On Feb 28, 10:49 am, Martin <mar...@thedowies.com> wrote:
>
>
>
>
>
>
>
>
>
> > On Feb 28, 9:39 am, adacrypt <austin.oby...@hotmail.com> wrote:
> > [snip]
>
> >   FOR I in 30 ..1030 LOOP
> >     A(I) := Alices_Digital_Signature.GetUnits(Numin => I);
> >     B(I) := Alices_Digital_Signature.GetUnits(Numin => I);
> >   END LOOP;
>
> > Don't explicitly re-use the array limits in loops, prefer:
>
> >    for I in A'Range loop
> >       A (I) := ...
>
> > Now the compiler may not inject checks on "A (I)" as it knows that the
> > range of "I" is derived directly from "A".
>
> > Why have different types for A and B - they are both just arrays of
> > Integer with the same index. If you really want to make them
> > different, you could do:
>
> >    type Index is range 30 .. 1_030;
> >    type A_Array_Type is array (Index) of Integer;
> >    type B_Array_Type is new A_Array_Type;
>
> >    A : A_Array_Type;
> >    B : B_Array_Type;
>
> > BTW, are you assuming Integer is 32-bits? Because it doesn't have to
> > be...it could be as small as 16 bits or larger than 32.
>
> > -- Martin
>
> Martin,
>
> May I explain that I am  a retired Ship's Engineer in my late
> seventies - I am taking your points on board very self-consciously and
> normally would leap at the improvements you suggest - in fact could I
> ask you to continue and I will build these improvements into my
> existing work.
>
> If I was younger I would have a far more ambitious outlook in
> improving my Ada - please keep on pointing out improvements that I can
> make.
>
> Also,
>
> Would you please consider rewriting this entire software in your
> version of it and I will post that up on my website under yor name or
> even your own website with a link from mine.
>
> Thanks again.
>
> - adacrypt

Hi adacrypt,
I appreciate every review comment can feel like a personal dig - I
really, really don't mean it to be. You're assertion that you wanted
clear code just seemed at odds with what appeared in front of me when
I unzipped you file! I totally agree that simple, clear code is goal
worth striving for but my first comments were simply on the substance
of "style" and not "coding elegance". Without the former, it is
extremely hard to achieve the latter.

I'll take another look when I get home and see what happens by simply
getting GNAT/GPS to reformat the code - I imagine the entire structure
will much more readily and thus any potential bottlenecks will appear
more swiftly.
HTH
-- Martin



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

end of thread, other threads:[~2012-02-28 13:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-28  9:39 Banging the Ada Drum adacrypt
2012-02-28 10:40 ` Martin
2012-02-28 10:49 ` Martin
2012-02-28 11:30   ` adacrypt
2012-02-28 11:49   ` adacrypt
2012-02-28 13:26     ` Martin

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