comp.lang.ada
 help / color / mirror / Atom feed
From: mockturtle <framefritti@gmail.com>
Subject: Re: Secret sharing schemes in Ada
Date: Fri, 22 Feb 2013 11:47:55 -0800 (PST)
Date: 2013-02-22T11:47:55-08:00	[thread overview]
Message-ID: <6532e81f-bb50-457d-89f9-9ea655c20b1f@googlegroups.com> (raw)
In-Reply-To: <4e1da8eb-68ce-43a5-914b-81ba8512bf10@googlegroups.com>

On Sunday, February 17, 2013 1:35:20 PM UTC+1, Dufr wrote:
> Hi
> 
> 
> 
> does anyone have an implementation of a secret sharing scheme (e.g. Shamir's) in Ada?
> 

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 stuff 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  
       with package GF_2p_varsize that implements Galois fields with size 2^p, p=2, ...2^64

      >> Matrix 
        with some generic "matrix library" stuff.  The package is parametrized 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 do the usual matrix operation.  So, you can use this with Galois fields, Integer 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 rewriting 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: those are two of the first Ada packages that I wrote... :-) (ah, nostalgia... :-) 

Should you have any question, just ask

Riccardo


> 
> 
> Thank you
> 
> 
> 
> Dufriz



      reply	other threads:[~2013-02-22 19:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-17 12:35 Secret sharing schemes in Ada Dufr
2013-02-22 19:47 ` mockturtle [this message]
replies disabled

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