Popularity
3.3
Declining
Activity
0.0
Stable
5
0
3

Monthly Downloads: 12
Programming language: Haskell
License: BSD 3-clause "New" or "Revised" License
Tags: Math    

Paillier alternatives and similar packages

Based on the "Math" category.
Alternatively, view Paillier alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of Paillier or a related project?

Add another 'Math' Package

README

HsPaillier

A implenmentation of Paillier cryptosystem

The Paillier cryptosystem has some homomorphic properties.

  • Homomorphic addition of plaintexts
  • Homomorphic multiplication of plaintexts

Those properties mean that you can manipulate the ciphertext without decrypting it first.

For example,

(pubKey, prvKey) <- P.genKey 256 

let p = 2 :: Integer
c <- P.encrypt pubKey p

let p' = 100 :: Integer
c' <- P.encrypt pubKey p'

let c'' = P.cipherMul pubKey c c'
putStrLn $ "plaintext: " ++ show (P.decrypt prvKey pubKey c'')

The result will be 102 which is 2+100 (We just decrypt once!)

The above example is in the Main.hs

How to install

$ cabal configure

$ cabal build

$ cabal test