Safe Haskell | None |
---|
- type PlainText = Integer
- type CipherText = Integer
- data PubKey = PubKey {}
- data PrvKey = PrvKey {}
- genKey :: Int -> IO (PubKey, PrvKey)
- _encrypt :: PubKey -> PlainText -> Integer -> CipherText
- generateR :: SystemRNG -> PubKey -> Integer -> Integer
- encrypt :: PubKey -> PlainText -> IO CipherText
- decrypt :: PrvKey -> PubKey -> CipherText -> PlainText
- cipherMul :: PubKey -> CipherText -> CipherText -> CipherText
- cipherExp :: PubKey -> CipherText -> PlainText -> CipherText
Documentation
type CipherText = IntegerSource
cipherMul :: PubKey -> CipherText -> CipherText -> CipherTextSource
ciphetext muliplication is known as homomorphic addition of plaintexts
cipherExp :: PubKey -> CipherText -> PlainText -> CipherTextSource
Homomorphic multiplication of plaintexts An encrypted plaintext raised to the power of another plaintext will decrypt to the product of the two plaintexts.