Copyright | (c) Eric Crockett 2011-2017 Chris Peikert 2011-2018 |
---|---|
License | GPL-3 |
Maintainer | ecrockett0@gmail.com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
Functions and types for working with ring-LWR samples.
Synopsis
- type Sample cm zq zp = (cm zq, cm zp)
- type RLWRCtx cm zq zp = (Cyclotomic (cm zq), Random (cm zq), Ring (cm zq), RescaleCyc cm zq zp)
- sample :: (RLWRCtx cm zq zp, MonadRandom rnd) => cm zq -> rnd (Sample cm zq zp)
- roundedProd :: RLWRCtx cm zq zp => cm zq -> cm zq -> cm zp
Documentation
type RLWRCtx cm zq zp = (Cyclotomic (cm zq), Random (cm zq), Ring (cm zq), RescaleCyc cm zq zp) Source #
Common constraints for working with RLWR.
sample :: (RLWRCtx cm zq zp, MonadRandom rnd) => cm zq -> rnd (Sample cm zq zp) Source #
An RLWR sample with the given secret.
roundedProd :: RLWRCtx cm zq zp => cm zq -> cm zq -> cm zp Source #
The \(b\) component of an RLWR sample for secret \(s\) and given \(a\), produced by rounding \(a\cdot s\) in the decoding basis.