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=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,681b83914f25819b X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.224.19.78 with SMTP id z14mr1977090qaa.4.1361562475350; Fri, 22 Feb 2013 11:47:55 -0800 (PST) X-Received: by 10.49.58.238 with SMTP id u14mr243565qeq.13.1361562475177; Fri, 22 Feb 2013 11:47:55 -0800 (PST) Path: t2ni671qaj.0!nntp.google.com!dd2no2281904qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 22 Feb 2013 11:47:55 -0800 (PST) In-Reply-To: <4e1da8eb-68ce-43a5-914b-81ba8512bf10@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=93.37.91.153; posting-account=9fwclgkAAAD6oQ5usUYhee1l39geVY99 NNTP-Posting-Host: 93.37.91.153 References: <4e1da8eb-68ce-43a5-914b-81ba8512bf10@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <6532e81f-bb50-457d-89f9-9ea655c20b1f@googlegroups.com> Subject: Re: Secret sharing schemes in Ada From: mockturtle Injection-Date: Fri, 22 Feb 2013 19:47:55 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2013-02-22T11:47:55-08:00 List-Id: On Sunday, February 17, 2013 1:35:20 PM UTC+1, Dufr wrote: > Hi >=20 >=20 >=20 > does anyone have an implementation of a secret sharing scheme (e.g. Shami= r's) in Ada? >=20 Not really off-the-shelf, but I have some software of mine ("embedded" in = a much larger mess) that could help you to write one yourself. In case you want to give it a try, (a) Get the whole mess with Bazaar (http://bazaar.canonical.com/en/) bzr branch lp:~riccardo-bernardini/+junk/pre-ppetp (b) Now you should have on your disk a folder pre-ppetp with a lots of stu= ff under it (it is my "working copy" for a project with no official release= yet, so I do not care too much about the mess). Go to the folder pre-ppetp/READY/src/lib/Algebra (c) There you will find two folders >> Galois =20 with package GF_2p_varsize that implements Galois fields with size 2= ^p, p=3D2, ...2^64 >> Matrix=20 with some generic "matrix library" stuff. The package is parametri= zed with the type of coefficients and as long as they are a ring (i.e., you= have sum and product that behave as the "usual" sum and product) you can d= o the usual matrix operation. So, you can use this with Galois fields, Int= eger mod P (P a prime) or generic precision integers (there is somewhere an= Ada binding for the GMP). Using those two packages you can write quite easily the "core" of Shamir's = scheme. Actually, something similar to the Shamir's scheme is embedded in= the mess, but extracting it from the code would be more work than rewritin= g the missing code by yourself. (But if you want to try to find and extract= it, please be my guest...) A final note: the code style maybe is not the best one, but bear with me: t= hose are two of the first Ada packages that I wrote... :-) (ah, nostalgia..= . :-)=20 Should you have any question, just ask Riccardo >=20 >=20 > Thank you >=20 >=20 >=20 > Dufriz