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 autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.68.69.98 with SMTP id d2mr15034803pbu.0.1408990154960; Mon, 25 Aug 2014 11:09:14 -0700 (PDT) X-Received: by 10.140.102.104 with SMTP id v95mr68580qge.6.1408990154502; Mon, 25 Aug 2014 11:09:14 -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!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!r2no7096753igi.0!news-out.google.com!j6ni8038qas.0!nntp.google.com!m5no3066263qaj.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 25 Aug 2014 11:09:14 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=5.81.69.184; posting-account=j15vhwoAAABH_eywb4s2_dWxAM2kkx7W NNTP-Posting-Host: 5.81.69.184 References: <9c5de333-276c-4e3a-be5a-4e5a98cdaa1d@googlegroups.com> <440bf1f1-3e98-47ac-b0c0-f73f170a3603@googlegroups.com> <55b1078f-dc26-4ae0-ac9f-5af0bfd90992@googlegroups.com> <84ce2caf-0a48-4952-8703-af1c0fabe583@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Integer Overflow Question. From: austin.obyrne769@btinternet.com Injection-Date: Mon, 25 Aug 2014 18:09:14 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 5216 X-Received-Body-CRC: 2556278284 Xref: news.eternal-september.org comp.lang.ada:21913 Date: 2014-08-25T11:09:14-07:00 List-Id: On Monday, August 25, 2014 6:40:58 PM UTC+1, Simon Clubley wrote: > On 2014-08-25, austin.obyrne769@btinternet.com wrote: >=20 > > On Monday, August 25, 2014 2:34:29 PM UTC+1, Aay Jay Chan wrote: >=20 > >> From the fact that you don't know how big your types are, it sounds li= ke you are using pre-defined types. In Ada, the prefered way is to define y= our own types with the range that matches your requirements. That way, you = will know, at compile time, whether the compiler can implement those types = on the target platform. >=20 > > >=20 > > Apologies >=20 > > >=20 > > I haven't just learned that I can do that. >=20 > > >=20 > > I have indeed been using pre-defined integers and was quite unaware >=20 > > that I could define my own types with a suitable range - I have only >=20 > > just learned that from another source. >=20 > > >=20 >=20 >=20 > Austin, the following is a polite and well intentioned suggestion. >=20 >=20 >=20 > User defined data types with user defined ranges are a core capability >=20 > within Ada's range of features. >=20 >=20 >=20 > Although I am a professional programmer, my interest in Ada is only >=20 > personal, and not work related. However, that doesn't change the fact >=20 > I found out about this capability within Ada very shortly after >=20 > starting to explore Ada years ago. >=20 >=20 >=20 > My suggestion is for you to pick up an Ada book or maybe look at an >=20 > online resource and learn about the other things Ada can do. >=20 >=20 >=20 > When I was beginning Ada I found things like Ada Distilled to be of >=20 > interest and I see it is still online in various forms. I also have >=20 > paper books such as the Barnes "Programming in Ada 95", second edition >=20 > and "Ada as a second language" by Cohen in my library. >=20 >=20 >=20 > I would recommend you start with Ada Distilled and see how you get on >=20 > with that before buying any books. Also, before buying any books, I >=20 > recommend you ask here for advice on what the current recommended books >=20 > are. >=20 >=20 >=20 > The Ada reference manual is also available online and for downloading. >=20 >=20 >=20 > > You see, I am not a well informed programmer and I am also pre-occupied= with the maths and the cryptography as well as The Ada side of things. >=20 > > >=20 >=20 >=20 > If you are creating crypto schemes, you _really_ need to be skilled in >=20 > your implementation language of choice. >=20 >=20 >=20 > > Please Mr Chan,=20 >=20 > > >=20 > > Could you please set out the Ada-95 sourcecode for defining an integer = variable called "CipherText" in the range say of 8 decimal digits to 12 dec= imal digits. I can do the others myself once I know what to do. >=20 > > >=20 >=20 >=20 > If you don't know this about Ada, it's not something which should be >=20 > done by rote. However, if you work through an Ada introduction, this >=20 > basic capability is something you should be able to do yourself. >=20 >=20 >=20 > Simon. >=20 >=20 >=20 > --=20 >=20 > Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP >=20 > Microsoft: Bringing you 1980s technology to a 21st century world Yes, I agree with everything you say. The cipher is complete and there is no fear of it being broken. It's a qu= estion more of refinement now that I get this matter right in my understand= ing whether I take it into this cipher or not later. The cipher does not r= equire large integers for its operation and it is more a question of me say= ing the right things about it in the user-guide that I am currently writing= . Your advice is appreciated and I will look for the books you recommend. Austin. Ada is the perfect language for cryptography in my view