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.224.51.68 with SMTP id c4mr134806qag.7.1379842994157; Sun, 22 Sep 2013 02:43:14 -0700 (PDT) X-Received: by 10.49.99.65 with SMTP id eo1mr696787qeb.3.1379842994142; Sun, 22 Sep 2013 02:43:14 -0700 (PDT) Path: border1.nntp.ams.giganews.com!nntp.giganews.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!209.197.12.246.MISMATCH!nx02.iad01.newshosting.com!newshosting.com!69.16.185.11.MISMATCH!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!d5no1407472qap.0!news-out.google.com!gv3ni775qab.0!nntp.google.com!d5no1473359qap.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 22 Sep 2013 02:43:13 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=93.37.92.246; posting-account=9fwclgkAAAD6oQ5usUYhee1l39geVY99 NNTP-Posting-Host: 93.37.92.246 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <6bcff8e8-ca68-4ce4-95e6-387a65930744@googlegroups.com> Subject: Re: Galois fields From: mockturtle Injection-Date: Sun, 22 Sep 2013 09:43:14 +0000 Content-Type: text/plain; charset=ISO-8859-1 X-Received-Bytes: 2312 Xref: number.nntp.dca.giganews.com comp.lang.ada:183401 Date: 2013-09-22T02:43:13-07:00 List-Id: On Saturday, September 21, 2013 5:50:28 PM UTC+2, karh...@gmail.com wrote: > Are Galois Fields (I only need binary GFs) supported by any publicly available Ada library? > > > > Thanks I have a GF binary library that I wrote for myself in my early Ada days. It is a generic package that you must instantiate with the desired GF size (up to 2^64, so it fits in a 64-bit integer). Unfortunately I did not publish the code by itself, but you can find it "embedded" in an old (and, alas, sleeping) project of mine hosted on launchpad. Just go here http://bazaar.launchpad.net/~riccardo-bernardini/+junk/pre-ppetp/files/head:/src/lib/Algebra/Galois/ (or here: http://bit.ly/1gOe996 if the URL above is too long) and take the two files gf_2p_varsize.{ads, adb}. You just need to instantiate it with something like package GF32 is new Gf_2p_Varsize(Exponent => 32, Basic_Type => Unsigned_32); and then use it like X, Y, Z : GF32.Galois; X = Y * Z; Disclaimer: As I said, I wrote this package in my early Ada days, so maybe it is not the most elegant code around, but it works... Should you decide to use it and have any question, please ask. Riccardo