Piotr Dyraga f5a107a36f Draft implementation of a safe prime generator
I've adapted a Go code for generating random numbers by inserting some
optimisations that will allow us to generate safe primes faster than
with the previous, naive approach.

First of all, having q which can be prime, we first check whether q%3=1.
If that's true, there is no chance p=2q+1 is prime. It lets us to reject
candidate numbers quicker without running an expensive primality tests.

Also, before we run a primality test for q, we may check p=2q+1 against
the primes between 3-53 (We are limited by Go's uint64 range).

If all those conditions are met and we know p is prime, it's enough to
check Pocklington criterion for q instead of running an expensive
primality test for it.
2018-07-25 10:55:49 +02:00
2014-11-29 22:22:14 -08:00
2015-02-22 13:02:08 -08:00
2014-11-29 22:22:14 -08:00
2014-11-29 22:47:18 -08:00
2014-11-29 23:29:34 -08:00
2014-11-29 23:29:34 -08:00

paillier

Go implementation of the paillier cryptosystem and threshold paillier crytposystem.

travis

introduction

Implementation of the paillier cryptosystem. See http://en.wikipedia.org/wiki/Paillier_cryptosystem for an introduction.

The threshold paillier cryptosystem is a translation of the java version that can be found at http://cs.utdallas.edu/dspl/cgi-bin/pailliertoolbox/ that is an implementation of the algorithm defined in Damgård's paper "A Generalization of Paillier's Public-Key System with Applications to Electronic Voting".

Another important feature of the library is the ease of serilisation of all the structs in JSON and BSON.

Implements the paillier cryptosystem and threshold paillier crytposystem.

caveat

As any cryptographic library, if you use it, you need to trust it. Unfortunatly, this library as not been verified by a third party. There might be some bugs and vulnerabilities. If you find one, please fill a bug.

If you need to encrypt something serious, use the library provided by Go. If you want to have fun, use Paillier!

S
Description
Paillier cryptosystem implemented in Go
Readme MIT
188 KiB
0 Stars 1 Watchers 0 Forks
Languages
Go 100%