comp.lang.ada
 help / color / mirror / Atom feed
* Secret sharing schemes in Ada
@ 2013-02-17 12:35 Dufr
  2013-02-22 19:47 ` mockturtle
  0 siblings, 1 reply; 2+ messages in thread
From: Dufr @ 2013-02-17 12:35 UTC (permalink / raw)


Hi

does anyone have an implementation of a secret sharing scheme (e.g. Shamir's) in Ada?

Thank you

Dufriz



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

* Re: Secret sharing schemes in Ada
  2013-02-17 12:35 Secret sharing schemes in Ada Dufr
@ 2013-02-22 19:47 ` mockturtle
  0 siblings, 0 replies; 2+ messages in thread
From: mockturtle @ 2013-02-22 19:47 UTC (permalink / raw)


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



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

end of thread, other threads:[~2013-02-22 19:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-17 12:35 Secret sharing schemes in Ada Dufr
2013-02-22 19:47 ` mockturtle

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