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

License | GPL-2 |

Maintainer | ecrockett0@email.com |

Stability | experimental |

Portability | POSIX \( \def\Z{\mathbb{Z}} \) \( \def\R{\mathbb{R}} \) |

Safe Haskell | None |

Language | Haskell2010 |

Functions and types for working with continuous ring-LWE samples.

- type Sample t m zq rrq = (Cyc t m zq, UCyc t m D rrq)
- type RLWECtx t m zq rrq = (Fact m, Ring zq, CElt t zq, Subgroup zq rrq, Lift' rrq, TElt t rrq, TElt t (LiftOf rrq))
- sample :: forall rnd v t m zq rrq. (RLWECtx t m zq rrq, Random zq, Random (LiftOf rrq), OrdFloat (LiftOf rrq), MonadRandom rnd, ToRational v) => v -> Cyc t m zq -> rnd (Sample t m zq rrq)
- errorTerm :: RLWECtx t m zq rrq => Cyc t m zq -> Sample t m zq rrq -> UCyc t m D (LiftOf rrq)
- errorGSqNorm :: (RLWECtx t m zq rrq, Ring (LiftOf rrq)) => Cyc t m zq -> Sample t m zq rrq -> LiftOf rrq
- errorBound :: (Ord v, Transcendental v, Fact m) => v -> v -> Tagged m v

# Documentation

type RLWECtx t m zq rrq = (Fact m, Ring zq, CElt t zq, Subgroup zq rrq, Lift' rrq, TElt t rrq, TElt t (LiftOf rrq)) Source #

Common constraints for working with continuous RLWE.

sample :: forall rnd v t m zq rrq. (RLWECtx t m zq rrq, Random zq, Random (LiftOf rrq), OrdFloat (LiftOf rrq), MonadRandom rnd, ToRational v) => v -> Cyc t m zq -> rnd (Sample t m zq rrq) Source #

A continuous RLWE sample with the given scaled variance and secret.

errorTerm :: RLWECtx t m zq rrq => Cyc t m zq -> Sample t m zq rrq -> UCyc t m D (LiftOf rrq) Source #

The error term of an RLWE sample, given the purported secret.

errorGSqNorm :: (RLWECtx t m zq rrq, Ring (LiftOf rrq)) => Cyc t m zq -> Sample t m zq rrq -> LiftOf rrq Source #

The `gSqNorm`

of the error term of an RLWE sample, given the
purported secret.

:: (Ord v, Transcendental v, Fact m) | |

=> v | the scaled variance |

-> v | \(\epsilon\) |

-> Tagged m v |