Copyright | (c) Eric Crockett 2011-2017 Chris Peikert 2011-2017 |
---|---|

License | GPL-2 |

Maintainer | ecrockett0@email.com |

Stability | experimental |

Portability | POSIX |

Safe Haskell | None |

Language | Haskell2010 |

Generates challenges in non-legacy proto format.

- generateMain :: FilePath -> BeaconAddr -> [ChallengeParams] -> IO ()
- genChallengeU :: MonadRandom m => ChallengeParams -> BeaconAddr -> m ChallengeU
- writeChallengeU :: FilePath -> String -> ChallengeU -> IO ()
- instanceCont :: (RLWECtx t m zq rrq, Random zq, Random (LiftOf rrq), OrdFloat (LiftOf rrq), MonadRandom rnd, ToRational v) => v -> Int -> rnd (Cyc t m zq, [Sample t m zq rrq])
- instanceDisc :: (RLWECtx t m zq, Random zq, MonadRandom rnd, ToRational v) => v -> Int -> rnd (Cyc t m zq, [Sample t m zq])
- instanceRLWR :: (RLWRCtx t m zq zp, Random zq, MonadRandom rnd) => Int -> rnd (Cyc t m zq, [Sample t m zq zp])

# Documentation

generateMain :: FilePath -> BeaconAddr -> [ChallengeParams] -> IO () Source #

Generate and serialize challenges given the path to the root of the tree and an initial beacon address.

genChallengeU :: MonadRandom m => ChallengeParams -> BeaconAddr -> m ChallengeU Source #

Generate a challenge with the given parameters.

writeChallengeU :: FilePath -> String -> ChallengeU -> IO () Source #

Writes a `ChallengeU`

to a file given a path to the root of the tree
and the name of the challenge.

instanceCont :: (RLWECtx t m zq rrq, Random zq, Random (LiftOf rrq), OrdFloat (LiftOf rrq), MonadRandom rnd, ToRational v) => v -> Int -> rnd (Cyc t m zq, [Sample t m zq rrq]) Source #

Generate a continuous RLWE instance along with its (uniformly random) secret, using the given scaled variance and number of desired samples.

instanceDisc :: (RLWECtx t m zq, Random zq, MonadRandom rnd, ToRational v) => v -> Int -> rnd (Cyc t m zq, [Sample t m zq]) Source #

Generate a discrete RLWE instance along with its (uniformly random) secret, using the given scaled variance and number of desired samples.

instanceRLWR :: (RLWRCtx t m zq zp, Random zq, MonadRandom rnd) => Int -> rnd (Cyc t m zq, [Sample t m zq zp]) Source #

Generate a discrete RLWR instance along with its (uniformly random) secret, using the given scaled variance and number of desired samples.